hi, On 7/3/06, Rajesh Mahajan <rajeshmahajan09@xxxxxxxxx> wrote:
Study Iptables DNAT On 7/1/06, Vivek Balakrishnan <vivek.balakrishnan@xxxxxxxxx> wrote: > > I am new to network programming. I am trying to build a module that would change the destination address of a packet (after checking whether it was destined for a particular IP). > But I do not know what things to consider and how to go about it. > If anyone has any sample code or procedure and functions to study, I would greatly appreciate it.
You need to go thru' first nat code written under netfilter directory, /usr/src/linux/net/ipv4/netfilter. There you will get ip_nat_rule.c where DNAT handling is written. Read that. Regards, Parag. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/