On Tue, May 11, 2010 at 5:25 PM, WANGRUNGVICHAISRI, SHIVESH <[email protected]> wrote: > Hi, > > > > If I want to write an application that prevents any TCP packets from > being sent to a localhost web server, may I use libpcap for this > purpose? > > > > To put the question differently, is libpcap: > > > > 1) an observer of the packet traffic (not what I'm looking for, > since packets will still be sent to the localhost web server). > > 2) or does it actually sit in between all packet traffic? (this is > what I'm looking for since I can then drop the packets that I want to > drop). > > > > Thank you for your kind attention, >
Look at libdnet. It has a cross platform API to modify the firewall rules on various OS's to drop packets. -- Aaron Turner http://synfin.net/ Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero" - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
