!752 import android.net.*; import android.net.wifi.WifiManager; p { String s_dns1 ; String s_dns2; String s_gateway; String s_ipAddress; String s_leaseDuration; String s_netmask; String s_serverAddress; DhcpInfo d; WifiManager wifii; wifii = (WifiManager) androidContext().getSystemService(Context.WIFI_SERVICE); d=wifii.getDhcpInfo(); s_dns1="DNS 1: "+intToIp(d.dns1); s_dns2="DNS 2: "+intToIp(d.dns2); s_gateway="Default Gateway: "+intToIp(d.gateway); s_ipAddress="IP Address: "+intToIp(d.ipAddress); s_leaseDuration="Lease Time: "+intToIp(d.leaseDuration); s_netmask="Subnet Mask: "+intToIp(d.netmask); s_serverAddress="Server IP: "+intToIp(d.serverAddress); S text = "Network Info\n"+s_dns1+"\n"+s_dns2+"\n"+s_gateway+"\n"+s_ipAddress+"\n"+s_leaseDuration+"\n"+s_netmask+"\n"+s_serverAddress; print(text); } static S intToIp(int addr) { return ((addr & 0xFF) + "." + ((addr >>>= 8) & 0xFF) + "." + ((addr >>>= 8) & 0xFF) + "." + ((addr >>>= 8) & 0xFF)); }