On Mon, Dec 03, 2001 at 07:39:39AM +0900, [EMAIL PROTECTED] wrote:
>       i'm not saying it is a bug in tcpdump.  is it mandatory for BPF to
>       return an aligned packet?  if so, it is a bug in netbsd.

Well, the FreeBSD 3.4 man page for BPF says

     The bh_hdrlen field exists to account for padding between the header and
     the link level protocol.  The purpose here is to guarantee proper align-
     ment of the packet data structures, which is required on alignment sensi-
     tive architectures and improves performance on many other architectures. 
     The packet filter insures that the bpf_hdr and the network layer header
     will be word aligned.  Suitable precautions must be taken when accessing
     the link layer protocol fields on alignment restricted machines.  (This
     isn't a problem on an Ethernet, since the type field is a short falling
     on an even offset, and the addresses are probably accessed in a bytewise
     fashion).

and the NetBSD-current man page at:

        http://www.tac.eu.org/cgi-bin/man-cgi?bpf++NetBSD-current

says the same thing.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to