From owner-freebsd-hackers Wed Mar 31 8:21:14 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mailer.syr.edu (mailer.syr.edu [128.230.18.29]) by hub.freebsd.org (Postfix) with ESMTP id 0ED1C150E4 for ; Wed, 31 Mar 1999 08:21:10 -0800 (PST) (envelope-from cmsedore@mailbox.syr.edu) Received: from rodan.syr.edu by mailer.syr.edu (LSMTP for Windows NT v1.1a) with SMTP id <0.86DD5520@mailer.syr.edu>; Wed, 31 Mar 1999 11:20:48 -0500 Received: from localhost (cmsedore@localhost) by rodan.syr.edu (8.8.7/8.8.7) with SMTP id LAA25250; Wed, 31 Mar 1999 11:20:46 -0500 (EST) X-Authentication-Warning: rodan.syr.edu: cmsedore owned process doing -bs Date: Wed, 31 Mar 1999 11:20:46 -0500 (EST) From: Christopher Sedore X-Sender: cmsedore@rodan.syr.edu To: Graham Wheeler Cc: Tom Brown , hackers@FreeBSD.ORG Subject: Re: How do I write to the /dev/bpf0 interface? In-Reply-To: <3702400A.9D62AB77@cdsec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 31 Mar 1999, Graham Wheeler wrote: > 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... Actually, its a cooperative effort by bpfwrite() and ether_output(). -Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message