Re: Connect to two network interfaces simultaneously?
Re: Connect to two network interfaces simultaneously?
- Subject: Re: Connect to two network interfaces simultaneously?
- From: Keary Suska <email@hidden>
- Date: Thu, 21 Sep 2006 16:57:22 -0600
- Thread-topic: Connect to two network interfaces simultaneously?
on 9/21/06 1:48 PM, email@hidden purportedly said:
> I have both en0 (wired) and en1 (wireless) network interfaces active
> on a MacBook, but I don't know how to specify one connect() call to
> go through en0, and another to go through en1. Programmatically, how
> does one "connect" to or use a specific network interface?
The network interface doesn't have as much to do with connections as the
higher level network protocols. E.g., if you are connecting over TCP/IP, the
interface used will depend on which network you are trying to connect to. I
am not sure how OS X determines which interface to use when more than one
interface connects to the same network (and same transport protocol), or
even if that situation is defined.
I believe there is a way to determine which interface a current connection
is using, but AFAIK from the perspective of a networking protocol only the
destination matters, and not necessarily what hardware was used to get
there.
You will probably have to dig into the BSD subsystem and/or kernel level
stuff to get your answer. You could dig into socket.h (man socket for some
info), but I don't think you'll find anything on interfaces there. You may
find additional info by googling libnetlink.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden