Intercepting a packet,
changing it and re-injecting into the network
max at love2party.net
Fri Dec 22 08:17:00 PST 2006
On Friday 22 December 2006 16:43, Fabrício Barros Cabral wrote:
> I'm developing a network application which needs *to intercept* a
> packet (not just *copy* a packet, like libpcap does), move this packet
> into my application (userland), do some checking in the packet and
> according with some heuristics, the application may change the payload
> and re-inject the modified packet into the network. Note that
> sometimes, I'll change the payload, drop the packet or just let it go.
> So, how can a I do that in FreeBSD? I can use 6.1, 7.1, any version.
Sounds like you are looking for divert(4) sockets. Look at natd(8) for an
/"\ Best regards, | mlaier at freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier at EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20061222/4a51e22a/attachment.pgp
More information about the freebsd-net