• 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: Discovering the default gateway address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Discovering the default gateway address


  • Subject: Re: Discovering the default gateway address
  • From: Kay Roepke <email@hidden>
  • Date: Sun, 4 Feb 2007 12:46:28 +0100


On Feb 4, 2007, at 12:09 PM, Finlay Dobbie wrote:

I meant to word that with the connotation of a programmatic API for
reading say, the actual routing tables that the underlying kernel
uses to route, similar to the sysctl(3) options available, since I'm
not 100% clear on how tied together the System Configuration
framework is to the unix underpinnings of sysct(3).

I think you can safely assume that the current state that System Configuration returns to you is an accurate representation of the truth. Otherwise, things will be very broken.

I second that. IMHO the best way to go about is System Configuration, although
it is a bit low-level (I'd probably just use NSTask and scutil, since that's easy
to do). If you don't want to rely on the external program, read scutil's source or
use BSD calls.


See <x-man-page://4/route> for details on how retrieve information from the kernel's
routing database.


Of course you could pack all this up in a nice and easy ObjC framework and post a link ;)

HTH,

-k

--
Kay Röpke
http://classdump.org/




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Discovering the default gateway address (From: "R. Tyler Ballance" <email@hidden>)
 >Re: Discovering the default gateway address (From: Kay Roepke <email@hidden>)
 >Re: Discovering the default gateway address (From: "R. Tyler Ballance" <email@hidden>)
 >Re: Discovering the default gateway address (From: "Finlay Dobbie" <email@hidden>)
 >Re: Discovering the default gateway address (From: "R. Tyler Ballance" <email@hidden>)
 >Re: Discovering the default gateway address (From: "Finlay Dobbie" <email@hidden>)

  • Prev by Date: Re: Strange Crash
  • Next by Date: Re: mouseMoved in NSTextView
  • Previous by thread: Re: Discovering the default gateway address
  • Next by thread: mouseMoved in NSTextView
  • Index(es):
    • Date
    • Thread