From owner-freebsd-questions Mon Jan 28 20:59:44 2002 Delivered-To: freebsd-questions@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 34EBF37B402 for ; Mon, 28 Jan 2002 20:59:42 -0800 (PST) Received: from pool0329.cvx21-bradley.dialup.earthlink.net ([209.179.193.74] helo=hork) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16VQMr-0002jN-00; Mon, 28 Jan 2002 20:59:38 -0800 Received: from molotov by hork with local (Exim 3.33 #1 (Debian)) id 16VQO3-000662-00; Mon, 28 Jan 2002 21:00:51 -0800 Date: Mon, 28 Jan 2002 21:00:51 -0800 From: csr6702@rit.edu To: freebsd-questions@freebsd.org Subject: BSD setsockopt(2), IP_RECVTOS? Message-ID: <20020129050051.GA23387@hork> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I've got a question about BSD's setsockopt(2) call. I'm porting an application from Linux to BSD, and am running into what appears to be an incompatibility.=20 In Linux, there is a socket option to pass the incoming TOS on packets when using the recvmsg(2) call. This is documented in ip(7). This is similar to the IP_RECVDSTADDR option under BSD, passing the message in via cmsg(3). In fact, under Linux, its called IP_RECVTOS. According to the headers and the man pages, there is no IP_RECVTOS option in FreeBSD. So, this leaves me with the question, how can I find the TOS on an incoming IP packet without using a RAW socket? =20 I'm hoping to implement this in a portable way, rather than having different functionality for Linux and BSD. Any advise/info would be appreciated. Thanks in advance, Chris Ruvolo PS: please CC: me on reply. I'm not subscribed to the list. Thanks. --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8ViyDKO6EG1hc77ERAgegAKD+ojjkyNVxFgidBh5tMI5F7Nin+ACglQCG wmpOo6J1N1E/FgOJfmNqO4c= =On+9 -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message