[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tc filt protocol !ip
On Fri, 17 Nov 2000, Matthew G. Marsh wrote:
>
> Has anyone used the tc filter add protocol {xxx} where {xxx} is not ip?
I might have seen one or two but cant remember where.
[..]
> Note that these names and more are in iproute2 lib/ll_proto.c. Not sure
> where is the ## to name mapping but probably within the functions there.
>
llproto_names ?
> I am trying to see what these definitions imply for the offsets. IE: I
> would suspect that an 802.2 would give me the Ethernet LLC packet but if I
> try to then add in a filter for the dest MAC - which should always be at
> offset 0 - I get no response.
>
> Example:
>
> tc filt add dev eth1 parent ffff: pref 1 proto 3 u32
> match u16 0x00d0 0xffff at 0 classid :2
>
> I suspect that protocol 3 means raw packet but does that include say
> the preamble for Enet or the SDEL for TR?
>
It is the protocol id. example id 0x0800 is IP.
lib/ll_proto.c uses the definitions in the llproto_names to go a2n or n2a.
If protocol is missing add it there and give it a name.
cheers,
jamal