Subject: [Ecn-in-quic] Darwin issue with setting ECN/DCSP via sendmsg

From: "Eggert, Lars" <[email-masked]>
Date: Wed, 29 Nov 2017 14:35:03 +0000

Hi,

sorry for abusing this list. In order to play with ECN and QUIC, I've added support for being able to set ECN (and DSCP) fields on the UDP packets I generate.

The good news is that the socket option calls to set the default for a socket are exactly the same on Linux, FreeBSD and Darwin, and it works on all platforms.

The other good news is that receiving per-packet ECN (and DSCP) information on inbound packets received via recvmsg/recvmmsg is almost identical on all three platforms (Linux uses a slightly different option name than the other two), and it also works everywhere.

Sending packets with per-packet ECN (and DCSP) information by initializing "struct cmsghdr" information for sendmsg/sendmmsg also uses the same API on all three platforms. However, it only seems to work on Linux and FreeBSD.

On Darwin, there is no error, but the outbound packets are *not* marked as indicated in the accompanying "struct cmsghdr".

In case this is of interest to anyone.

Lars

---

From: Ingemar Johansson S <[email-masked]>
Date: Wed, 29 Nov 2017 14:39:56 +0000

Thanks Lars, and we definitely need more mailing list abuse like this 😊

/Ingemar

> -----Original Message-----
> From: Ecn-in-quic [mailto:[email-masked]] On Behalf Of
> Eggert, Lars
> Sent: den 29 november 2017 15:35
> To: [email-masked]; Stuart Cheshire <[email-masked]>
> Subject: [Ecn-in-quic] Darwin issue with setting ECN/DCSP via sendmsg
> 
> Hi,
> 
> sorry for abusing this list. In order to play with ECN and QUIC, I've added
> support for being able to set ECN (and DSCP) fields on the UDP packets I
> generate.
> 
> The good news is that the socket option calls to set the default for a socket
> are exactly the same on Linux, FreeBSD and Darwin, and it works on all
> platforms.
> 
> The other good news is that receiving per-packet ECN (and DSCP)
> information on inbound packets received via recvmsg/recvmmsg is almost
> identical on all three platforms (Linux uses a slightly different option name
> than the other two), and it also works everywhere.
> 
> Sending packets with per-packet ECN (and DCSP) information by initializing
> "struct cmsghdr" information for sendmsg/sendmmsg also uses the same
> API on all three platforms. However, it only seems to work on Linux and
> FreeBSD.
> 
> On Darwin, there is no error, but the outbound packets are *not* marked as
> indicated in the accompanying "struct cmsghdr".
>