Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: AA_DemoBoard DemoBoard HelloServerDemo DemoBoard_RangeIndicator ... more
netif Struct Reference
Generic data structure used for all lwIP network interfaces. More...
#include <netif.h>
Data Fields | |
| struct netif * | next |
| pointer to next in linked list | |
| struct ip_addr | ip_addr |
| IP address configuration in network byte order. | |
| err_t(* | input )(struct pbuf *p, struct netif *inp) |
| This function is called by the network device driver to pass a packet up the TCP/IP stack. | |
| err_t(* | output )(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr) |
| This function is called by the IP module when it wants to send a packet on the interface. | |
| err_t(* | linkoutput )(struct netif *netif, struct pbuf *p) |
| This function is called by the ARP module when it wants to send a packet on the interface. | |
| void(* | status_callback )(struct netif *netif) |
| This function is called when the netif state is set to up or down. | |
| void(* | link_callback )(struct netif *netif) |
| This function is called when the netif link is set to up or down. | |
| void * | state |
| This field can be set by the device driver and could point to state information for the device. | |
| struct dhcp * | dhcp |
| the DHCP client state information for this netif | |
| struct autoip * | autoip |
| the AutoIP client state information for this netif | |
| u8_t | hwaddr_len |
| number of bytes used in hwaddr | |
| u8_t | hwaddr [NETIF_MAX_HWADDR_LEN] |
| link level hardware address of this interface | |
| u16_t | mtu |
| maximum transfer unit (in bytes) | |
| u8_t | flags |
| flags (see NETIF_FLAG_ above) | |
| char | name [2] |
| descriptive abbreviation | |
| u8_t | num |
| number of this interface | |
| u8_t | link_type |
| link type (from "snmp_ifType" enum from snmp.h) | |
| u32_t | link_speed |
| (estimate) link speed | |
| u32_t | ts |
| timestamp at last change made (up/down) | |
| u32_t | ifinoctets |
| counters | |
Detailed Description
Generic data structure used for all lwIP network interfaces.
The following fields should be filled in by the initialization function for the device driver: hwaddr_len, hwaddr[], mtu, flags
Definition at line 88 of file precomp/Core/lwIP/include/lwip/netif.h.
Field Documentation
the AutoIP client state information for this netif
Definition at line 128 of file precomp/Core/lwIP/include/lwip/netif.h.
the DHCP client state information for this netif
Definition at line 124 of file precomp/Core/lwIP/include/lwip/netif.h.
| u8_t flags |
flags (see NETIF_FLAG_ above)
Definition at line 141 of file precomp/Core/lwIP/include/lwip/netif.h.
| u8_t hwaddr |
link level hardware address of this interface
Definition at line 137 of file precomp/Core/lwIP/include/lwip/netif.h.
| u8_t hwaddr_len |
number of bytes used in hwaddr
Definition at line 135 of file precomp/Core/lwIP/include/lwip/netif.h.
| u32_t ifinoctets |
counters
Definition at line 154 of file precomp/Core/lwIP/include/lwip/netif.h.
This function is called by the network device driver to pass a packet up the TCP/IP stack.
Definition at line 99 of file precomp/Core/lwIP/include/lwip/netif.h.
IP address configuration in network byte order.
Definition at line 93 of file precomp/Core/lwIP/include/lwip/netif.h.
| void(* link_callback)(struct netif *netif) |
This function is called when the netif link is set to up or down.
Definition at line 117 of file precomp/Core/lwIP/include/lwip/netif.h.
| u32_t link_speed |
(estimate) link speed
Definition at line 150 of file precomp/Core/lwIP/include/lwip/netif.h.
| u8_t link_type |
link type (from "snmp_ifType" enum from snmp.h)
Definition at line 148 of file precomp/Core/lwIP/include/lwip/netif.h.
| err_t(* linkoutput)(struct netif *netif, struct pbuf *p) |
This function is called by the ARP module when it wants to send a packet on the interface.
This function outputs the pbuf as-is on the link medium.
Definition at line 108 of file precomp/Core/lwIP/include/lwip/netif.h.
| u16_t mtu |
maximum transfer unit (in bytes)
Definition at line 139 of file precomp/Core/lwIP/include/lwip/netif.h.
| char name |
descriptive abbreviation
Definition at line 143 of file precomp/Core/lwIP/include/lwip/netif.h.
pointer to next in linked list
Definition at line 90 of file precomp/Core/lwIP/include/lwip/netif.h.
| u8_t num |
number of this interface
Definition at line 145 of file precomp/Core/lwIP/include/lwip/netif.h.
This function is called by the IP module when it wants to send a packet on the interface.
This function typically first resolves the hardware address, then sends the packet.
Definition at line 103 of file precomp/Core/lwIP/include/lwip/netif.h.
| void * state |
This field can be set by the device driver and could point to state information for the device.
Definition at line 121 of file precomp/Core/lwIP/include/lwip/netif.h.
| void(* status_callback)(struct netif *netif) |
This function is called when the netif state is set to up or down.
Definition at line 112 of file precomp/Core/lwIP/include/lwip/netif.h.
| u32_t ts |
timestamp at last change made (up/down)
Definition at line 152 of file precomp/Core/lwIP/include/lwip/netif.h.
Generated on Tue Jul 12 2022 16:06:31 by
1.7.2