Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Ethernet

Ethernet
["raw" APIs]

Functions

err_t ethernet_input (struct pbuf *p, struct netif *netif)
 Process received ethernet frames.

Function Documentation

err_t ethernet_input ( struct pbuf p,
struct netif netif 
)

Process received ethernet frames.

Using this function instead of directly calling ip_input and passing ARP frames through etharp in ethernetif_input, the ARP cache is protected from concurrent access.
Don't call directly, pass to netif_add() and call netif->input().

Parameters:
pthe received packet, p->payload pointing to the ethernet header
netifthe network interface on which the packet was received
See also:
LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
ETHARP_SUPPORT_VLAN
LWIP_HOOK_VLAN_CHECK

Send an ethernet packet on the network using netif->linkoutput(). The ethernet header is filled in before sending.

See also:
LWIP_HOOK_VLAN_SET
Parameters:
netifthe lwIP network interface on which to send the packet
pthe packet to send. pbuf layer must be PBUF_LINK.
srcthe source MAC address to be copied into the ethernet header
dstthe destination MAC address to be copied into the ethernet header
eth_typeethernet type (lwip_ieee_eth_type)
Returns:
ERR_OK if the packet was sent, any other err_t on failure

Definition at line 76 of file lwip_ethernet.c.