如何在iOS设备上获取关联的访问点的IP地址 [英] How to get the IP address of the associated access point on an iOS device

查看:67
本文介绍了如何在iOS设备上获取关联的访问点的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用例:

我们有一个iOS应用程序,您可以在其中运行iOS设备及其关联的无线访问点之间的网络测试,以测试吞吐量.该应用程序可以很好地获取iOS设备的IP地址,但用户必须输入接入点的IP.

We have an iOS application where you can run a network test between an iOS device and its associated wireless access point to test throughput. The app can get the IP address of the iOS device just fine, but the user has to type in the IP of the access point.

问题:

任务是获取关联访问点的IP地址,并为用户预先填充,从而避免用户在此处进行干预.

The task is to get the IP address of the associated access point, and pre fill it for the user, hence avoiding user intervention there.

我的方法:

  1. 找出访问点的Mac地址/BSSID.我通过使用Captive Network API来做到这一点.

  1. Find out the Mac Address/BSSID of the access point. I do this by employing the Captive Network API.

发出ARP请求以查找与接入点关联的IP.到目前为止,我还无法完成这项工作.Google和SO搜索在某种程度上导致了我的死胡同.以下是一些类似的问题:如何在iPhone上查询ARP表? iPhone上的ARP请求

Issue an ARP request to find out the IP associated to the access point. I haven't been able to accomplish this as of yet. Google and SO search has kind of lead me to a dead end here. Here are some similar questions: How do I query the ARP table on iPhone? AND ARP Requests on iPhone

问题:

执行此操作的正确方法是什么?简而言之,获取与iOS设备相连的接入点IP地址的最佳方法是什么.

What is the right way to do this? In fewer words, what is the best way to get the IP address of the access point an iOS device is connected to.

推荐答案

WiFi接入点不一定是具有IP功能的设备(尽管其中许多是出于配置目的,而不是出于通信目的).

A WiFi access point is not necessarily an IP-capable device (although many of them are, but for configuration, not communications, purposes).

即使您确实获得了实际访问点的IP地址,也将如何测试吞吐量?您可以发送 ICMP回声请求,但这只会为您提供即时回合行程时间(不是吞吐量),并且出于安全原因,许多IP设备被配置为不响应ICMP ECHO请求.

Even if you do get the actual access point's IP address, how are you going to test the throughput? You could send ICMP Echo requests, but that will just give you instantaneous round-trip times, not throughput, and many IP devices, for security reasons, are configured to not respond to ICMP ECHO requests.

这篇关于如何在iOS设备上获取关联的访问点的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