IntelliJ Java IDE
The moose likes Sockets and Internet Protocols and the fly likes capturing packets going through my system Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "capturing packets going through my system" Watch "capturing packets going through my system" New topic
Author

capturing packets going through my system

donepudi madhu
Greenhorn

Joined: Sep 25, 2002
Posts: 11
I want a java code to capture Packets sending and recieving by my system.
gautham kasinath
Ranch Hand

Joined: Dec 01, 2000
Posts: 583
Howdy!
Well, capturing packets going thru the system is called packet/network sniffing.
What happens is that you need to directly access the network buffer and read the packets before the network card rejects the packet based on the destination mismatch.
This is possible thru C/C++, but I wonder if any *Java* code will do that for you.
Try and locate an c/c++ library that does it and write a c wrapper to the library. Then write a JNI wrapper to the *c-wrapper* and use java to do the needful for you.
As for searching for the library, my guess it that there must be some available, free for Linux.
Cheers
Lupo


"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
Vivek Viswanathan
Ranch Hand

Joined: Mar 03, 2001
Posts: 350
There is something avalaible for linux, incase u subscribe for PCQuest it is avaliable in the Dec 02 Issue. I dont remember the name....sorry


Vivek Viswanathan SCJP 1.2, SCJP 1.6,SCJD,SCEA,SCWCD,IBM-484,IBM-486,IBM-141,Ms.NET C# 70-316,SCMAD, LPIC-I
Varun Nambuthiri
Greenhorn

Joined: Sep 20, 2010
Posts: 27
You can Use Jpcap
 
IntelliJ Java IDE
 
subject: capturing packets going through my system
 
Threads others viewed
Raw Socket In Java
Missing UDP Packets
Getting packets
Problem wit UIL ??
Regular expression to take integers out of a string
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture