>I want to write a program that will read from the ethernet card all the >packets addressed to it, and send the contents of the ethernet packet will >be an IP packet, if the LAN uses IP. ARP packets will be discarded) across >the internet using a usual socket.
tcpdump will get you all the packets of your network, irrespective of source or destination address. > >At the receiving end , a similar program recv's the IP packets and looks up >the ARP cache and finds the h/w address of the machine, whose IP address is >mentioned in the IP packet ,and sends packet to it after adding an eth hdr. > >My idea was to do some thing like tunnelling , *without going to the kernel >level*. I don't know to do kernel level coding, :-). > >Can any body tell me how to read and write correctly from the eth card. >Also , is my idea correct ? That is, if I read all the IP packets addressed >to the 2nd Lan, and send it to that Lan, via the internet, to a machine >where a similar program is also listening to the internet. This thread of >the program then writes the packet to the ethernet card, after adding the >necessary eth hdr( after looking up the ARP). >If i do so will I be able to ping , telnet , or ftp from one Lan's machine >to the other Lan's machine ? hping2 is a great utility, you can ping to any port any desitnation with any source address. Regards, Mukund Deshmukh Beta Computronics Pvt. Ltd. Web site - http://betacomp.com > >Can any body give me a simple tunneling progam , for achieving what is >described above? > >Thank you >Johnson Joseph > > >_______________________________________________ >linux-india-help mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/linux-india-help > _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
