Date: Mon, 10 Jul 1995 13:40:13 +0900 From: Toshihiro Kanda <candy@fct.kgc.co.jp> To: freebsd-hackers@freebsd.org Subject: Suggestion for inplementation of bpf Message-ID: <199507100440.NAA25423@xxx.fct.kgc.co.jp>
next 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? 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? Bye. candy@fct.kgc.co.jp (Toshihiro Kanda)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507100440.NAA25423>