Question on SOCK_RAW, implement a bpf->other host tee

Bruce M Simpson bms at spc.org
Sun Jul 18 15:19:29 PDT 2004


On Sun, Jul 18, 2004 at 05:38:22PM -0400, Robert Watson wrote:
> > I have swapped the ip_len, ip_off fields. 
> 
> Are you sure you need to do this?  I thought BPF/PCAP provided those
> fields in network byte order already, in which case you shouldn't need to
> touch these fields unless you need to adjust them.

I think Don is referring to the fact that IP_HDRINCL in our stack expects
to see these fields in host byte order (as per my update of the ip(4) manual
page quite recently). Raw socket stuff being different from bpf stuff.

BMS


More information about the freebsd-net mailing list