Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Location
    UK
    Posts
    3

    Problem Setting ToS field in the IP header using Fedora 4


    Hi all,

    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:

    Code:
                            
     int PacketSize = 1400;
     int TOS = 3;
     packet = new DatagramPacket(outputBuf, PacketSize, address, port);
     serverSocket.setTrafficClass(TOS);
     serverSocket.send(packet);
    While previously, I tried the exact settings with Red Hat 9 machines, and there was no problem in setting the TOS values, but now I could not switch everything back to Red Hat 9. Do you have any idea as why this is happening? Thanks very much in advance!

  2. #2
    Just Joined!
    Join Date
    Jan 2007
    Location
    UK
    Posts
    3
    any help will be highly appreciated, I have been struggling here for a long time. Thansk guys!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •