Get an interface’s configured IP IPv4 host address(es).
Files
net_ipipv4.h/net_ipipv4.c
Prototype
Code Block |
---|
CPU_BOOLEAN NetIPv4_GetAddrHost(NET_IF_NBR if_nbr,
NET_IPv4_ADDR *p_addr_tbl,
NET_IP_ADDRS_QTY *p_addr_tbl_qty,
NET_ERR *p_err); |
Arguments
if_nbr
Interface number to get configured IP IPv4 host address(es).
paddrp_addr_tbl
Pointer to IP IPv4 address table that will receive the IP IPv4 host address(es) in host-order for this interface.
paddrp_addr_tbl_qty
Pointer to a variable to:
Pass - Pass the size of the address table, in number of IP IPv4 addresses, pointed to by paddrp_addr_tbl
.
Returns - Returns the actual number of IP IPv4 addresses, if no errors.
Returns 0
, otherwise.
perr
p_err
Pointer to variable that will receive the error code from this function:
NET_IPIPv4_ERR_NONE
NET_IPIPv4_ERR_NULL_PTR
NET_IPIPv4_ERR_ADDR_NONE_AVAIL
NET_IPIPv4_ERR_ADDR_CFG_IN_PROGRESS
NET_IPIPv4_ERR_ADDR_TBL_SIZE
NET_IF_ERR_INVALID_IF
NET_OSERR_ERRFAULT_LOCK_ACQUIRE
Returned Value
DEF_OK
,
if interface’s configured IP IPv4 host address(es) successfully returned;
DEF_FAIL
,
otherwise.
Required Configuration
None.
Notes / Warnings
IP IPv4 addresses returned in host-order.