Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Neelesh Chitari
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic