STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Macros | Functions | Variables
netif.c File Reference
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/ip_addr.h"
#include "lwip/ip6_addr.h"
#include "lwip/netif.h"
#include "lwip/priv/tcp_priv.h"
#include "lwip/udp.h"
#include "lwip/snmp.h"
#include "lwip/igmp.h"
#include "netif/etharp.h"
#include "lwip/stats.h"
#include "lwip/sys.h"

Go to the source code of this file.

Macros

#define NETIF_STATUS_CALLBACK(n)
 
#define NETIF_LINK_CALLBACK(n)
 
#define NETIF_REPORT_TYPE_IPV4   0x01
 
#define NETIF_REPORT_TYPE_IPV6   0x02
 

Functions

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)
 

Variables

struct netifnetif_list
 
struct netifnetif_default
 

Detailed Description

lwIP network interface abstraction

Definition in file netif.c.

Macro Definition Documentation

#define NETIF_LINK_CALLBACK (   n)

Definition at line 81 of file netif.c.

#define NETIF_REPORT_TYPE_IPV4   0x01

Definition at line 89 of file netif.c.

#define NETIF_REPORT_TYPE_IPV6   0x02

Definition at line 90 of file netif.c.

#define NETIF_STATUS_CALLBACK (   n)

Definition at line 75 of file netif.c.

Function Documentation

struct netif* netif_add ( struct netif netif,
void *  state,
netif_init_fn  init,
netif_input_fn  input 
)

Add a network interface to the list of lwIP netifs.

Parameters
netifa pre-allocated netif structure
ipaddrIP address for the new netif
netmasknetwork mask for the new netif
gwdefault gateway IP address for the new netif
stateopaque data passed to the new netif
initcallback function that initializes the interface
inputcallback function that is called to pass ingress packets up in the protocol layer stack.
Returns
netif, or NULL if failed.

Definition at line 184 of file netif.c.

struct netif* netif_find ( const char *  name)

Find a network interface by searching for its name

Parameters
namethe name of the netif (like netif->name) plus concatenated number in ascii representation (e.g. 'en0')

Definition at line 389 of file netif.c.

void netif_init ( void  )

Definition at line 139 of file netif.c.

void netif_remove ( struct netif netif)

Remove a network interface from the list of lwIP netifs.

Parameters
netifthe network interface to remove

Definition at line 319 of file netif.c.

void netif_set_default ( struct netif netif)

Set a network interface as the default network interface (used to output all packets for which no specific route is found)

Parameters
netifthe default network interface

Definition at line 511 of file netif.c.

void netif_set_down ( struct netif netif)

Bring an interface down, disabling any traffic processing.

Definition at line 587 of file netif.c.

void netif_set_link_down ( struct netif netif)

Called by a driver when its link goes down

Definition at line 660 of file netif.c.

void netif_set_link_up ( struct netif netif)

Called by a driver when its link goes up

Definition at line 632 of file netif.c.

void netif_set_up ( struct netif netif)

Bring an interface up, available for processing traffic.

Definition at line 530 of file netif.c.

Variable Documentation

struct netif* netif_default

The default network interface.

Definition at line 85 of file netif.c.

struct netif* netif_list

The list of network interfaces.

Definition at line 84 of file netif.c.