tc filter
... [ handle
HANDLE ] u32
OPTION_LIST [ offset
OFFSET ]
[ hashkey
HASHKEY ] [ classid
CLASSID ] [ divisor
uint_value ] [ order
u32_value ] [ ht
HANDLE ] [ sample
SELECTOR [ divisor
uint_value ] ] [ link
HANDLE ] [ indev
ifname ] [ skip_hw
| skip_sw
] [ help
]
HANDLE := { u12_hex_htid:
[u8_hex_hash:
[u12_hex_nodeid] |
0x
u32_hex_value }
OPTION_LIST := [ OPTION_LIST ] OPTION
HASHKEY := [ mask
u32_hex_value ] [ at
4*int_value ]
CLASSID := { root
| none
| [u16_major]:
u16_minor | u32_hex_value
}
OFFSET := [ plus
int_value ] [ at
2*int_value ] [ mask
u16_hex_value ] [ shift
int_value ] [ eat
]
OPTION := { match
SELECTOR | action
ACTION }
SELECTOR := { u32
VAL_MASK_32 | u16
VAL_MASK_16 | u8
VAL_MASK_8 |
ip
IP | ip6
IP6 | { tcp
| udp
} TCPUDP | icmp
ICMP | mark
VAL_MASK_32 | ether
ETHER }
IP := { { src
| dst
} { default
| any
| all
| ip_address [ /
{
prefixlen | netmask } ] } AT | { dsfield
| ihl
| protocol
| precedence
| icmp_type
| icmp_code
} VAL_MASK_8 | {
sport
| dport
} VAL_MASK_16 | nofrag
| firstfrag
| df
|
mf
}
IP6 := { { src
| dst
} { default
| any
| all
| ip6_address
[/prefixlen ] } AT | priority
VAL_MASK_8 | { protocol
|
icmp_type
| icmp_code
} VAL_MASK_8 | flowlabel
VAL_MASK_32 | { sport
| dport
} VAL_MASK_16 }
TCPUDP := { src
| dst
} VAL_MASK_16
ICMP := { type
VAL_MASK_8 | code
VAL_MASK_8 }
ETHER := { src
| dst
} ether_address AT
VAL_MASK_32 := u32_value u32_hex_mask [ AT ]
VAL_MASK_16 := u16_value u16_hex_mask [ AT ]
VAL_MASK_8 := u8_value u8_hex_mask [ AT ]
AT := [ at
[ nexthdr+
] int_value ]