Developer

API Reference

INetwork_GetMyIPAddrs()

Brew Release
Brew MP 1.0.2
See Also
Error Codes INetwork
Description
This function returns the IP addresses of the local host or device, in network byte order.
Parameters
  • me
    []:
    the interface pointer.
  • aipaAddr
    []:
    Caller allocated IPAddr array in which the IP addresses of the local host or device are returned. If aipaAddr is set to NULL, when the function returns, *pNumAddr will hold the actual number of addresses configured in the device.
  • pNumAddr
    []:
    [in/out] : Input is the size (number of IPAddr entries) of aipaAddr. If 0, The function returns in this parameter the number of IP addresses currently configured on the device. Output is the number of IPAddr actually returned in aipaAddr. If the user called the function with aipaAddr set to NULL, *pNumAddr will hold the actual number of addresses configured in the device.
Interface
Prototype
   int INetwork_GetMyIPAddrs(INetwork *me, struct IPAddr aipaAddr[], int* pNumAddr);
Return
AEE_NET_SUCCESS: Current IP address(es) returned in aipaAddr. AEE_NET_ENETNONET: network is not available. AEE_NET_ENETDOWN: Network subsystem is not available. AEE_NET_EBADPARM: *pNumAddr is negative. Other error code : As appropriate.
Side Effect
None.
Comment
Most devices return a maximum of one IP address.
  • Follow