uarcho
04-15-2003, 01:32 PM
Hello!
I'm writing a NAT router in c under linux(knoppix).In order to do this I sniff packets from ETH0 and sending to PPP0 with source address changed (a sort of ip masquerading). To send on PPP0 I use the "struct sockaddr_ll" defined in "if_packet.h" and the sendto socket function. This function return the correct number of bytes send, but nothing is sended on the link. Infact if I run "ETHEREAL" on the same machine from which I try to send the packet, it correctly sniffs the packet on PPP0;but on the otherside of the null-modem link nothing arrive.So I look at "/proc/net/dev" I found that the packet are dropped during transmission...
Can someone tell me why?
Thanks in advance
P.s.=the machines correctly ping each other
I'm writing a NAT router in c under linux(knoppix).In order to do this I sniff packets from ETH0 and sending to PPP0 with source address changed (a sort of ip masquerading). To send on PPP0 I use the "struct sockaddr_ll" defined in "if_packet.h" and the sendto socket function. This function return the correct number of bytes send, but nothing is sended on the link. Infact if I run "ETHEREAL" on the same machine from which I try to send the packet, it correctly sniffs the packet on PPP0;but on the otherside of the null-modem link nothing arrive.So I look at "/proc/net/dev" I found that the packet are dropped during transmission...
Can someone tell me why?
Thanks in advance
P.s.=the machines correctly ping each other