Get the curent IP address (netos7.1)

Hi group,

In NETOS 7.1, what is the function to retrieve the current IP address ?
I mean customizeIamGetConfig() only gives the IP configuration stored in NVRAM.

In NETOS60F, I used NAIpAddress(), but it’s no more available in NETOS71 !

Thanks for any information,


Try using customizeIamGetIfAddrInfo().


The IPv4 address of the first ethernet interface can be found like this:

NaIamIfAddrInfo_t AddrInfo;
NaIamStatus_t Status = customizeIamGetIfAddrInfo(BP_ETH_INTERFACE, &AddrInfo);
//check status

uint32 IPv4 = AddrInfo.v4Info.ipAddress.addr.ipv4.sin_addr.s_addr;