RetroArch
Functions | Variables
netif.c File Reference
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
#include "lwip/tcp.h"
Include dependency graph for netif.c:

Functions

struct netifnetif_add (struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, void *state, err_t(*init)(struct netif *netif), err_t(*input)(struct pbuf *p, struct netif *netif))
 
void netif_set_addr (struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw)
 
void netif_remove (struct netif *netif)
 
struct netifnetif_find (char *name)
 
void netif_set_ipaddr (struct netif *netif, struct ip_addr *ipaddr)
 
void netif_set_gw (struct netif *netif, struct ip_addr *gw)
 
void netif_set_netmask (struct netif *netif, struct ip_addr *netmask)
 
void netif_set_default (struct netif *netif)
 
void netif_set_up (struct netif *netif)
 
u8_t netif_is_up (struct netif *netif)
 
void netif_set_down (struct netif *netif)
 
void netif_init (void)
 

Variables

struct netifnetif_list = NULL
 
struct netifnetif_default = NULL
 

Detailed Description

lwIP network interface abstraction

Function Documentation

◆ netif_add()

struct netif* netif_add ( struct netif netif,
struct ip_addr ipaddr,
struct ip_addr netmask,
struct ip_addr gw,
void state,
err_t(*)(struct netif *netif init,
err_t(*)(struct pbuf *p, struct netif *netif 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.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netif_find()

struct netif* netif_find ( char *  name)

◆ netif_init()

void netif_init ( void  )
Here is the caller graph for this function:

◆ netif_is_up()

u8_t netif_is_up ( struct netif netif)

Ask if an interface is up

Here is the caller graph for this function:

◆ netif_remove()

void netif_remove ( struct netif netif)

◆ netif_set_addr()

void netif_set_addr ( struct netif netif,
struct ip_addr ipaddr,
struct ip_addr netmask,
struct ip_addr gw 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netif_set_default()

void netif_set_default ( struct netif netif)
Here is the caller graph for this function:

◆ netif_set_down()

void netif_set_down ( struct netif netif)

Bring an interface down, disabling any traffic processing.

Note
: Enabling DHCP on a down interface will make it come up once configured.
See also
dhcp_start()

◆ netif_set_gw()

void netif_set_gw ( struct netif netif,
struct ip_addr gw 
)
Here is the caller graph for this function:

◆ netif_set_ipaddr()

void netif_set_ipaddr ( struct netif netif,
struct ip_addr ipaddr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netif_set_netmask()

void netif_set_netmask ( struct netif netif,
struct ip_addr netmask 
)
Here is the caller graph for this function:

◆ netif_set_up()

void netif_set_up ( struct netif netif)

Bring an interface up, available for processing traffic.

Note
: Enabling DHCP on a down interface will make it come up once configured.
See also
dhcp_start()
Here is the caller graph for this function:

Variable Documentation

◆ netif_default

struct netif* netif_default = NULL

The default network interface.

◆ netif_list

struct netif* netif_list = NULL

The list of network interfaces.