How to get Subnet Mask and Broadcast Address of Personal Hotspot in iOS

前端 未结 1 1100
一整个雨季
一整个雨季 2020-12-31 11:53

I need to find out a way to find out subnet mask and broadcast address of my personal hotspot in iOS.

I am using following way to find out IP address of device if it

相关标签:
1条回答
  • 2020-12-31 12:31

    where address is assigned, just insert:

    netmask = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_netmask)->sin_addr)];
    
    0 讨论(0)
提交回复
热议问题