]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blob - tc/setu32.sh
Correction in can filter name.
[lisovros/iproute2_canprio.git] / tc / setu32.sh
1 #!/bin/bash
2
3 DEV=can0
4
5 tc qdisc add dev ${DEV} root handle 1: prio
6
7 tc filter add dev ${DEV} parent 1:0 prio 1 \
8         u32 match u32 0x01000000 0xffffffff at 0 flowid 1:1
9         # id we want to match:
10         #  0x00 00 00 01 -> 00..00 0000 0000 0001b
11         #  0x00 00 00 01 LE (x86)
12         # value to be set:
13         #  0x01 00 00 00 BE (Network order)
14
15 tc filter add dev ${DEV} parent 1:0 prio 2 \
16         u32 match u32 0x00040000 0xffffffff at 0 flowid 1:2
17         # id we want to match:
18         # 0x00 00 04 00 -> 00..00 0100 0000 0000b
19         # 0x00 00 04 00 LE (x86)
20         # value to be set:
21         # 0x00 04 00 00 BE (Network order)
22
23 tc filter add dev ${DEV} parent 1:0 prio 3 \
24         can sffid 0x0:0x0 effid 0x0:0x0 flowid 1:3
25
26 tc qdisc show dev ${DEV} 
27