Accessing and editing packets of other applications
I am new to programming for Linux. I want to build an application which allows me to capture/see all packets emanating from my system (any process) and make changes to them and perhaps even drop them. Similarly when the system recieves a packet for some application, it should first come to me and then i can make changes to it and then hand it over to the application.
As i said i am new to this. I am using Fedora Core 4. I have got my networking basics done and have also started doing some basic socket programming using C++. I would be grateful if some one can tell me how should i approach my problem.
I have had a look at libpcap and libnet but they dont tell me how i can access packets coming to my system and change them. I can access packets or actually just view them, how can i make actual changes to the packets flowing across?
Thanks in advance and looking forward to any kind of help.