• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Socket owner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Socket owner (From: Eric Long <email@hidden>)

  • Prev by Date: Re: Socket owner
  • Next by Date: Basic Question: Internet Content Filter
  • Previous by thread: Re: Socket owner
  • Next by thread: Basic Question: Internet Content Filter
  • Index(es):
    • Date
    • Thread