Re: Help needed in Writing network usage monitor application
Re: Help needed in Writing network usage monitor application
- Subject: Re: Help needed in Writing network usage monitor application
- From: Todd Heberlein <email@hidden>
- Date: Wed, 18 Nov 2009 09:54:54 -0800
> What APIs/library/Technology we should use that notifies us about network
> usages and also provides us with the data being transmitted.
>
> I have look in libpcap that pretty much gives the packets but i dont know
> how much it helps in notification kind of things.
I don't think there are any Cocoa-specific things that could help, so you may want to look at other mailing lists (the moderators try very hard to keep this mailing list just for Cocoa questions).
The libpcap library can capture traffic from all your network interfaces, but I think you will need to open up a separate tap for each interface. The data will be raw packets, pretty much the same thing a network monitor would see, so you will have to parse the data. Fortunately most protocols are well documented and there are lots of code examples out there, but you may need to handle a lot of different cases such as duplicate packets. This would not allow you to map the traffic to a specific process, however, and certainly not to a specific element thread or sub-object (e.g., the browser window or tab) associated with the traffic. This gets even more complicated if you are running virtual machines on your system.
If the traffic is encrypted (e.g., encrypted web, encrypted IMAP traffic, SSL tunnels, VPNs, etc.), then you are pretty much hosed as far as content analysis goes.
Todd
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden