![]() |
Network Component
Version 6.7.5
MDK-Professional Middleware for IP Networking
|
Core system functions to be called by user. More...
Functions | |
netStatus | net_initialize (void) |
Initialize Network Component, resources and interfaces. More... | |
int | net_main (void) |
Run Network Component main function. More... | |
netStatus | netif_set_default (uint8_t netif) |
Set default network interface used for internet access. More... | |
Core system functions to be called by user.
System Functions represent the core of the protocol stack. They form an operating system that calls all other protocol module functions. The functions require a CMSIS-RTOS compatible RTOS to run and are not reentrant.
The functions are part of the Network Component library and are defined in rl_net.h.
netStatus net_initialize | ( | void | ) |
Initialize Network Component, resources and interfaces.
The function net_initialize initializes the Network Core's system resources, protocols, and applications.
Code Example
int net_main | ( | void | ) |
Run Network Component main function.
The function net_main is the main function of the Network Core. It handles:
When net_main receives data from a remote machine, it calls the appropriate protocol functions to process the data. It then passes the resulting data to the user application.
Code Example
netStatus netif_set_default | ( | uint8_t | netif | ) |
Set default network interface used for internet access.
[in] | netif | Network interface number:
|
The function netif_set_default sets the default network interface, which is used for internet connectivity. It can be used when multiple network interfaces are active simultaneously, for example ethernet and PPP interface.
The argument netif specifies the default network interface as shown in the following table:
netif | Description |
---|---|
NETIF_ETH | Ethernet network interface |
NETIF_PPP | PPP network interface using serial connection over UART |
NETIF_SLIP | SLIP network interface using serial connection over UART |
Code Example