From owner-freebsd-net@FreeBSD.ORG Fri Dec 22 16:17:00 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15E0116A416 for ; Fri, 22 Dec 2006 16:17:00 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id A37A213C44B for ; Fri, 22 Dec 2006 16:16:59 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.64.179.215] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1GxmsY471E-0003p1; Fri, 22 Dec 2006 17:04:15 +0100 From: Max Laier Organization: FreeBSD To: freebsd-net@freebsd.org Date: Fri, 22 Dec 2006 17:04:04 +0100 User-Agent: KMail/1.9.4 References: <1166802209.7642.17.camel@hades.no-ip.org> In-Reply-To: <1166802209.7642.17.camel@hades.no-ip.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2677091.H2kUGekpqp"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612221704.09522.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: =?iso-8859-1?q?Fabr=EDcio_Barros_Cabral?= Subject: Re: Intercepting a packet, changing it and re-injecting into the network X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2006 16:17:00 -0000 --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--