Re: How to find BSD name for PPP interface
Re: How to find BSD name for PPP interface
- Subject: Re: How to find BSD name for PPP interface
- From: "Peter Sichel" <email@hidden>
- Date: Mon, 29 Jan 2007 11:20:27 -0500
On 1/29/07, Allan Nathanson wrote:
>When active, look in the State:/Network/Service/<serviceID>/IPv4
>entity. There, you should find an
>"InterfaceName" (kSCPropInterfaceName) key whose value is the
>interface name associated with the service.
Thanks for your quick response. If I understand, the InterfaceName is
not known until PPP connects and may change from one connection to the next.
The problem I want to resolve is how to present the user with a
configuration option to specify which interface(s) to apply some
attributes to using an NKE. Since the BSD device name may be unknown
until the user connects, any configuration to be applied needs to be
associated with some other description of the interface.
When my program detects that a new data link has appeared by listening
for the kernel event notification, I then need to figure out whether to
attach my NKE to that interface, and what attributes to apply.
So if the kernel informs me that a device named "ppp1" has appeared
(KEV_DL_IF_ATTACHED), I could then walk the list of serviceIDs to see
which (if any) was associated with that device.
What unique name would you suggest I present to the user to associate
their configuration with that interface when it appears? Should I use
the kSCPropUserDefinedName for that serviceID?
Will this normally exist and be unique? What if the user creates a data
link using some BSD tool directly (like "tun0")? Will this create a
State:/Network/Service/<serviceID>/IPv4 entity with some user
recognizable name?
Thanks,
- Peter
_______________________________________________
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