![]() |
BSB Developer Docs
|
Network TCP/IP stack API. More...
#include <lwip/netif.h>Go to the source code of this file.
Macros | |
| #define | RECORD_NETWORK "network" |
| The string key for Network instance access. | |
Typedefs | |
| typedef struct Network | Network |
| Opaque Network type declaration. | |
Enumerations | |
| enum | NetworkNetif { NetworkNetifWifi , NetworkNetifUsb , NetworkNetifCount } |
| Identifies a logical network interface. More... | |
Functions | |
| struct netif * | network_find_netif (NetworkNetif netif) |
| Find a netif by its logical interface identifier. | |
| void | network_netif_assign_name (struct netif *netif, NetworkNetif id) |
| Assign the lwIP 2-character name to a netif. | |
| void | network_init_current_thread (Network *instance) |
| Initialise the calling thread for use with the TCP/IP stack. | |
| void | network_deinit_current_thread (Network *instance) |
| Deinitialise the calling thread. | |
Network TCP/IP stack API.
| #define RECORD_NETWORK "network" |
The string key for Network instance access.
Get the instance pointer by calling furi_record_open(RECORD_NETWORK)
| enum NetworkNetif |
| void network_deinit_current_thread | ( | Network * | instance | ) |
Deinitialise the calling thread.
Needs to be called before exiting from a thread initialised with the network_init_current_thread() call.
| [in,out] | instance | pointer to the Network instance |
| struct netif * network_find_netif | ( | NetworkNetif | netif | ) |
Find a netif by its logical interface identifier.
Must be called with the lwIP core lock held — either from within the lwIP thread or between LOCK_TCPIP_CORE / UNLOCK_TCPIP_CORE.
| netif | Logical interface to find. |
| void network_init_current_thread | ( | Network * | instance | ) |
Initialise the calling thread for use with the TCP/IP stack.
Every thread that uses APIs from the following files:
MUST first register itself by calling this function from inside of its execution context.
| [in,out] | instance | pointer to the Network instance |
| void network_netif_assign_name | ( | struct netif * | netif, |
| NetworkNetif | id ) |
Assign the lwIP 2-character name to a netif.
Encapsulates the interface-to-name mapping; call from netif init callbacks.
| netif | The lwIP netif to name. |
| id | Logical interface identifier. |