final ProtocolAddressInfo addrInfo =
api.getProtocolAddressInfo(EthernetConstants.ETH_P_IP);
if (addrInfo != null) {
final ProtocolAddress addr = addrInfo.getDefaultAddress();
if (addr != null) {
return addr.toInetAddress();
}
}
} catch (ApiNotFoundException ex) {
// Strange, but ignore
}