Re: Intercepting a packet, changing it and re-injecting into the network
- From: Brooks Davis <brooks@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Dec 2006 10:05:50 -0600
On Fri, Dec 22, 2006 at 12:43:29PM -0300, Fabr?cio Barros Cabral wrote:
Hello everybody!
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.
The feature you're looking for is divert(4) sockets. You use IPFW to
decide which packets to divert to userland and can reinject them as
needed.
-- Brooks
Attachment:
pgpAHuTVT89qu.pgp
Description: PGP signature
- Follow-Ups:
- Re: Intercepting a packet, changing it and re-injecting into the network
- From: Kevin Sanders
- Re: Intercepting a packet, changing it and re-injecting into the network
- References:
- Intercepting a packet, changing it and re-injecting into the network
- From: Fabrício Barros Cabral
- Intercepting a packet, changing it and re-injecting into the network
- Prev by Date: Re: Intercepting a packet, changing it and re-injecting into the network
- Next by Date: Re: [was] addition to ipfw (read vlans from bridge)..
- Previous by thread: Re: Intercepting a packet, changing it and re-injecting into the network
- Next by thread: Re: Intercepting a packet, changing it and re-injecting into the network
- Index(es):
Relevant Pages
|
|