Mach70803
asked on
Capturing a packet in Linux
Alright, I'm not sure if this is the right place for this but here it goes. I am working on a group project for my network security course. The basic concept is to encrypt/decrypt NFS data packets, but outside the kernel, i.e., capture the entire NFS packet, encrypt it, put encrypted data in another packet, decrypt it, and finally give it to the kernel on the other side. Now this is mostly a proof of concept project and I know it will be slow and a host of other things are wrong here. What I need to know is; how do I go about grabbing a packet from the network?
ASKER
Thanks for the info, but what I really needed to know was how I can utilize the libpcap and libpnet libraries provided by Linux, but using Java. Sorry for not being more specific.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
8-)
For a reference see
- http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html
- http://java.sun.com/j2se/1.4.2/docs/api/java/net/DatagramPacket.html
For an overview and samples see
- http://javaboutique.internet.com/resources/books/jpr/sample/42220502.htm
- http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets.html