Subject: Re: Custom packet editing
To: Mike Pelley <mike@pelley.com>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-net
Date: 05/24/1999 17:24:59
In some email I received from Mike Pelley, sie wrote:
> 
> I would like to write some code that would allow me to edit ip and arp
> packets as they come off the wire and then pass them on to the kernel, and
> edit them as the packets are about to be written to the wire.  I will also
> be using ipnat and ipfilter.  My brief research tells me that I might want
> something like the FreeBSD divert sockets functionality, but it doesn't seem
> to carry over to NetBSD.  Does ipfilter offer some hooks like this?  Or will
> I have to attempt mucking around in the kernel (which I haven't done
> really)?

IP Filter never sees ARP packets.

Sounds like what you need is a bpf hook/filter that doesn't create a copy of
the packet.

Darren