Re: Socket owner
Re: Socket owner
- Subject: Re: Socket owner
- From: "Peter Lovell" <email@hidden>
- Date: Mon, 12 Jan 2004 19:48:11 -0500
>
Hi,
>
>
I have a question about determining the owner of a socket. By owner I mean
>
the process that created it. If I am looking at a socket structure via an
>
NKE, is there a way I can determine the process ID of the process that
>
generated it?
>
>
>
Thanks in advance,
>
>
>
Eric
HI Eric,
yes you can but only at the time the socket is created. It's a "non-
supported" access to kernel structures, though and may change in the future.
Note that the accessor of the socket may change later, if it's being
passed around.
pid = current_proc()->p_pid;
Cheers.....Peter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.