|
Prusa MINI Firmware overview
|
#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 |
Macros | |
| #define | ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) |
| #define | NETIF_MAX_HWADDR_LEN 6U |
| #define | NETIF_FLAG_UP 0x01U |
| #define | NETIF_FLAG_BROADCAST 0x02U |
| #define | NETIF_FLAG_LINK_UP 0x04U |
| #define | NETIF_FLAG_ETHARP 0x08U |
| #define | NETIF_FLAG_ETHERNET 0x10U |
| #define | NETIF_FLAG_IGMP 0x20U |
| #define | NETIF_FLAG_MLD6 0x40U |
| #define | NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) |
| #define | IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) |
| #define | netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0) |
| #define | netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0) |
| #define | NETIF_SET_HWADDRHINT(netif, hint) |
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) |
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 (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) |
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 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_SET_CHECKSUM_CTRL | ( | netif, | |
| chksumflags | |||
| ) |
| #define IF__NETIF_CHECKSUM_ENABLED | ( | netif, | |
| chksumflag | |||
| ) |
| #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_SET_HWADDRHINT | ( | netif, | |
| hint | |||
| ) |
Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.
| netif | The netif to initialize |
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.


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!
| struct netif* netif_list |
The list of network interfaces.
| struct netif* netif_default |
The default network interface.