Starting Network Interfaces
When a network interface is started, it becomes an active interface that is capable of transmitting and receiving data assuming an operational link to the network medium. A network interface may be started any time after the network interface has been successfully “added” to the system. A successful call to NetIF_Start()
marks the end of the initialization sequence of µC/TCP-IP for a specific network interface. Recall that the first interface added and started will be the default interface.
The application developer may start a network interface by calling the NetIF_Start()
API function with the necessary parameters. A call to NetIF_Start()
is shown below.
Listing 5-12 Calling NetIF_Start()
L5-12(1) NetIF_Start()
requires two arguments. The first function argument is the interface number that the application wants to start, and the second argument is a pointer to a NET_ERR
to contain the return error code. The interface number is acquired upon successful addition of the interface and upon the successful start of the interface; the return error variable will contain the value NET_IF_ERR_NONE
.
...