|
ConOpSys V2970
P004.07
ANVILEX control operating system
|
#include "lwip/opt.h"#include "lwip/err.h"#include "lwip/ip_addr.h"#include "lwip/def.h"#include "lwip/pbuf.h"#include "lwip/stats.h"

Go to the source code of this file.
Classes | |
| struct | netif |
| union | netif_ext_callback_args_t |
| struct | netif_ext_callback_args_t::link_changed_s |
| struct | netif_ext_callback_args_t::status_changed_s |
| struct | netif_ext_callback_args_t::ipv4_changed_s |
| struct | netif_ext_callback_args_t::ipv6_set_s |
| struct | netif_ext_callback_args_t::ipv6_addr_state_changed_s |
Typedefs | |
| typedef err_t(* | netif_init_fn) (struct netif *netif) |
| typedef err_t(* | netif_input_fn) (struct pbuf *p, struct netif *inp) |
| typedef err_t(* | netif_linkoutput_fn) (struct netif *netif, struct pbuf *p) |
| typedef void(* | netif_status_callback_fn) (struct netif *netif) |
| typedef u8_t | netif_addr_idx_t |
| typedef u16_t | netif_nsc_reason_t |
| typedef void(* | netif_ext_callback_fn) (struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args) |
Enumerations | |
| enum | lwip_internal_netif_client_data_index { LWIP_NETIF_CLIENT_DATA_INDEX_MAX } |
| enum | netif_mac_filter_action { NETIF_DEL_MAC_FILTER = 0 , NETIF_ADD_MAC_FILTER = 1 } |
Functions | |
| void | netif_init (void) |
| struct netif * | netif_add_noaddr (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input) |
| struct netif * | netif_add (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input) |
| void | netif_remove (struct netif *netif) |
| struct netif * | netif_find (const char *name) |
| void | netif_set_default (struct netif *netif) |
| void | netif_set_up (struct netif *netif) |
| void | netif_set_down (struct netif *netif) |
| void | netif_set_link_up (struct netif *netif) |
| void | netif_set_link_down (struct netif *netif) |
| err_t | netif_input (struct pbuf *p, struct netif *inp) |
| u8_t | netif_name_to_index (const char *name) |
| char * | netif_index_to_name (u8_t idx, char *name) |
| struct netif * | netif_get_by_index (u8_t idx) |
Variables | |
| struct netif * | netif_list |
| struct netif * | netif_default |
netif API (to be used from TCPIP thread)
| #define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) |
| #define IF__NETIF_CHECKSUM_ENABLED | ( | netif, | |
| chksumflag | |||
| ) |
| #define LWIP_NETIF_USE_HINTS 0 |
| #define LWIP_NSC_IPV4_ADDRESS_CHANGED 0x0010 |
IPv4 address has changed
| #define LWIP_NSC_IPV4_GATEWAY_CHANGED 0x0020 |
IPv4 gateway has changed
| #define LWIP_NSC_IPV4_NETMASK_CHANGED 0x0040 |
IPv4 netmask has changed
| #define LWIP_NSC_IPV4_SETTINGS_CHANGED 0x0080 |
called AFTER IPv4 address/gateway/netmask changes have been applied
| #define LWIP_NSC_IPV6_ADDR_STATE_CHANGED 0x0200 |
IPv6 address state has changed
| #define LWIP_NSC_IPV6_SET 0x0100 |
IPv6 address was added
| #define LWIP_NSC_LINK_CHANGED 0x0004 |
link changed
| #define LWIP_NSC_NETIF_ADDED 0x0001 |
netif was added. arg: NULL. Called AFTER netif was added.
| #define LWIP_NSC_NETIF_REMOVED 0x0002 |
netif was removed. arg: NULL. Called BEFORE netif is removed.
| #define LWIP_NSC_NONE 0x0000 |
| #define LWIP_NSC_STATUS_CHANGED 0x0008 |
netif administrative status changed.
up is called AFTER netif is set up.
down is called BEFORE the netif is actually set down.
| #define netif_add_ext_callback | ( | callback, | |
| fn | |||
| ) |
| #define NETIF_ADDR_IDX_MAX 0x7F |
| #define netif_clear_flags | ( | netif, | |
| clr_flags | |||
| ) | do { (netif)->flags = (u8_t)((netif)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0) |
| #define NETIF_DECLARE_EXT_CALLBACK | ( | name | ) |
| #define netif_invoke_ext_callback | ( | netif, | |
| reason, | |||
| args | |||
| ) |
| #define netif_is_flag_set | ( | nefif, | |
| flag | |||
| ) | (((netif)->flags & (flag)) != 0) |
| #define netif_is_link_up | ( | netif | ) | (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0) |
Ask if a link is up
| #define NETIF_MAX_HWADDR_LEN 6U |
Must be the maximum of all used hardware address lengths across all types of interfaces in use. This does not have to be changed, normally.
| #define NETIF_NAMESIZE 6 |
The size of a fully constructed netif name which the netif can be identified by in APIs. Composed of 2 chars, 3 (max) digits, and 1 \0
| #define NETIF_NO_INDEX (0) |
| #define netif_remove_ext_callback | ( | callback | ) |
| #define NETIF_RESET_HINTS | ( | netif | ) |
| #define NETIF_SET_CHECKSUM_CTRL | ( | netif, | |
| chksumflags | |||
| ) |
| #define netif_set_flags | ( | netif, | |
| set_flags | |||
| ) | do { (netif)->flags = (u8_t)((netif)->flags | (set_flags)); } while(0) |
| #define NETIF_SET_HINTS | ( | netif, | |
| netifhint | |||
| ) |
| typedef u8_t netif_addr_idx_t |
Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.
| netif | The netif to initialise |
Function prototype for netif->input functions. This function is saved as 'input' callback function in the netif struct. Call it when a packet has been received.
| p | The received packet, copied into a pbuf |
| inp | The netif which received the packet |
Function prototype for netif->linkoutput functions. Only used for ethernet netifs. This function is called by ARP when a packet shall be sent.
| netif | The netif which shall send a packet |
| p | The packet to send (raw ethernet packet) |
Function prototype for netif status- or link-callback functions.
| void netif_init | ( | void | ) |
References IP_ADDR6_HOST, netif_add(), netif_set_link_up(), netif_set_up(), NULL, and tcpip_input().
Referenced by lwip_init().


Forwards a received packet for input processing with ethernet_input() or ip_input() depending on netif flags. Don't call directly, pass to netif_add() and call netif->input(). Only works if the netif driver correctly sets NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag!
References netif::flags, LWIP_ASSERT, LWIP_ASSERT_CORE_LOCKED, NETIF_FLAG_ETHARP, NETIF_FLAG_ETHERNET, and NULL.
|
extern |
The default network interface.
Referenced by netif_add(), netif_remove(), and netif_set_default().
|
extern |
The list of network interfaces.
Referenced by netif_add(), and netif_remove().