lwIP  2.0.2
Lightweight IP stack

Enumerations

enum  eth_type {
  ETHTYPE_IP = 0x0800U, ETHTYPE_ARP = 0x0806U, ETHTYPE_WOL = 0x0842U, ETHTYPE_RARP = 0x8035U,
  ETHTYPE_VLAN = 0x8100U, ETHTYPE_IPV6 = 0x86DDU, ETHTYPE_PPPOEDISC = 0x8863U, ETHTYPE_PPPOE = 0x8864U,
  ETHTYPE_JUMBO = 0x8870U, ETHTYPE_PROFINET = 0x8892U, ETHTYPE_ETHERCAT = 0x88A4U, ETHTYPE_LLDP = 0x88CCU,
  ETHTYPE_SERCOS = 0x88CDU, ETHTYPE_MRP = 0x88E3U, ETHTYPE_PTP = 0x88F7U, ETHTYPE_QINQ = 0x9100U
}
 

Functions

err_t ethernet_output (struct netif *netif, struct pbuf *p, const struct eth_addr *src, const struct eth_addr *dst, u16_t eth_type)
 

Detailed Description

Enumeration Type Documentation

◆ eth_type

enum eth_type

A list of often ethtypes (although lwIP does not use all of them):

Enumerator
ETHTYPE_IP 

Internet protocol v4

ETHTYPE_ARP 

Address resolution protocol

ETHTYPE_WOL 

Wake on lan

ETHTYPE_RARP 

RARP

ETHTYPE_VLAN 

Virtual local area network

ETHTYPE_IPV6 

Internet protocol v6

ETHTYPE_PPPOEDISC 

PPP Over Ethernet Discovery Stage

ETHTYPE_PPPOE 

PPP Over Ethernet Session Stage

ETHTYPE_JUMBO 

Jumbo Frames

ETHTYPE_PROFINET 

Process field network

ETHTYPE_ETHERCAT 

Ethernet for control automation technology

ETHTYPE_LLDP 

Link layer discovery protocol

ETHTYPE_SERCOS 

Serial real-time communication system

ETHTYPE_MRP 

Media redundancy protocol

ETHTYPE_PTP 

Precision time protocol

ETHTYPE_QINQ 

Q-in-Q, 802.1ad

Function Documentation

◆ ethernet_output()

err_t ethernet_output ( struct netif netif,
struct pbuf p,
const struct eth_addr *  src,
const struct eth_addr *  dst,
u16_t  eth_type 
)

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 (eth_type)
Returns
ERR_OK if the packet was sent, any other err_t on failure