...
Starting
...
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. Anchor
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.anchor
Code Block |
---|
...
|
...
HTML Table | |
---|---|
summary | |
class | Code_Listing |
Table Row (tr) | |
Table Cell (td) | |
Anchor | 1008955 | 1008955 |
|
...
| ||||
NetIF_Start(if_nbr, &err); (1) |
Panel | ||
---|---|---|
| ||
|
There are very few things that could cause a network interface to not start properly. The application developer should always inspect the return error code and take the appropriate action if an error occurs. Once the error is resolved, the application may again attempt to call NetIF_Start()
.
Stopping
Under some circumstances, it may be desirable to stop a network interface such as for saving power. A network interface may be stopped any time after it has been successfully “added” to the system. Stopping an interface may be performed by calling NetIF_Stop()
...
with the appropriate arguments shown below.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
NetIF_Stop(if_nbr, &err); (1) |
Panel | ||
---|---|---|
| ||
|
...
|
...
|
...
There are very few things that
...
may cause a network interface to not
...
stop properly. The application developer should always inspect the return error code and take the appropriate action if an error occurs. Once the error is resolved, the application may
...
attempt to
...
call NetIF_
...
Stop()
again.