From owner-freebsd-hackers Wed Mar 31 7:32:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cdsec.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id C44D015C31 for ; Wed, 31 Mar 1999 07:32:43 -0800 (PST) (envelope-from gram@cdsec.com) Received: (from nobody@localhost) by citadel.cdsec.com (8.8.8/8.6.9) id RAA22858; Wed, 31 Mar 1999 17:32:00 +0200 (SAST) Received: by citadel via recvmail id 22856; Wed Mar 31 17:31:54 1999 Message-ID: <3702400A.9D62AB77@cdsec.com> Date: Wed, 31 Mar 1999 17:32:26 +0200 From: Graham Wheeler X-Mailer: Mozilla 4.08 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) MIME-Version: 1.0 To: Christopher Sedore Cc: Tom Brown , hackers@FreeBSD.ORG Subject: Re: How do I write to the /dev/bpf0 interface? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Christopher Sedore wrote: > > On Wed, 31 Mar 1999, Graham Wheeler wrote: > > > Tom Brown wrote: > > > > > Can anyone please tell me how to post a packet onto my LAN via this > > > interface. > > > > You should just be able to write the frame. Make sure everything is in > > network-byte order. You needn't put in a source Ethernet address as that > > will get filled in, but you do need to put in a destination. > > Note that this is probably a bug in the bpf implementation. BPF/the > kernel shouldn't be messing with the packet on a write to a bpf > descriptor. I've filed a bug report (with patch) that addresses this. > It probably isn't the bpf code that is doing this, but the NIC driver code... -- Dr Graham Wheeler E-mail: gram@cdsec.com Citadel Data Security Phone: +27(21)423-6065/6/7 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Internet/Intranet Network Specialists Data Security Products WWW: http://www.cdsec.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message