• 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 list of name servers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting list of name servers


  • Subject: Re: Getting list of name servers
  • From: Quinn <email@hidden>
  • Date: Fri, 22 Feb 2002 23:57:07 +0000

At 12:22 +1300 23/2/02, Glenn Anderson wrote:
I am working on my own DNR, and I would like to be able to get a list of name servers to use from OT. I can use NetworkSetup to get a list of name servers that have been manually configured in the TCP/IP control panel, but is there a way to get the name servers that have been returned by DHCP or PPP?

You might be able to do it, but it's pretty ugly. For DHCP you can get the DHCP options supplied in the configuration packet using the techniques outlined in DTS Q&A NW 61.

<http://developer.apple.com/qa/nw/nw61.html>

For PPP you might be able to open another stream to the underlying driver and send it the ioctl that the IP configurator uses to get the DNS servers (MIOC_CMD(MIOC_TCP, 71)), however this might not work because you may not be allowed to open a second stream to PPP.

Unfortunately, I know of no way to solve this the right way, by extracting the DNS server list out of the DNR driver. The API to that driver is given in OTACP, but there's no routines to get the server list. If you were feeling really ambitious you could autopush a module on top of that driver that recorded the servers that were configured into it, but that's a pretty extreme solution.

<http://developer.apple.com/macos/opentransport/OTAdvancedClientProg/
ImplementationNotes.html>

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.

References: 
 >Getting list of name servers (From: Glenn Anderson <email@hidden>)

  • Prev by Date: Getting list of name servers
  • Next by Date: DHCP leases + other woes
  • Previous by thread: Getting list of name servers
  • Next by thread: DHCP leases + other woes
  • Index(es):
    • Date
    • Thread