TizenRT Libs&Environment  v2.0 M2
Collaboration diagram for DHCP:

Modules

 Flags
 

Files

file  netif.h
 netif API (to be used from lwIP TCPIP thread)
 

Data Structures

struct  netif
 

Macros

#define MAX_NET_DEV_MTU   1500
 
#define ENABLE_LOOPBACK   (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
 
#define ENABLE_LOOPBACK   (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
 
#define NETIF_MAX_HWADDR_LEN   6U
 
#define netif_set_client_data(netif, id, data)   netif_get_client_data(netif, id) = (data)
 
#define netif_get_client_data(netif, id)   (netif)->client_data[(id)]
 
#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

Functions

u8_t netif_alloc_client_data_id (void)
 
void netif_init (void)
 
struct netifnetif_add (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
 
void netif_remove (struct netif *netif)
 
struct netifnetif_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 netifnext
 
netif_input_fn input
 
netif_linkoutput_fn linkoutput
 
void * state
 
void * client_data [LWIP_NETIF_CLIENT_DATA_INDEX_MAX+LWIP_NUM_NETIF_CLIENT_DATA]
 
u16_t mtu
 
u8_t hwaddr_len
 
u8_t hwaddr [NETIF_MAX_HWADDR_LEN]
 
u8_t flags
 
char name [2]
 
u8_t num
 
char d_ifname [6]
 
struct ether_addr d_mac
 
u16_t d_len
 
u32_t d_flags
 
uint32_t d_ipaddr
 
uint32_t d_draddr
 
uint32_t d_netmask
 
int(* d_ifup )(FAR struct netif *dev)
 
int(* d_ifdown )(FAR struct netif *dev)
 
int(* d_ifstate )(FAR struct netif *dev)
 
int(* d_txavail )(FAR struct netif *dev)
 
int(* d_txpoll )(FAR struct netif *dev)
 
void * d_private
 
u8_t d_buf [MAX_NET_DEV_MTU+CONFIG_NET_GUARDSIZE]
 
struct dhcp * dhcp
 
struct netifnetif_list
 
struct netifnetif_default
 

Detailed Description

Macro Definition Documentation

#define ENABLE_LOOPBACK   (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)

Definition at line 85 of file netif.h.

#define ENABLE_LOOPBACK   (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)

Definition at line 85 of file netif.h.

#define IF__NETIF_CHECKSUM_ENABLED (   netif,
  chksumflag 
)

Definition at line 408 of file netif.h.

#define MAX_NET_DEV_MTU   1500

Definition at line 70 of file netif.h.

#define netif_get_client_data (   netif,
  id 
)    (netif)->client_data[(id)]

Get client data. Obtain ID from netif_alloc_client_data_id().

Definition at line 247 of file netif.h.

#define netif_is_link_up (   netif)    (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)

Ask if a link is up

Definition at line 477 of file netif.h.

#define netif_is_up (   netif)    (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)

Ask if an interface is up

Definition at line 465 of file netif.h.

#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.

Definition at line 94 of file netif.h.

#define NETIF_SET_CHECKSUM_CTRL (   netif,
  chksumflags 
)

Definition at line 407 of file netif.h.

#define netif_set_client_data (   netif,
  id,
  data 
)    netif_get_client_data(netif, id) = (data)

Set client data. Obtain ID from netif_alloc_client_data_id().

Definition at line 243 of file netif.h.

#define NETIF_SET_HWADDRHINT (   netif,
  hint 
)

Definition at line 531 of file netif.h.

Typedef Documentation

typedef err_t(* netif_init_fn) (struct netif *netif)

Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.

Parameters
netifThe netif to initialize

Definition at line 187 of file netif.h.

typedef err_t(* netif_input_fn) (struct pbuf *p, struct netif *inp)

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.

Parameters
pThe received packet, copied into a pbuf
inpThe netif which received the packet

Definition at line 194 of file netif.h.

