Re: How to get a socket's PID ?
Re: How to get a socket's PID ?
- Subject: Re: How to get a socket's PID ?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 12 Jan 2010 18:27:54 +0100
Le 12 janv. 2010 à 18:18, Matthew Mashyna a écrit :
> I'm working on a project that attempts to monitor some net activity. I'm using libpcap to watch http packets on port 80, for instance. When we see a particular type of http header we want to see what application made the request. pcap will give me the packet, socket, to and from addresses and more.
>
> I know I can use lsof but that might not be fast enough. I'm looking for a way to do it in C or ObjC.
>
I don't think this is possible without privilege (and I don't know how to do it either), but as you mention lsof, why did you not download lsof source and look how it does it ?
-- Jean-Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden