Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

netif Struct Reference

netif Struct Reference

Generic data structure used for all lwIP network interfaces. More...

#include <netif.h>

Data Fields

struct netifnext
 pointer to next in linked list
ip_addr_t ip_addr
 IP address configuration in network byte order.
ip_addr_t ip6_addr [LWIP_IPV6_NUM_ADDRESSES]
 Array of IPv6 addresses for this netif.
u8_t ip6_addr_state [LWIP_IPV6_NUM_ADDRESSES]
 The state of each IPv6 address (Tentative, Preferred, etc).
u32_t ip6_addr_valid_life [LWIP_IPV6_NUM_ADDRESSES]
 Remaining valid and preferred lifetime of each IPv6 address, in seconds.
netif_input_fn input
 This function is called by the network device driver to pass a packet up the TCP/IP stack.
netif_output_fn output
 This function is called by the IP module when it wants to send a packet on the interface.
netif_linkoutput_fn linkoutput
 This function is called by ethernet_output() when it wants to send a packet on the interface.
netif_output_ip6_fn output_ip6
 This function is called by the IPv6 module when it wants to send a packet on the interface.
netif_status_callback_fn status_callback
 This function is called when the netif state is set to up or down.
netif_status_callback_fn link_callback
 This function is called when the netif link is set to up or down.
netif_status_callback_fn remove_callback
 This function is called when the netif has been removed.
void * state
 This field can be set by the device driver and could point to state information for the device.
u16_t mtu
 maximum transfer unit (in bytes)
u16_t mtu6
 maximum transfer unit (in bytes), updated by RA
u8_t hwaddr [NETIF_MAX_HWADDR_LEN]
 link level hardware address of this interface
u8_t hwaddr_len
 number of bytes used in hwaddr
u8_t flags
 flags (
char name [2]
 descriptive abbreviation
u8_t num
 number of this interface.
u8_t ip6_autoconfig_enabled
 is this netif enabled for IPv6 autoconfiguration
u8_t rs_count
 Number of Router Solicitation messages that remain to be sent.
u8_t link_type
 link type (from "snmp_ifType" enum from snmp_mib2.h)
u32_t link_speed
 (estimate) link speed
u32_t ts
 timestamp at last change made (up/down)
struct stats_mib2_netif_ctrs mib2_counters
 counters
netif_igmp_mac_filter_fn igmp_mac_filter
 This function could be called to add or delete an entry in the multicast filter table of the ethernet MAC.
netif_mld_mac_filter_fn mld_mac_filter
 This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC.
void * service_ptr
 Pointer to PPP Service.
void * memory_manager
 Pointer to memory manager.
void * stream
 Pointer to memory stream.

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 261 of file netif.h.


Field Documentation

u8_t flags

flags (

See also:
Flags)

Definition at line 346 of file netif.h.

u8_t hwaddr[NETIF_MAX_HWADDR_LEN]

link level hardware address of this interface

Definition at line 342 of file netif.h.

u8_t hwaddr_len

number of bytes used in hwaddr

Definition at line 344 of file netif.h.

This function could be called to add or delete an entry in the multicast filter table of the ethernet MAC.

Definition at line 373 of file netif.h.

This function is called by the network device driver to pass a packet up the TCP/IP stack.

This function is called by the PPP service to pass a packet up the TCP/IP stack.

Definition at line 289 of file netif.h.

ip_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES]

Array of IPv6 addresses for this netif.

Definition at line 275 of file netif.h.

u8_t ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES]

The state of each IPv6 address (Tentative, Preferred, etc).

See also:
ip6_addr.h

Definition at line 278 of file netif.h.

u32_t ip6_addr_valid_life[LWIP_IPV6_NUM_ADDRESSES]

Remaining valid and preferred lifetime of each IPv6 address, in seconds.

For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0) indicates the address is static and has no lifetimes.

Definition at line 283 of file netif.h.

is this netif enabled for IPv6 autoconfiguration

Definition at line 354 of file netif.h.

IP address configuration in network byte order.

Definition at line 269 of file netif.h.

This function is called when the netif link is set to up or down.

Definition at line 316 of file netif.h.

u32_t link_speed

(estimate) link speed

Definition at line 364 of file netif.h.

u8_t link_type

link type (from "snmp_ifType" enum from snmp_mib2.h)

Definition at line 362 of file netif.h.

This function is called by ethernet_output() when it wants to send a packet on the interface.

This function outputs the pbuf as-is on the link medium.

Definition at line 300 of file netif.h.

Pointer to memory manager.

Definition at line 161 of file ppp_service_if.h.

counters

Definition at line 368 of file netif.h.

This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC.

Definition at line 378 of file netif.h.

u16_t mtu

maximum transfer unit (in bytes)

Definition at line 336 of file netif.h.

u16_t mtu6

maximum transfer unit (in bytes), updated by RA

Definition at line 339 of file netif.h.

char name[2]

descriptive abbreviation

Definition at line 348 of file netif.h.

struct netif* next

pointer to next in linked list

Definition at line 264 of file netif.h.

u8_t num

number of this interface.

Used for Interface Identification API and NETIF related, as well as for IPv6 zones

Definition at line 351 of file 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. For ethernet physical layer, this is usually etharp_output()

Definition at line 295 of file netif.h.

This function is called by the IPv6 module when it wants to send a packet on the interface.

This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually ethip6_output()

Definition at line 306 of file netif.h.

This function is called when the netif has been removed.

Definition at line 320 of file netif.h.

u8_t rs_count

Number of Router Solicitation messages that remain to be sent.

Definition at line 358 of file netif.h.

void* service_ptr

Pointer to PPP Service.

Definition at line 159 of file ppp_service_if.h.

void * state

This field can be set by the device driver and could point to state information for the device.

This field can be set by the PPP protocol and could point to state information for the protocol.

Definition at line 324 of file netif.h.

This function is called when the netif state is set to up or down.

Definition at line 311 of file netif.h.

void* stream

Pointer to memory stream.

Definition at line 163 of file ppp_service_if.h.

u32_t ts

timestamp at last change made (up/down)

Definition at line 366 of file netif.h.