Re: Different headers definitions between Kernel.framework and /usr/include/sys/socketvar.h
Re: Different headers definitions between Kernel.framework and /usr/include/sys/socketvar.h
- Subject: Re: Different headers definitions between Kernel.framework and /usr/include/sys/socketvar.h
- From: Justin Walker <email@hidden>
- Date: Mon, 17 Mar 2003 07:15:00 -0800
On Monday, Mar 17, 2003, at 02:18 US/Pacific, Stiphane Sudre wrote:
On Friday, March 14, 2003, at 06:16 PM, Justin Walker wrote:
On Friday, Mar 14, 2003, at 07:53 US/Pacific, Stiphane Sudre wrote:
SS_ISDISCONNECTED is not declared in Kernel.framework. Is it correct?
Incorrect. It is defined in <sys/socketvar.h>, which, on my system,
is in both the /usr/include and the Kernel.framework trees.
Ah, another crime made by the "Absolute Path bug" in PB. The Path to
Kernel.framework was pointing to the 10.1 headers in my project.
Side question: When you're first calling sendto/sendmsg, am I right
to believe the socket state is at more SS_PRIV?
I don't understand your question. The SS_PRIV bit is set at the time
the socket is created, and at no other time. It is *only* set if the
creating process is owned by root.
The reason for this question was to find if it was possible to know
from the socket state whether it was connected or not when a
sendto/sendmsg was called for a connection oriented communication.
The SS_CONNECTED bit tells you that. The SS_PRIV bit means the process
is "privileged".
From the xnu source code, I was only able to see that the SS_PRIV flag
was set in the sendto/sendit/socreate/etc. But some tests have shown
that the SS_ISCONNECTED, SS_NBIO or SS_ASYNC can be set too.
Correct.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Men are from Earth.
| Women are from Earth.
| Deal with it.
*--------------------------------------*-------------------------------*
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.