• 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: Getting the IP addressing method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the IP addressing method


  • Subject: Re: Getting the IP addressing method
  • From: Quinn <email@hidden>
  • Date: Wed, 22 May 2002 09:54:59 +0100

At 17:13 -0400 21/5/02, John C. Welch wrote:
>Is there a way, preferably via a command line utility, to get the way an
>active interface has it's IP address set?

You can do this from the command line using "scutil". Here's an
example session.

public.apple.com> scutil
> open
> list .*/IPv4
subKey [0] = Setup:/Network/Global/IPv4
subKey [1] = Setup:/Network/Service/1/IPv4
subKey [2] = State:/Network/Global/IPv4
subKey [3] = State:/Network/Interface/en0/IPv4
subKey [4] = State:/Network/Interface/lo0/IPv4
subKey [5] = State:/Network/Service/1/IPv4
> get Setup:/Network/Service/1/IPv4
> d.show
<dictionary> {
ConfigMethod : Manual <<<<<<<<<<<<<< look here!
Router : 17.203.16.1
Addresses : <array> {
0 : 17.203.18.100
}
SubnetMasks : <array> {
0 : 255.255.252.0
}
}
> quit

You can do it programmatically using the System Configuration
framework dynamic store APIs.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Getting the IP addressing method
      • From: "John C. Welch" <email@hidden>
References: 
 >Getting the IP addressing method (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Getting data rate for a newtork interface
  • Next by Date: Re: Getting the IP addressing method
  • Previous by thread: Getting the IP addressing method
  • Next by thread: Re: Getting the IP addressing method
  • Index(es):
    • Date
    • Thread