Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jan 2007
Problem Setting ToS field in the IP header using Fedora 4
I am using Enterprise Linux & Fedora Core 4. Two machines are connected via a linksys WRT54G router.
I used Java to socket program one machine (server) which modifies the ToS field in the IP header and then send out the packet to the other machine (client). However, using Wireshark to capture the packets at both the server and the client, I found out that the ToS (DSCP) field of all packets are always 0x00 (I suspect that the Kernel has unset the ToS values after I set them). Below is the piece of the relevant Java code that I have used to set the TOS:
int PacketSize = 1400; int TOS = 3; packet = new DatagramPacket(outputBuf, PacketSize, address, port); serverSocket.setTrafficClass(TOS); serverSocket.send(packet);