TCPIP_STACK_NetAddressGateway Function

C

uint32_t TCPIP_STACK_NetAddressGateway(
    TCPIP_NET_HANDLE netH
);

Description

If interface is enabled then the function will return the IPv4 gateway 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

ParametersDescription
netHInterface handle to get address of.

Returns

  • The gateway address of the interface.

  • 0 if the interface is not enabled.

Remarks

None.

Example

TCPIP_NET_HANDLE netH = TCPIP_STACK_NetHandleGet("eth0");
uint32_t ipAdd = TCPIP_STACK_NetAddressGateway(netH);