Date: Sun, 9 Jul 1995 23:33:08 -0700 (PDT) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: candy@fct.kgc.co.jp (Toshihiro Kanda) Cc: freebsd-hackers@freebsd.org Subject: Re: Suggestion for inplementation of bpf Message-ID: <199507100633.XAA10744@gndrsh.aac.dev.com> In-Reply-To: <199507100440.NAA25423@xxx.fct.kgc.co.jp> from "Toshihiro Kanda" at Jul 10, 95 01:40:13 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > Hi, hackers. I'm using > >$ uname -mrs > >FreeBSD 2.0-RELEASE i386 > > I found that when I write to bpf(4), the frame-length/frame-type > field of ethernet header (offset 12 and 13) must be orderd in little > endian. > Should this be in network byte order? Because the data read from > bpf is orderd in network byte order. In fact, "NetBSD 1.0 i386" is > implemeted in this way. > > I thought /usr/src/sys/net/if_ethersubr.c should be changed: > > case AF_UNSPEC: > eh = (struct ether_header *)dst->sa_data; > bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst)); > type = eh->ether_type; > ^^^^^^^^^^^^^^^^^^^^^^ type = htons(eh->ether_type); > break; > > Is this correct? I'll let David answer that one, as I know he has changed some things with respect to this to minimize the number of times we flip eh->ether_type between network and host byte order. > > And one more thing. Why manual pages for bpf is lost from FreeBSD > 2.0? FreeBSD 1.1.5.1 had that. Does 2.0.5 have that? Because at FreeBSD 2.0 we started with a fresh new empty cvs repository and brought in the BSD 4.4 Lite release which did not have bpf.4 in it. This was also true at FreeBSD 1.0 when we started with 386BSD 0.1. bpf.4 is back in the repository, it was in the 2.0.5 release, and will be in the 2.1.0 and all future releases. [Well, unless for some reason we start over again :-)] -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507100633.XAA10744>