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

前端 未结 3 2094
天涯浪人
天涯浪人 2020-12-11 02:16

I use following code to print all interface and it\'s mac address

- ( void )interfaceInfo{

int                 mib[6];
size_t              len;
char                 


        
相关标签:
3条回答
  • 2020-12-11 02:22

    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.

    0 讨论(0)
  • 2020-12-11 02:26

    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.

    0 讨论(0)
  • 2020-12-11 02:41

    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.

    0 讨论(0)
提交回复
热议问题