What exactly means iOS networking interface name? what's pdp_ip ? what's ap?

落爺英雄遲暮 提交于 2019-11-28 12:02:27

ap1, en0, en1 are names of the interfaces on iOS as well as on Mac. If you type in Terminal on Mac ifconfig you would get the same, en0, en1, etc.

pdp_ip interfaces are those that are used for 3G and cellular data, while ap1 is used to represent currently active data connection, Wi-Fi, cellular data or bluetooth.

lo = localhost
en = ethernet
ap = Probably for access point (if you are acting as a wifi host)

pdp_ip = maybe PDS data packet? PDS is the Phone Data Service, the data portion of GSM. Since there are four, I might postulate that PDS has the capability to offer four discrete channels.

From my research it appears (i.e. I haven't found any confirming documentation) that if the code above returns more than one "awdl0" entry then Wi-Fi is enabled. Similarly, more than one "pdp_ip0" entry indicates that cellular data is enabled. Other libraries (most notably Reachability) can then be used to indicate that a data connection has been made using either of the above.

Note this code appears to be copy-pasted from Getting Device ID or Mac Address in iOS with the helpful comments removed. You might want to look at that discussion instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!