[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tos not marked for fragmented packets.

Hi Leo,

> I have read a message you have posted on Linux DiffServ 
> group regarding the TOS fields not being marked for the
> fragmented packets.  I am also having the same problem. 
> I have read Jamal's reply, but i don't know how to set 
> explicit setsockopt for the differnet streams (i also
> assume that by setting the sockopt, we indirectly also
> set the TOS field?).  Could you please help me on this?

There are options in setsockopt which are not available when you read the
man pages that let you set the TOS value. I set the TOS value in my
application using it after which I noticed that the fragments were also
marked with the correct TOS value.

For these extra options refer "Network Programming" Volume-I by Richard
Stevens page 178, Figure 7.1 in section 7.3. There is a complete list of
socket options for getsockopt and setsockopt.

int setsockopt(int sockfd, int level, int optname, const void *optval,
               socklen_t optlen);

Of your interest will be

level = IPPROTO_IP
optname = IP_TOS
Set the TOS value to the DSCP you want and you will notice that the
fragments are marked too. 

Muneyb Minhazuddin - Telecommunications Research Engineer    
CSIRO Telecommunication and Industrial Physics                
Marsfield, NSW, Australia.                                    
Phone no. : 61 2 9372 4113
FAX       : 61 2 9372 4490          
e-mail    : mminhazu@tip.csiro.au  
Home Page : http://www.tip.csiro.au/~mminhazu