The Pedigree Project 0.1
Macros | Functions | Variables
netif.c File Reference
#include "lwip/opt.h"
#include <string.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/raw.h"
#include "lwip/snmp.h"
#include "lwip/igmp.h"
#include "lwip/etharp.h"
#include "lwip/stats.h"
#include "lwip/sys.h"
#include "lwip/ip.h"
#include "netif/ethernet.h"
+ Include dependency graph for netif.c:

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)
 
err_t netif_input (struct pbuf *p, struct netif *inp)
 
struct netif * netif_add (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
 
void netif_remove (struct netif *netif)
 
struct netif * netif_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 netif * netif_list
 
struct netif * netif_default
 

Detailed Description

lwIP network interface abstraction

Definition in file netif.c.

Macro Definition Documentation

◆ NETIF_LINK_CALLBACK

#define NETIF_LINK_CALLBACK (   n)

Definition at line 120 of file netif.c.

◆ NETIF_REPORT_TYPE_IPV4

#define NETIF_REPORT_TYPE_IPV4   0x01

Definition at line 132 of file netif.c.

◆ NETIF_REPORT_TYPE_IPV6

#define NETIF_REPORT_TYPE_IPV6   0x02

Definition at line 133 of file netif.c.

◆ NETIF_STATUS_CALLBACK

#define NETIF_STATUS_CALLBACK (   n)

Definition at line 114 of file netif.c.

Function Documentation

◆ netif_init()

void netif_init ( void  )

Definition at line 182 of file netif.c.

◆ netif_input()

err_t netif_input ( struct pbuf *  p,
struct netif *  inp 
)

Forwards a received packet for input processing with ethernet_input() or ip_input() depending on netif flags. Don't call directly, pass to netif_add() and call netif->input(). Only works if the netif driver correctly sets NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag!

Definition at line 222 of file netif.c.

References netif::flags, NETIF_FLAG_ETHARP, and NETIF_FLAG_ETHERNET.

Variable Documentation

◆ netif_default

struct netif* netif_default

The default network interface.

Definition at line 124 of file netif.c.

Referenced by netif_remove(), and netif_set_default().

◆ netif_list

struct netif* netif_list

The list of network interfaces.

Definition at line 123 of file netif.c.

Referenced by netif_add(), netif_find(), and netif_remove().