• 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: Best way to determine what ip address are assigned to a given network interface.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to determine what ip address are assigned to a given network interface.


  • Subject: Re: Best way to determine what ip address are assigned to a given network interface.
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 27 Aug 2009 10:21:56 -0400

On Thu, Aug 27, 2009 at 10:09 AM, Mark McCray<email@hidden> wrote:

> I've seen a bunch of methods for getting a list of ip addresses that a
> machine may have. But i haven't seen a Cocoa way of figuring out what
> ip address is attached to a given interface.  NSHost give's you IPs
> but which network interfaces those IPs are attached to.
>
> Can this be done with the SystemConfiguration Framework?
>
> Why do I need this? We know a bunch of our machines have many IPs but
> we only care about ethernet ip addresses. and we typically only care
> about ones that are en0 or en1. We want to write an application which
> will give this information to us easily without the user having to go
> into System Preferences.

If you know which interface(s) you want info about, you could run
"/sbin/ifconfig en0" with NSTask.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

  • Follow-Ups:
    • Re: Best way to determine what ip address are assigned to a given network interface.
      • From: glenn andreas <email@hidden>
References: 
 >Best way to determine what ip address are assigned to a given network interface. (From: Mark McCray <email@hidden>)

  • Prev by Date: Re: Two controllers in a window, how do I get one to run a function in another?
  • Next by Date: Re: Best way to determine what ip address are assigned to a given network interface.
  • Previous by thread: Best way to determine what ip address are assigned to a given network interface.
  • Next by thread: Re: Best way to determine what ip address are assigned to a given network interface.
  • Index(es):
    • Date
    • Thread