I realise there is no API for those settings per SSID on 3.x or 4.x. As a result, I examined the source code and discovered that each SSID's configuration is saved in android.net.wifi.WifiConfiguration, which is obtained via android.net.wifi.WifiManager.
IpAssignment is an Enum in the code below, and it can be STAIC, DHCP, or NONE. And linkProperties is the object that stores information like IP address, gateway, DNS, and so on.
linkAddress is an IP address, and prefixLength is its netmask (how many bit 1 in netmask).
mRoutes is a RouteInf0o ArrayList that can be used to indicate a gateway.
For DNS, mDnses is an ArrayList of InetAddresses.
To begin, use WifiConfiguration SSID to obtain the current settings.00000000000000000000000000000000
Hope this helps!
For more join the Cyber security masters course online.
Thank You!