• 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
how to get the serviceID belongs to airport
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to get the serviceID belongs to airport


  • Subject: how to get the serviceID belongs to airport
  • From: "Cotton Chen" <email@hidden>
  • Date: Wed, 7 Feb 2007 09:46:13 +0800

Hi all,
    Recently I'd like to get the dhcp server's ip address who gives the ip to my airport.
    I used the APIs SCDynamicStoreCopyDHCPInfo, and  DHCPInfoGetOptionData to accomplish my purpose.
    But, I cand only pass the NULL value as the serviceID to SCDynamicStoreCopyDHCPInfo because I don't know how to get the serviceID that belongs to airport.
    I also used scutil to get the informations about dhcp, I got the following of what I want.

  with ethernet cable connected:
  subKey [47] = State:/Network/Service/0/DHCP
  subKey [48] = State:/Network/Service/0/DNS
  subKey [49] = State:/Network/Service/0/IPv4
  subKey [50] = State:/Network/Service/606C990F-4091-4AC1-807F-86CC64EB7898/DHCP
  subKey [51] = State:/Network/Service/606C990F-4091-4AC1-807F-86CC64EB7898/DNS
  subKey [52] = State:/Network/Service/606C990F-4091-4AC1-807F-86CC64EB7898/IPv4

  without ethernet cable connected:
  subKey [50] = State:/Network/Service/606C990F-4091-4AC1-807F-86CC64EB7898/DHCP
  subKey [51] = State:/Network/Service/606C990F-4091-4AC1-807F-86CC64EB7898/DNS
  subKey [52] = State:/Network/Service/606C990F-4091-4AC1-807F-86CC64EB7898/IPv4


  as I passed the null value as serviceID to SCDynamicStoreCopyDHCPInfo without ethernet cable connected and turn on the airport interface, I got the correct dhcp server's ip because system had no choice to return me the one belongs to airport. But after I connected the ethernet cable on my computer, I always got the one that belongs to the ethernet interface.
  My question is, how to get the serviceID belongs to airport, for example the string "606C990F-4091-4AC1-807F-86CC64EB7898" that listed above.

--
Cotton Chen


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: how to get the serviceID belongs to airport
      • From: Allan Nathanson <email@hidden>
  • Prev by Date: RE: PAM Support
  • Next by Date: Reducing interruption latency for feedback-loop
  • Previous by thread: RE: PAM Support
  • Next by thread: Re: how to get the serviceID belongs to airport
  • Index(es):
    • Date
    • Thread