From owner-freebsd-net@FreeBSD.ORG Wed Jul 9 05:01:30 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B300A21 for ; Wed, 9 Jul 2014 05:01:30 +0000 (UTC) Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4D852FFA for ; Wed, 9 Jul 2014 05:01:29 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id a108so5864019qge.4 for ; Tue, 08 Jul 2014 22:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=a2AtEN5CLDeAbMdja+5oJCEaO6ccQM8uXd9kBDGKwFg=; b=AL74gXMKw+2kEXDKayN4mS2sO1Hrc0YTM7pD30vPla4Pq4HIZEeYCXGPwaQmlUuTFF eR5vpW33vqMI0s9lD7DmiLKX1p5/G4Co/KCXeOwMPLQncoKmKpM8OrZULVbK815X7Elv roueVTZcaZv8IZvH6MRhXo9xvtInLa4FFxsClK1TthmCxtk/Ur6spFLQFdgnJpVfnu72 We08zAoq2HOmdxVonPkt7Up6GFIE1RbjdyFTg24go2STtPvIZxksizYXjrt7nxKXgKAO Yn9WkmxqFA5xx7MnRGB0F0RR41UdPOJbq5Q89PuUs4d8ZCND2V9FplEEpnZoDH8NvWEI q9TQ== MIME-Version: 1.0 X-Received: by 10.224.167.7 with SMTP id o7mr66160051qay.53.1404882088849; Tue, 08 Jul 2014 22:01:28 -0700 (PDT) Received: by 10.224.7.5 with HTTP; Tue, 8 Jul 2014 22:01:28 -0700 (PDT) Date: Wed, 9 Jul 2014 13:01:28 +0800 Message-ID: Subject: A question on modifying packet. From: Niu Zhixiong To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 05:01:30 -0000 Hi, all I have only one NIC. I want to capture packets from one certain ip address and change the both src and dst addresses and forward to other destination via the same NIC. It is possible? Is there any library to help me do this? Regards, Niu Zhixiong =EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF= =BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D kaiaixi@gmail.com