Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
0f7cc6f9
Commit
0f7cc6f9
authored
Jun 25, 2015
by
Jos Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(trafficshaper) add burst option to pipes and clean up extra spaces
parent
c63ef620
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
5 deletions
+21
-5
SettingsController.php
...rollers/OPNsense/TrafficShaper/Api/SettingsController.php
+1
-1
dialogPipe.xml
...p/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml
+11
-0
TrafficShaper.xml
...e/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml
+4
-0
index.volt
src/opnsense/mvc/app/views/OPNsense/TrafficShaper/index.volt
+1
-0
ipfw.conf
src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
+4
-4
No files found.
src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/Api/SettingsController.php
View file @
0f7cc6f9
...
...
@@ -216,7 +216,7 @@ class SettingsController extends ApiControllerBase
$searchPhrase
=
$this
->
request
->
getPost
(
'searchPhrase'
,
'string'
,
''
);
// create model and fetch query resuls
$fields
=
array
(
"enabled"
,
"number"
,
"bandwidth"
,
"bandwidthMetric"
,
"description"
,
"mask"
,
"origin"
);
$fields
=
array
(
"enabled"
,
"number"
,
"bandwidth"
,
"bandwidthMetric"
,
"
burst"
,
"
description"
,
"mask"
,
"origin"
);
$mdlShaper
=
new
TrafficShaper
();
$grid
=
new
UIModelGrid
(
$mdlShaper
->
pipes
->
pipe
);
return
$grid
->
fetch
(
$fields
,
$itemsPerPage
,
$currentPage
,
$sortBy
,
$sortDescending
,
$searchPhrase
);
...
...
src/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/forms/dialogPipe.xml
View file @
0f7cc6f9
...
...
@@ -16,6 +16,17 @@
<label>
bandwidth Metric
</label>
<type>
dropdown
</type>
</field>
<field>
<id>
pipe.burst
</id>
<label>
burst
</label>
<type>
text
</type>
<help>
If the data to be sent exceeds the pipe's bandwidth limit (and
the pipe was previously idle), up to size bytes of data are
allowed to bypass the dummynet scheduler, and will be sent as
fast as the physical link allows.
</help>
<advanced>
true
</advanced>
</field>
<field>
<id>
pipe.queue
</id>
<label>
queue
</label>
...
...
src/opnsense/mvc/app/models/OPNsense/TrafficShaper/TrafficShaper.xml
View file @
0f7cc6f9
...
...
@@ -32,6 +32,10 @@
</OptionValues>
<ValidationMessage>
Bandwidth metric should be one of bit,Kbit,Mbit
</ValidationMessage>
</bandwidthMetric>
<burst
type=
"IntegerField"
>
<Required>
N
</Required>
<ValidationMessage>
The burst value is an integer and represent a number of bytes.
</ValidationMessage>
</burst>
<queue
type=
"IntegerField"
>
<Required>
N
</Required>
<MinimumValue>
2
</MinimumValue>
...
...
src/opnsense/mvc/app/views/OPNsense/TrafficShaper/index.volt
View file @
0f7cc6f9
...
...
@@ -114,6 +114,7 @@ POSSIBILITY OF SUCH DAMAGE.
<th data-column-id="number" data-type="number" data-visible="false">Number</th>
<th data-column-id="bandwidth" data-type="number">Bandwidth</th>
<th data-column-id="bandwidthMetric" data-type="string">Metric</th>
<th data-column-id="burst" data-type="number">Burst</th>
<th data-column-id="mask" data-type="string">Mask</th>
<th data-column-id="description" data-type="string">Description</th>
<th data-column-id="commands" data-width="7em" data-formatter="commands" data-sortable="false">Commands</th>
...
...
src/opnsense/service/templates/OPNsense/IPFW/ipfw.conf
View file @
0f7cc6f9
...
...
@@ -31,10 +31,10 @@ flush
#======================================================================================
{%
if
helpers
.
exists
(
'OPNsense.TrafficShaper.pipes.pipe'
) %}
{%
for
pipe
in
helpers
.
toList
(
'OPNsense.TrafficShaper.pipes.pipe'
) %}
pipe
{{
pipe
.
number
}}
config
bw
{{
pipe
.
bandwidth
}}{{
pipe
.
bandwidthMetric
}}/
s
{%
if
pipe
.
queue
%}
queue
{{
pipe
.
queue
}}
{%
if
pipe
.
queueMetric
!=
'slots'
%}
{{
pipe
.
queueMetric
}} {%
endif
%}
{%
endif
%}
{%
if
pipe
.
mask
!=
'none'
%}
mask
{{
pipe
.
mask
}}
0
xffffffff
{%
endif
%}
pipe
{{
pipe
.
number
}}
config
bw
{{
pipe
.
bandwidth
}}{{
pipe
.
bandwidthMetric
}}/
s
{%
if
pipe
.
burst
%}
burst
{{
pipe
.
burst
}}{%
endif
%}
{%
if
pipe
.
queue
%}
queue
{{
pipe
.
queue
}}{%
if
pipe
.
queueMetric
!=
'slots'
%}
{{
pipe
.
queueMetric
}}{%
endif
%}
{%
endif
%}{%
if
pipe
.
mask
!=
'none'
%}
mask
{{
pipe
.
mask
}}
0
xffffffff
{%
endif
%}
{%
endfor
%}
{%
endif
%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment