I'm trying to set the DSCP field in the header of a UDP packet in Java, like so:
bcSock = new DatagramSocket(port, address);
bcSock.setTrafficClass(0xE0);
However, when looking at the packets with Wireshark, it shows the DSCP byte as 0x00.
I tried adding this to the "VM Options" (but it didn't help):
-Djava.net.preferIPv4Stack=true
I'm running the application on OS X 10.10.2
Any ideas how to set DSCP byte? Or any other way to set packet priority (or QoS) using Java?
Thanks for your thoughts & help.