Subject: Re: placement of PFIL_HOOKS filtering points
To: None <>
From: Darren Reed <>
List: tech-net
Date: 11/08/2000 08:08:15
In some email I received from Jason R Thorpe, sie wrote:
>  > You haven't mentioned why you want them in network byte order, here,
>  > but if you're using BPF for the filtering, I have to wonder whether
>  > this is beneficial.  The alternative of chaning BPF isn't attractive
>  > either.
> Uh ... the reason I want them in network byte order is precisely because
> I'm using BPF.  Rule compilers for BPF (such as the one in libpcap, which
> is what I'm using to compile my classification rules) assume they're
> getting a raw packet off the wire.

Yes Jason, I understand that, hence my comment (modulo spelling mistakes).

> Also, I want to add filtering points in the Ethernet code, and I have
> filtering points in some forthcoming bridging code ... note that these
> are getting raw Ethernet frames, and thus the fields are in network
> byte order.

Hmmm, it would make sense for all packet information going through
pfil to either be in network byte order or host byte order.  Since
it is both impracticle and awkward to do the latter for all places
where you might want to add filtering hooks, changing it to always
pass packets in network byte order does seem better.