• 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
Getting networking information
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting networking information


  • Subject: Getting networking information
  • From: Chris Garaffa <email@hidden>
  • Date: Sun, 9 Nov 2003 01:18:18 -0500

Greetings all,

I'm looking for a way to get information on a user's current network setup via AppleScript in Panther. I've looked through all seemingly-relevant dictionaries and couldn't come up with anything. Specifically, I'd like the Interface name (ex. AirPort), UNIX interface name (en1), IP address, subnet, router, and DNS servers, if possible.
Short of doing lots of awkard parsing of the output of ifconfig, or (shudder) using some of the CFXML functions (which I can barely understand) to parse the output of system_profiler in the Cocoa part of my program, can I do something like the following pseudocode:

set theInterfaces to every network interface
repeat with i from 1 to count theInterfaces
set theIP to IP address of item i of theInterfaces
set theSubnet to subnet mask of item i of theInterfaces
--etc, etc, etc
end repeat

Thanks for any pointers

--
Chris Garaffa
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Quit all programs
  • Next by Date: Re: Auto completion
  • Previous by thread: applescript-users digest, Vol 3 #2142 - 4 msgs ( -Reply)
  • Next by thread: Safari Script
  • Index(es):
    • Date
    • Thread