Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
0c12dfe5
Commit
0c12dfe5
authored
Nov 23, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/modules/stream_filter/httplive: script for traffic shaping
Test script for traffic shaping with tc (iproute).
parent
144336b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
test/modules/stream_filter/httplive/traffic-shaping.sh
test/modules/stream_filter/httplive/traffic-shaping.sh
+40
-0
No files found.
test/modules/stream_filter/httplive/traffic-shaping.sh
0 → 100755
View file @
0c12dfe5
#!/bin/sh
# Copyright (C) 2010 VideoLAN
# License: GPLv2
#----------------------------------------------------------------------------
# Traffic shaping for HTTP Live Streaming client tests.
#----------------------------------------------------------------------------
# Requires: iproute2
#----------------------------------------------------------------------------
#qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
#
TC
=
tc
INTF
=
"eth0"
RATE
=
"500kbit"
BURST
=
"20kbit"
PEAK
=
"520kbit"
MTU
=
"1500"
set
+e
# Shaping
function
traffic_shaping
()
{
${
TC
}
qdisc add
\
dev
${
INTF
}
\
root
\
tbf
\
rate
${
RATE
}
\
burst
${
BURST
}
\
latency 70ms
\
peakrate
${
PEAK
}
\
mtu
${
MTU
}
RESULT
=
$?
}
# tc qdisc add dev eth2 root tbf rate 50kbit burst 2kbit latency 70ms peakrate 52kbit mtu 1500
traffic_shaping
if
!
test
"
${
RESULT
}
"
=
"0"
;
then
exit
1
fi
exit
0
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