NetIPv4_GetAddrDfltGateway

Get the default gateway IPv4 address for a host’s configured IPv4 address.

Files

net_ipv4.h/net_ipv4.c

Prototype

          NET_IPv4_ADDR NetIPv4_GetAddrDfltGateway(NET_IPv4_ADDR  addr,
                                                   NET_ERR       *p_err);

Arguments

addr

Configured IPv4 host address.

p_err

Pointer to variable that will receive the return error code from this function:

NET_IPv4_ERR_NONE
NET_IPv4_ERR_INVALID_ADDR_HOST
NET_ERR_FAULT_LOCK_ACQUIRE

Returned Value

Configured IPv4 host address’s default gateway (in host-order), if no errors.

NET_IPv4_ADDR_NONE, otherwise.

Required Configuration

None.

Notes / Warnings

All IPv4 addresses in host-order.