Date: Fri, 22 Dec 2006 17:04:04 +0100 From: Max Laier <max@love2party.net> To: freebsd-net@freebsd.org Cc: =?iso-8859-1?q?Fabr=EDcio_Barros_Cabral?= <fxcabral@yahoo.com.br> Subject: Re: Intercepting a packet, changing it and re-injecting into the network Message-ID: <200612221704.09522.max@love2party.net> In-Reply-To: <1166802209.7642.17.camel@hades.no-ip.org> References: <1166802209.7642.17.camel@hades.no-ip.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2677091.H2kUGekpqp Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 22 December 2006 16:43, Fabr=EDcio 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= =20 example useage. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2677091.H2kUGekpqp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFjAH5XyyEoT62BG0RAmtpAJ4tLqDKHGq3HYFj7xkvsOOE12kX6wCfWV52 fCRl1oHJIDJTfGWlpfLSGhw= =5kZq -----END PGP SIGNATURE----- --nextPart2677091.H2kUGekpqp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612221704.09522.max>