This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Sockets and Internet Protocols and the fly likes Setting the Type of Service (ToS) field in the IP header of a packet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Setting the Type of Service (ToS) field in the IP header of a packet" Watch "Setting the Type of Service (ToS) field in the IP header of a packet" New topic
Author

Setting the Type of Service (ToS) field in the IP header of a packet

Neelesh Chitari
Greenhorn

Joined: Jul 03, 2001
Posts: 3
Hi,
I am working on a Voice over IP project (PC to Phone).
I am packetising the audio data in a DatagramSocket and sending it over the net to the destination using UDP.
When I sniff the packets that are coming from the destination. I found that all of these packets have their Type of Service (ToS) field set to 14(Hex).
I also want to set the same field to the same number for my packets before sending them to the destination.
I lloked into the Java documents for the DatagramSocket class.
I did not find any API there that can set this field.
Actually thr reason may be that, the ToS field is a part of IP header of the packet.
My question is : How can I set the Type of Service(ToS) field in the IP header of a UDP packet through Java ? Is there any way to do it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting the Type of Service (ToS) field in the IP header of a packet