Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there any method to forward network(IP)packets using pcap.h header file .We are using libpcap and tcpdump Is there any method to do it or do we need to use another tool instead of libpcap.
well firstly a header is just a list of function names and variable. it doesn't do a single thing. if you wish to actually utilize libpcap as a whole, then that is, as the name suggest, for packet capture, not forwarding.
Well thank you for the details.
Do I need to use onather method to packet capturing
But how a linux machine would do it?I thought it was pcap.h file have necessory functions.
Please can you show me the way to do packet capturing.I really need to do it.
U can intergrate both sniffer and packet sending capability in a program. Or u can have separate programs - one for sending packets and one for sniffing. U can pass the packets captured and then pass then to the packet sending program (using sockets).
If you are only interested in packet forwarding, you can use IPTables that can redirect your traffic to another PC or network. There is also Ebtables (dnat target)..it depends on wat you are trying to do. Provide more details if u can..
Warm regards,
Visham
Last edited by vishamr2000; 02-28-2007 at 04:00 AM.
Plz can you give me some examples how to do this thing? or can you give me some codes that do the forwording(capturing and forwording)
plz help me I am structed in my program.
For the forwarding part, you'll have to provide some more info as I dont know the system you're putting in place or what you are trying to achieve. The solution will depend on what you want to achieve
Hi there,
thank you for the infomation.it is really worth.
Actually we design a software router using Linux operating systems besides the kernel routing method in Linux.
We are using Red hat Linux Enterprise edition 4.0 as our core operating system.
Actually we struck in the forwarding part.So plz help us to get on with the frowarding part.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.