|
-
April 25th, 2005, 12:41 AM
#1
Changing TOS in IP Header in c++
Hi,
I am trying to write a program in c++ that can change the value of the TOS field in the IP header. Can this be done using any of the classes in winsock API?
The program I am building is a traffic generator for testing another program. This traffic generator has to send IP packets with different TOS for receiving different services. and testing the main program's working. Can anyuone help please?
-
April 25th, 2005, 02:01 AM
#2
Re: Changing TOS in IP Header in c++
you can use setsockopt() for this.
However, there are some restrictions:
- on W2K, look here http://support.microsoft.com/default...b;en-us;248611
- on WinXP, this does not work. You need to create a socket with WSASocket and provide a flowspec found with WSAEnumProtocols() that supports QoS (flag XP1_QOS_SUPPORTED).
HTH
Richard
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|