Can I create on Java monitoring program of network traffic? The program must control all network traffic which goes from computer program (including OS modules) to Network driver and back. If yes, How?
NOTE:
I want not only to monitor traffic also to control it. I want to implement such system on windows NT. It cannot be fulfilled o purely on Java. How can I perform it with the help of JNI?
Or maybe another variant. I am not acquaint with windows services, but still. I will write a program on C++ and register it as windows service. Then I call from my Java application this service (I don't know how to do this) and request network traffic. On the C++ program part all the traffic will be blocked if there is no Java program (or it doesn't request traffic); on the other way transmitted to this program. May be the java part can be implemented and work on an Java server (Glass Fish, JBoss). The C++ part in turn will transmit traffic to localhost.
What do you think about these ways?
When "monitoring of network traffic" then pcap, I'd say.
Googling "pcap java" brought me that as first hit: jNetPcap.
Did not test it, but pcap is the standard solution for native C programs. Cannot tell if the Java wrapper is good, but at least its website looks nice. ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With