views:

105

answers:

2

I found Jpcap, however it only meets half my requirements - it does not allow me to block packets, as stated in the FAQ. I would prefer a cross-platform (Windows, Mac, Linux) solution, but if one does not exist, OS-specific solutions would be acceptable.

My goal is to, under certain conditions, block access to certain Internet and network resources by finding out where the packets are going and blocking the ones that meet specific criteria, regardless of how the resource was accessed. Perhaps I'm going about this the wrong way, so any advice would be appreciated.

+2  A: 

My goal is to ... block access to certain Internet and network resources by ... blocking [packets] that meet specific criteria, regardless of how the resource was accessed.

that's only doable in the kernel, and as such is completely platform-specific.

just somebody
It looks like you are right and there is no single wrapper around all of the platform-specific operations. However, I'm hesitant to accept this answer right now - I'm continuing to verify this, but the more I search, the more right this is looking.
Thomas Owens
A: 

There is also the libpcap, but I'm not sure it will exactly do what you're looking for ...

according to the sourceforce page:

libpcap is a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring. Applications includenetwork statistics collection, security monitoring, network debugging, etc.

Sylvain