• Post Reply Bookmark Topic Watch Topic
  • New Topic

raw socket handling  RSS feed

 
Sandip Dev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to java network programming. I am doing an internship where my job is to write a proxy in java that accepts a packet from a client, gives the user the option to edit the packet and then forwards it to the server. Now I know how to write data to sockets (from Head First Java) but it seems I will require more low level handling of sockets, probably getting all header information. I want to now what kind of features does Java provide for such low level packet handling.
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think Java currently supports this. Currently, I have been using a third party library called Jpcap which is a simple Java wrapper around the pcap library. You can receive packets, manipulate the packet header information and send the packet out with this library. It is fairly straightforward in learning to use it and is easy to install on most systems.

Note there is also a jpcap library( notice the case difference) this one can only receive packets. Jpcap can do both so is great for all sort of uses.

http://netresearch.ics.uci.edu/kfujii/jpcap/doc/
 
Sandip Dev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot....I will check it out
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!