3 if [ "$1" == "del" ]; then # delete all qdiscs & filters
4 sudo ./tc qdisc del dev can0 root
6 elif [ "$1" = "stat" ]; then # show statistics
7 ./tc -s class show dev can0
9 else # create Prio qdiscs and configure canprio filter
10 sudo ./tc qdisc add dev can0 root handle 1: prio
11 sudo ./tc filter add dev can0 parent 1:0 prio 1 canprio match 0x123:0xffff match 0x124:0xffff flowid 1:1
12 sudo ./tc filter add dev can0 parent 1:0 prio 2 canprio match 0x223:0xffff flowid 1:2
13 sudo ./tc filter add dev can0 parent 1:0 prio 3 canprio match 0x1:0x1 flowid 1:3
15 sudo ./tc qdisc show dev can0