Subject: Re: DSCP values in TCP handshake

From: Stephen Hemminger <[email-masked]>
Date: Mon, 18 Apr 2011 08:38:27 -0700

On Mon, 18 Apr 2011 16:05:12 +0200
Eric Dumazet <[email-masked]> wrote:

> Le lundi 18 avril 2011 à 13:48 +0000, Joe Buehler a écrit :
> > What does the LINUX network code put in the DSCP field of TCP SYN-ACK packets
> > that are replies to a SYN connection request?  I have a customer sending SYN
> > with 0x2e in the DSCP field but apparently getting DSCP 0x0 in the reply.
> 
> The other way (server->client) is depending on application and listener
> only.
> 
> If it uses a standard socket, standard bind() + listen(), TOS is 0

If you want to set DSCP in the response, the application needs to apply
set it on the listening socket. 
   dscp = 0x2e;
   setsockopt(s, IPPROTO_IP, IP_TOS, &dscp, sizeof(dscp));