Re: Writing a virtual network interface
Re: Writing a virtual network interface
- Subject: Re: Writing a virtual network interface
- From: Josh Graessley <email@hidden>
- Date: Fri, 16 Feb 2007 15:41:00 -0800
Manually updating the routing tables will work for testing but it
should not be shipped as a product. Mac OS Xs handling of dynamic
environments relies on a number of configd plug-ins (Configuration
Agents) working together. If you manually change the routes yourself,
you go behind the Configuration Agents back. That can lead to a
number of problems. The whole dynamic store/configd plug-in mechanism
is, in my opinion, a pretty elegant solution. It takes a bit of time
to get a feel for it, but once you get past that, it is pretty neat.
The following helped me get up to speed on how all of this stuff ties
together:
<http://developer.apple.com/documentation/Networking/Conceptual/
SystemConfigFrameworks/SC_UnderstandSchema/chapter_4_section_3.html#//
apple_ref/doc/uid/TP40001065-CH203-CHDDEDFJ>
-josh
On Feb 16, 2007, at 3:29 PM, Tom Marchand wrote:
Since the interface can be seen ifconfig, would manually updating
the routing tables using route work?
On Feb 16, 2007, at 1:02 PM, Josh Graessley wrote:
The network preference pane doesn't work for interface types it
does not know about. I believe you have to write your own utility
or preference pane for handling your interfaces.
You will need to use the SystemConfiguration framework to add a
service for your interface and put that in the list of active
services. I believe the service will appear in the network
preference pane so the order can be adjusted but the service
itself can not be modified there. If you haven't already done so,
I would suggest filing a bug. If it is an option to you, I'd
contact DTS too.
You may also need some piece of code that runs when your interface
is configured to push state in to the dynamic store. The system
will use the DNS settings and default gateway out of that state to
pick the systems DNS settings and default gateway in the event the
service on your interface is the highest priority active service.
I may be mixing up the terminology a bit. Hopefully this will give
you enough clues to get you started. I don't know where sample
code for this appears of the top of my head, perhaps someone else
can chime in.
Read up on the SystemConfiguration framework.
-josh
On Feb 16, 2007, at 1:41 AM, Eyal Redler wrote:
Thing is, it doesn't show there. I will also need to to this
programmatically.
Note that this is not a IOKit driver, just a NKE. Is there a way
to this?
TIA
On Feb 16, 2007, at 1:45, Tom Marchand wrote:
Go to the Network System Preferences and drag the your interface
to the top of the list.
On Feb 15, 2007, at 1:59 PM, Eyal Redler wrote:
Hi,
I'd like to write a virtual network interface using the
interface KPI (as described in "Network Kernel Extensions
Programming Guide").
I wrote a dummy interface that just logs that packets it
receives and I can see my interface with ifconfig after
kextloading it but I have no idea how to make my interface the
default (I'm not sure if this is the right terminology, I mean:
how do I make the system use this interface for ip traffic).
I'd appreciate any pointers on the subject.
TIA
Eyal
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40netvision.net.il
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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