Barrelfish
Functions
bfeth.c File Reference

Functions

void bfeth_input (struct netif *netif, uint64_t pbuf_id, uint64_t paddr, uint64_t len, uint64_t packet_len, struct pbuf *pp)
 
err_t bfeth_init (struct netif *netif)
 

Detailed Description

Barrelfish standard ethernet interface

Function Documentation

err_t bfeth_init ( struct netif netif)

Should be called at the beginning of the program to set up the network interface. It calls the function low_level_init() to do the actual setup of the hardware.

This function should be passed as a parameter to netif_add().

Parameters
netifthe lwip network interface structure for this bfeth
Returns
ERR_OK if the loopif is initialized ERR_MEM if private data couldn't be allocated any other err_t on error
void bfeth_input ( struct netif netif,
uint64_t  pbuf_id,
uint64_t  paddr,
uint64_t  len,
uint64_t  packet_len,
struct pbuf *  pp 
)

This function should be called when a packet is ready to be read from the interface. It uses the function low_level_input() that should handle the actual reception of bytes from the network interface. Then the type of the received packet is determined and the appropriate input function is called.

Parameters
netifthe lwip network interface structure for this bfeth