• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Communicating on Specific Ethernet ports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Communicating on Specific Ethernet ports


  • Subject: Re: Communicating on Specific Ethernet ports
  • From: Quinn <email@hidden>
  • Date: Mon, 25 Oct 2004 10:06:05 +0100

At 12:29 +0100 21/10/04, Mark Thomas wrote:
  I'm trying to work out whether its possible if I can send out some TCP/IP
traffic on a specific Ethernet device. I think this is possible using OT via
something like

OTOpenEndpointInContext(OTCreateConfiguration(PortRecord.fPortName), ...

This has never worked for TCP/IP endpoints in Open Transport. It kinda works that way for AppleTalk on traditional Mac OS, but not for TCP/IP.


I'm wondering what happens if this port isn't selected/checked in the list
of ports in the network configuration system preference's panel. Would it
still allow traffic through it ???.

For a start, there's no way to send and receive TCP/IP from a port without enabling it via System Configuration framework (which is what the Network preferences panel is implemented in terms of). The act of enabling the port is what causes the IP configuration agent to run against the port; that, in turn, is what causes the port to be assigned an IP address. Without an IP address, you have no IP configuration.


So, if you want to use TCP/IP to communicate over a port that the user hasn't already enabled, you will have to write code to enable it.

Once the port is enabled you can bind to its specific IP address and then all traffic you send will have that address as its source address. However, it's not guaranteed to be sent via that port. The traffic is still subject to the standard routine algorithm. In a default Mac OS X install that algorithm is:

1. If we have a port whose subnet contains the destination address, send it out that port.

2. Otherwise send it out the default port (which is the first active port with an real IP address; the ordering is defined in System Configuration).

It's possible to monkey with this algorithm, although it's not something that I'd recommend.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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


References: 
 >Communicating on Specific Ethernet ports (From: Mark Thomas <email@hidden>)

  • Prev by Date: USB-To-Ethernet Driver
  • Next by Date: Orderly disconnecting using PowerPlant networking classes
  • Previous by thread: Communicating on Specific Ethernet ports
  • Next by thread: MoreSCF fails horribly if the Automatic location is removed
  • Index(es):
    • Date
    • Thread