TCPIP_STACK_NetAddress Function
C
uint32_t TCPIP_STACK_NetAddress(
TCPIP_NET_HANDLE netH
);
Description
If interface is enabled then the function will return the IPv4 address of the network interface.
Preconditions
The TCPIP_STACK_Initialize() function must have been called before calling this function. The network interface should be up and running.
Parameters
Parameters | Description |
---|---|
netH | Interface handle to get address of. |
Returns
The IP address of the interface, if enabled.
0 if no such interface exists or is not enabled.
Remarks
None.
Example
TCPIP_NET_HANDLE netH = TCPIP_STACK_NetHandleGet("eth0");
uint32_t ipAdd = TCPIP_STACK_NetAddress(netH);