1 .TH CAN 8 "8 May 2012" "iproute2" "Linux"
3 CAN \- Controller Area Network classifier
11 .B ] [ protocol can ] [ handle
19 .B CLASSID := major:minor
21 .B FLOWID := major:minor
23 .B MATCHSPEC := { sffid
29 .B FILTERID := canid[:mask]
36 are parsed as hexadecimal input.
39 The CAN classifier may be used with any available
41 on Controller Area Network (CAN) frames passed through AF_CAN
42 networking subsystem. The classifier classifies CAN frames according
43 to their identifiers. It can be used on CAN frames with both SFF or
46 It is possible to add CAN classifier to any qdisc configured on any networking
47 device, however it will ignore non-CAN packets.
51 The filtering rules are stored in an array, which is traversed during
52 classification. This means that the worst-case time needed for classification
53 increases with the number of configured rules.
57 The filter implements an optimization for matching SFF frames using a bitmap
58 with one bit for every ID. With this optimization, the classification time
59 for SFF frames is nearly constant independently of the number of rules.
60 Rules for EFF frames are always stored in an array.
62 With very few configured SFF rules, the use of an array may be
65 The decision whether to use the bitmap- or array-based implementation needs
66 to be done at compile time.
70 This example shows how to set
77 tc qdisc add dev can0 root handle 1: prio
79 tc filter add dev can0 parent 1:0 prio 1 handle 0xa \\
80 can sffid 0x7ff:0xf flowid 1:1
81 tc filter add dev can0 parent 1:0 prio 2 handle 0xb \\
82 can sffid 0xC0:0x7ff effid 0x80:0x7ff flowid 1:2
83 tc filter add dev can0 parent 1:0 prio 3 \\
84 can sffid 0x80:0x7ff flowid 1:2
85 tc filter add dev can0 parent 1:0 prio 4 \\
86 can sffid 0x0:0x0 effid 0x0:0x0 flowid 1:3
91 The maximum number or rules passed from
93 utility to CAN classifier is fixed. The limit is set at compilation time
102 Michal Sojka <sojkam1@fel.cvut.cz>, Pavel Pisa <pisa@cmp.felk.cvut.cz>,
103 Rostislav Lisovy <lisovy@gmail.cz>.
105 This manpage maintained by Rostislav Lisovy <lisovy@gmail.com>