1

Trying to fetch the router address in an app.

I found this post Objective-C : How to fetch the router address? but the author of the answer said that the method is not recommended as calls might change without notice.

Could you please help me with a more reliable method ?

Community
  • 1
  • 1
skyisred
  • 6,855
  • 6
  • 37
  • 54
  • check out this link, might be helpful to you http://stackoverflow.com/questions/6530322/fetching-ip-address-of-router-to-which-iphone-is-connected – Rohan Pawar Sep 13 '12 at 08:10

1 Answers1

1

There is no reason to think that the code in that answer will stop working any time soon. The APIs that it uses are documented and have been around for a long time.

Documentation: start with man 3 sysctl. Also see the book TCP/IP Illustrated, Volume 2: The Implementation.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848