Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attached gateways



On Tue, Jun 21, 2005, Chase <email@hidden> wrote:

>How can I found out (in C or at the commandline) what the gateway  
>address is that is attached to a particular interface on a multihomed  
>system?
>
>If en0 is attached to one gateway and en1 to another, how can I get  
>the address of each unique gateway at will?
>
>In other words, how would I answer the following question:  "What is  
>the address of the gateway G(X) attached to interface X ?"
>
>I need to know the C calls, but if all you know is how to do it at  
>the commandline, that will work, since I can look up the code for  
>that tool in the Darwin CVS tree.
>
>That said, if you know both ways, of course the C way would be a  
>shorter path for me to take.
>
>Thanks in advance for the help.
>
>- Chase

Have a look at Unix Network Programming, Vol 1 3rd ed (Stevens) chapters
17 and 18.

Mac OS X uses the sysctl mechanism described (with example code) in there.

Regards.....Peter

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden

References: 
 >attached gateways (From: Chase <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.