Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add a network device and hardware as a network interface.

Files

net_if.h/net_if.c

Prototype

Arguments

if_api

Pointer to the desired link-layer API for this network interface and device hardware. The desired link-layer interface will point to the Ethernet API (NetIF_API_Ether) or the WiFi API,(NetIF_API_WiFi).

...

NET_IF_ERR_NONE
NET_IF_ERR_NULL_PTR
NET_IF_ERR_INVALID_IF
NET_IF_ERR_INVALID_CFG
NET_IF_ERR_NONE_AVAIL
NET_BUF_ERR_POOL_INIT
NET_BUF_ERR_INVALID_POOL_TYPE
NET_BUF_ERR_INVALID_POOL_ADDR
NET_BUF_ERR_INVALID_POOL_SIZE
NET_BUF_ERR_INVALID_POOL_QTY
NET_BUF_ERR_INVALID_SIZE
NET_OS_ERR_INIT_DEV_TX_RDY
NET_OS_ERR_INIT_DEV_TX_RDY_NAME
NET_ERR_FAULT_LOCK_ACQUIRE

Returned Value

Network interface number, if device and hardware successfully added;

NET_IF_NBR_NONE, otherwise.

Required Configuration

None.

Notes / Warnings

The first network interface added and started is the default interface used for all default communication.

...