typedef err_t(* netif_linkoutput_fn) (struct netif *netif, struct pbuf *p)

Function prototype for netif->linkoutput functions. Only used for ethernet netifs. This function is called by ARP when a packet shall be sent.

Parameters
netifThe netif which shall send a packet
pThe packet to send (raw ethernet packet)

Definition at line 226 of file netif.h.

typedef void(* netif_status_callback_fn) (struct netif *netif)

Function prototype for netif status- or link-callback functions.

Definition at line 228 of file netif.h.

Enumeration Type Documentation

Enumerator
LWIP_NETIF_CLIENT_DATA_INDEX_DHCP 
LWIP_NETIF_CLIENT_DATA_INDEX_MAX 

Definition at line 138 of file netif.h.

MAC Filter Actions, these are passed to a netif's igmp_mac_filter or mld_mac_filter callback function.

Enumerator
NETIF_DEL_MAC_FILTER 

Delete a filter entry

NETIF_ADD_MAC_FILTER 

Add a filter entry

Definition at line 175 of file netif.h.

Function Documentation

struct netif* netif_add ( struct netif netif,
void *  state,
netif_init_fn  init,
netif_input_fn  input 
)
u8_t netif_alloc_client_data_id ( void  )
struct netif* netif_find ( const char *  name)
void netif_init ( void  )
err_t netif_input ( struct pbuf *  p,
struct netif inp 
)
void netif_remove ( struct netif netif)
void netif_set_default ( struct netif netif)
void netif_set_down ( struct netif netif)
void netif_set_link_down ( struct netif netif)
void netif_set_link_up ( struct netif netif)
void netif_set_up ( struct netif netif)

Variable Documentation

void* client_data[LWIP_NETIF_CLIENT_DATA_INDEX_MAX+LWIP_NUM_NETIF_CLIENT_DATA]

Definition at line 308 of file netif.h.

u8_t d_buf[MAX_NET_DEV_MTU+CONFIG_NET_GUARDSIZE]

Definition at line 392 of file netif.h.

uint32_t d_draddr

Definition at line 379 of file netif.h.

u32_t d_flags

Definition at line 377 of file netif.h.

int(* d_ifdown) (FAR struct netif *dev)

Definition at line 383 of file netif.h.

char d_ifname[6]

Definition at line 370 of file netif.h.

int(* d_ifstate) (FAR struct netif *dev)

Definition at line 384 of file netif.h.

int(* d_ifup) (FAR struct netif *dev)

Definition at line 382 of file netif.h.

uint32_t d_ipaddr

Definition at line 378 of file netif.h.

u16_t d_len

Definition at line 376 of file netif.h.

struct ether_addr d_mac

Definition at line 374 of file netif.h.

uint32_t d_netmask

Definition at line 380 of file netif.h.

void* d_private

Definition at line 388 of file netif.h.

int(* d_txavail) (FAR struct netif *dev)

Definition at line 385 of file netif.h.

int(* d_txpoll) (FAR struct netif *dev)

Definition at line 386 of file netif.h.

struct dhcp* dhcp

Definition at line 395 of file netif.h.

u8_t flags

flags (

See also
Flags)

Definition at line 333 of file netif.h.

u8_t hwaddr[NETIF_MAX_HWADDR_LEN]

link level hardware address of this interface

Definition at line 331 of file netif.h.

u8_t hwaddr_len

number of bytes used in hwaddr

Definition at line 329 of file netif.h.

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

Definition at line 271 of file netif.h.

netif_linkoutput_fn linkoutput

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

u16_t mtu

maximum transfer unit (in bytes)

Definition at line 327 of file netif.h.

char name[2]

descriptive abbreviation

Definition at line 335 of file netif.h.

struct netif* netif_default

The default network interface.

struct netif* netif_list

The list of network interfaces.

struct netif* next

pointer to next in linked list

Definition at line 255 of file netif.h.

u8_t num

number of this interface

Definition at line 337 of file 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 306 of file netif.h.