Re: A question on modifying packet.

2014-07-09 Thread Niu Zhixiong
Sry, The problem is that I receive the packet from this NIC and send this packet via the same NIC? Does netmap can help me? Regards, Niu Zhixiong --- kaia...@gmail.com On Thu, Jul 10, 2014 at 1:47 AM, Sami Halabi wrote: > use netgraph. > In theory it should work.. in practice It w

Re: A question on modifying packet.

2014-07-09 Thread Sami Halabi
use netgraph. In theory it should work.. in practice It worked for me once, but couldn't repeat the success. See ng_patch. Here is the code i tried: kldload ng_patch kldload ng_ipfw /usr/sbin/ngctl -f- << SEQ mkpeer ipfw: patch 300 in name ipfw:300 src_dst_chg

Re: A question on modifying packet.

2014-07-09 Thread Julian Elischer
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, bu

A question on modifying packet.

2014-07-08 Thread Niu Zhixiong
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 --- kaia...@gmail.com ___