Re: Tracking network traffic
Re: Tracking network traffic
- Subject: Re: Tracking network traffic
- From: Vincent Lubet <email@hidden>
- Date: Tue, 3 Jun 2008 13:41:24 -0700
Peter,
On Jun 3, 2008, at 1:13 PM, Peter Sichel wrote:
I read a similar warning recently about using Sysctl to access
kernel data structures such as the TCP PCB list. Is this also
considered private? Notice sysctl() is a common UNIX paradigm found
in Stevens "UNIX Network Programming".
If Sysctl() access to kernel data structures is also considered
private, what is the supported API to retrieve protocol and
connection statistics? [netstat?]
I'd appreciate any clarification around this.
This is a tougher one to call as you pointed out that sysctl(3) is a
public API. They are parts of the sysctl variable subtree that are not
really for normal use.
Speaking for the networking sysctl sub-tree -- net.x.y -- we have kept
the data structures like the TCP PCB list backward compatible to I
think Mac OS X 10.3 Jaguar. This is done copying fields of the actual
kernel data structures into compatible version of the data structures
for userland consumption.
This copying is not very efficient and tends to bloat the OS. That's
why from time to time Apple obsolete some older API in new version of
the OS.
Vincent
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden