From owner-freebsd-net@FreeBSD.ORG Wed Jun 6 07:20:41 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 479A0106564A; Wed, 6 Jun 2012 07:20:41 +0000 (UTC) (envelope-from Michael.Tuexen@lurchi.franken.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id D4E758FC1B; Wed, 6 Jun 2012 07:20:40 +0000 (UTC) Received: from [192.168.1.103] (p508FA25E.dip.t-dialin.net [80.143.162.94]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 792A41C0C0BD8; Wed, 6 Jun 2012 09:20:38 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Michael Tuexen In-Reply-To: Date: Wed, 6 Jun 2012 09:20:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5A4A73CF-95FB-4B33-9652-2E4FD517CF5F@lurchi.franken.de> References: <1D03F00E-2777-4B0B-8E1C-860EA115B6AF@lurchi.franken.de> <7731AEE8-D1BF-4297-8F75-454149D3E303@lurchi.franken.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1278) Cc: "freebsd-net@freebsd.org mailing list" Subject: Re: IP_RECVTOS X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 07:20:41 -0000 On Jun 6, 2012, at 8:50 AM, Adrian Chadd wrote: > On 5 June 2012 15:11, Michael Tuexen = wrote: >=20 >> Why should it get lost? If there are no objections, I'll commit it. = If there >> are, we'll see if we can resolve it. >=20 > Oh sweet, you can do that? Yes, I really would like to see this > particular feature in FreeBSD. >=20 > Thanks so much for coding it up! >=20 > Do you think it's worth adding an example or two which uses this? Not sure how to add an example, but I've also a paragraph going into man ip: If the IP_RECVTOS option is enabled on a SOCK_DGRAM socket, the recvmsg(2) call will return the IP TOS (type of service) field for = a UDP datagram. The msg_control field in the msghdr structure points to = a buffer that contains a cmsghdr structure followed by the TOS. The = cms- ghdr fields have the following values: cmsg_len =3D CMSG_LEN(sizeof(u_char)) cmsg_level =3D IPPROTO_IP cmsg_type =3D IP_RECVTOS Best regards Michael >=20 >=20 >=20 > Adrian >=20