File: prio%2Bfw

package info (click to toggle)
tcng 9m-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,632 kB
  • ctags: 2,513
  • sloc: ansic: 19,021; pascal: 4,635; yacc: 2,619; sh: 1,854; perl: 1,546; lex: 772; makefile: 749
file content (20 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * prio+fw - Prio with FW classifier
 *
 * Like prio+rsvp, but using the fw classifier.
 */

#define NOTHING
#define HIGH	TCP_PCK(NOTHING)
#define LOW	TCP_PCK(NOTHING)

dev eth0 100000 /* 100 Mbps */

tc qdisc add dev eth0 root handle 1:0 prio
tc filter add dev eth0 parent 1:0 proto ip fw 

send nfmark=2 LOW
send nfmark=2 LOW
send nfmark=1 HIGH

end