Date: Wed, 27 Mar 2013 12:20:01 GMT From: Michael Tuexen <tuexen@freebsd.org> To: freebsd-net@FreeBSD.org Subject: Re: kern/177362: [netinet] [patch] Wrong control used to return TOS Message-ID: <201303271220.r2RCK1tW078943@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/177362; it has been noted by GNATS. From: Michael Tuexen <tuexen@freebsd.org> To: Mark Andrews <marka@isc.org> Cc: bug-followup@FreeBSD.org Subject: Re: kern/177362: [netinet] [patch] Wrong control used to return TOS Date: Wed, 27 Mar 2013 13:16:30 +0100 On Mar 27, 2013, at 12:54 PM, Mark Andrews wrote: >=20 > In message <25EB2335-645C-42ED-B90A-6D07A33280DB@freebsd.org>, Michael = Tuexen w > rites: >> It was not done by accident. The returned cmsg_type is IP_RECVTOS = instead=20 >> of IP_TOS to keep it consistent with the handling of the IP_RECVTTL = socket=20 >> option. >> I found it more important to be consistent within the same protocol = family >> than across different ones. >> I think that unfortunately IP_RECVTOS is not defined in any standard. >>=20 >> Best regards >> Michael >=20 > And Linux uses IP_TOS to return the value. ... which is consistent with the IP_RECVTTL socket option on Linux, = where it returns a cmsg with cmsg_type IP_TTL, which is also different from how this is = handled in FreeBSD. I think Solaris uses for IPv4 socket options the same cmsg_type as the optname for the socket option to enable the reception of the = cmsg. So it looks like there is no standard here, Linux, FreeBSD and Solaris are each consistent with itself, but Linux does it differently from FreeBSD and Solaris. Best regards Michael >=20 > --=20 > Mark Andrews, ISC > 1 Seymour St., Dundas Valley, NSW 2117, Australia > PHONE: +61 2 9871 4742 INTERNET: marka@isc.org >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303271220.r2RCK1tW078943>