Setting ToS/Diffserv byte?
I found some sample code on setting the ToS byte of an IP packet that you are sending out in C#, but can't seem to get it to work. What I have is very simple:
As you can see, I've tried this with both TCP and UDP. But when I view the traffic that gets sent out in wireshark, the diffserve byte is always 0. I can see that the payload is filled with what I set buf too, so I know I'm looking at my packet. Am I missing something?
public static void Main(string args)
Console.WriteLine("Testing DSCP packet marking.Wireshark should already be running!\n");
UdpClient cli = new UdpClient();
//TcpClient cli = new TcpClient();
byte buf = new byte;
//I fill buff here
/*NetworkStream mystream = cli.GetStream();
if (mystream != null)
mystream.Write(buf, 0, buf.Length);