LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   packet capture and modification (https://www.linuxquestions.org/questions/programming-9/packet-capture-and-modification-419850/)

mimithebrain 02-26-2006 04:54 PM

packet capture and modification
 
Where should I look, or what library should I use to create a program in C that would capture packets, and be able to modify them, drop packets, or forward them?


Thanks :)

oulevon 02-26-2006 06:40 PM

To capture packets, take a look at libpcap.

mimithebrain 02-26-2006 06:41 PM

would it permit me to alter the packets?

mimithebrain 03-13-2006 06:15 PM

Let me rephrase my question:
How can I drop, forward, and otherwise intercept packets?

I want to make a program that would intercept packets, and when it sees the need, it could drop those packets, forward them, modify them, and do all sorts of things to those packets.

thanks

primo 03-13-2006 08:34 PM

Take a look at www.netfilter.org. The best way to intercept/modify packets would be at the linux kernel with the netfilter API, unless you wanna reinvent the wheel and do it with libpcap/libnet with forwarding disabled so you must do all the routing stuff too.

mimithebrain 03-13-2006 09:00 PM

thanks! that's the answer I was looking for!

thanks primo :D


All times are GMT -5. The time now is 11:04 AM.