[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting IP_TOS (and IPPROTO_IP vs. SOL_IP)

From: Ralf Wildenhues
Subject: Re: Detecting IP_TOS (and IPPROTO_IP vs. SOL_IP)
Date: Fri, 26 Mar 2010 20:51:58 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello Philip,

* Philip A. Prindeville wrote on Mon, Mar 22, 2010 at 08:42:51AM CET:
> Calling the sequence:
> setsockopt(fd, XXXX, IP_TOS, &foo, sizeof(foo));
> can be tricky.  Linux uses SOL_IP for XXXX, whereas Solaris and BSD use
> IPPROTO_IP for this instead.
> Not sure what MacOS or HP-UX do.
> Do the newer versions of autoconf have canned code for detecting what to
> use?


My version of Linux defines both SOL_IP and IPPROTO_IP to the same
value.  Since changing it would seem to break the API, I *think*
if looking at Linux alone you should be able to just go with IPPROTO_IP.
Untested, you get to keep the pieces if it breaks.

> And if not, can someone please add it?
> I just grepped the 2.65 tarball but didn't find anything in there.

Generally, for such issues it might be a good idea to just use gnulib if
you can; but I just looked and it doesn't address this particular issue


reply via email to

[Prev in Thread] Current Thread [Next in Thread]