I have the following code to determine all info about my local network on Wifi:
WifiManager wifiMan = (WifiManager)context.getSystemService(Context.WIFI_SERVICE); dhcpInfo = wifiMan.getDhcpInfo(); networkAddress = ntoh(dhcpInfo.netmask & dhcpInfo.ipAddress); broadcastAddress = ntoh((dhcpInfo.netmask & dhcpInfo.ipAddress) | (~dhcpInfo.netmask)); netMask = ntoh(dhcpInfo.netmask); ipAddress = ntoh(dhcpInfo.ipAddress); However I could not find a way to get this DhcpInfo object for Ethernet. There is no such thing as EthernetManager.... How to get the above info - while Android connected via Ethernet (USB OTG + Ethernet adapter)? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

