From owner-freebsd-net@FreeBSD.ORG Wed Jul 9 16:51:45 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 880E85A8 for ; Wed, 9 Jul 2014 16:51:45 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 59E822245 for ; Wed, 9 Jul 2014 16:51:45 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-250-191.lns20.per2.internode.on.net [121.45.250.191]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id s69Gpf5h055062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 9 Jul 2014 09:51:43 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <53BD7317.9030008@freebsd.org> Date: Thu, 10 Jul 2014 00:51:35 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Niu Zhixiong , freebsd-net@freebsd.org Subject: Re: A question on modifying packet. References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 16:51:45 -0000 On 7/9/14, 1:01 PM, Niu Zhixiong wrote: > 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? there is no library, but look at how natd does this using divert sockets. > > > Regards, > Niu Zhixiong > --------------- > kaiaixi@gmail.com > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >