netif Struct Reference

#include <lwip/src/include/lwip/netif.h>


Data Fields

struct netifnext
struct ip_addr ip_addr
err_t(* input )(struct pbuf *p, struct netif *inp)
err_t(* output )(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
err_t(* linkoutput )(struct netif *netif, struct pbuf *p)
void(* status_callback )(struct netif *netif)
void(* link_callback )(struct netif *netif)
void * state
struct dhcpdhcp
struct autoipautoip
u8_t hwaddr_len
u8_t hwaddr [NETIF_MAX_HWADDR_LEN]
u16_t mtu
u8_t flags
char name [2]
u8_t num
u8_t link_type
u32_t link_speed
u32_t ts
u32_t ifinoctets


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

Field Documentation

struct netif* netif::next [read]

pointer to next in linked list

struct ip_addr netif::ip_addr [read]

IP address configuration in network byte order

err_t(* netif::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(* netif::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. This function typically first resolves the hardware address, then sends the packet.

err_t(* netif::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.

void(* netif::status_callback)(struct netif *netif)

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

void(* netif::link_callback)(struct netif *netif)

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

void* netif::state

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

struct dhcp* netif::dhcp [read]

the DHCP client state information for this netif

struct autoip* netif::autoip [read]

the AutoIP client state information for this netif

u8_t netif::hwaddr_len

number of bytes used in hwaddr

u8_t netif::hwaddr[NETIF_MAX_HWADDR_LEN]

link level hardware address of this interface

u16_t netif::mtu

maximum transfer unit (in bytes)

u8_t netif::flags

flags (see NETIF_FLAG_ above)

char netif::name[2]

descriptive abbreviation

u8_t netif::num

number of this interface

u8_t netif::link_type

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

u32_t netif::link_speed

(estimate) link speed

u32_t netif::ts

timestamp at last change made (up/down)

u32_t netif::ifinoctets

counters


The documentation for this struct was generated from the following file:
Generated on Sun Mar 23 19:22:46 2008 for lwIP 1.3.0 by  doxygen 1.5.4