File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Similar Threads
Pinger time!
file transfer using datagram
UDP DatagramSocket not working on port forwarding
how to change ToS value of IP layer
I am sending my UDP but can not receive