From owner-freebsd-hackers Sun Jul 9 22:33:33 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA25921 for hackers-outgoing; Sun, 9 Jul 1995 22:33:33 -0700 Received: from mail0.iij.ad.jp (root@mail0.iij.ad.jp [192.244.176.61]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id WAA25915 for ; Sun, 9 Jul 1995 22:33:31 -0700 Received: from uucp0.iij.ad.jp (uucp0.iij.ad.jp [192.244.176.51]) by mail0.iij.ad.jp (8.6.12+2.4W/3.3W9-MAIL) with ESMTP id OAA09565 for ; Mon, 10 Jul 1995 14:33:22 +0900 Received: (from uucp@localhost) by uucp0.iij.ad.jp (8.6.12+2.4W/3.3W9-UUCP) with UUCP id OAA12640 for freebsd-hackers@freebsd.org; Mon, 10 Jul 1995 14:33:23 +0900 Received: from xxx.fct.kgc.co.jp by fender.fct.kgc.co.jp (8.6.12+2.4W/3.3W8:95063017) id NAA27276; Mon, 10 Jul 1995 13:40:14 +0900 Received: from localhost by xxx.fct.kgc.co.jp (8.6.12+2.4W/3.3W8:95062916) id NAA25423; Mon, 10 Jul 1995 13:40:13 +0900 Message-Id: <199507100440.NAA25423@xxx.fct.kgc.co.jp> To: freebsd-hackers@freebsd.org Subject: Suggestion for inplementation of bpf Date: Mon, 10 Jul 1995 13:40:13 +0900 From: Toshihiro Kanda Sender: hackers-owner@freebsd.org Precedence: bulk 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)