0

I want to get the Names of the connected interfaces like ethernet with IP addresses , I am able to get the IP addresses for connected networks but unable to differentiate the IP addresses, Please help me with a solution

Thanks in advance!!

Ketan P
  • 4,259
  • 3
  • 30
  • 36
  • 1
    You can do that with `getifaddrs()`of `ifaddrs.h` and `SCNetworkInterfaceCopyAll()` of `SystemConfiguration.framework` – vadian Mar 08 '16 at 09:19
  • Can u please provide me with sample code @vadian – user2621560 Mar 10 '16 at 14:17
  • Did you search SO? For example [iphone-ipad-osx-how-to-get-my-ip-address-programmatically](http://stackoverflow.com/questions/7072989/iphone-ipad-osx-how-to-get-my-ip-address-programmatically) and [how-to-find-the-hardware-type-of-an-interface-on-ios-and-mac-os-x](http://stackoverflow.com/questions/35705580/how-to-find-the-hardware-type-of-an-interface-on-ios-and-mac-os-x/35708797#35708797) – vadian Mar 10 '16 at 14:31
  • Thanks @vadian it actually helped me in acheiving my task , Thank you very much – user2621560 Mar 22 '16 at 13:19
  • Possible duplicate of [Convert Network Interface Name](http://stackoverflow.com/questions/40727807/convert-network-interface-name) – utahwithak Nov 28 '16 at 15:09

0 Answers0