mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Document ethernet level functions
This commit is contained in:
parent
c719c466b3
commit
e78bc41116
@ -102,21 +102,43 @@ PACK_STRUCT_END
|
|||||||
#define SIZEOF_VLAN_HDR 4
|
#define SIZEOF_VLAN_HDR 4
|
||||||
#define VLAN_ID(vlan_hdr) (htons((vlan_hdr)->prio_vid) & 0xFFF)
|
#define VLAN_ID(vlan_hdr) (htons((vlan_hdr)->prio_vid) & 0xFFF)
|
||||||
|
|
||||||
/* A list of often ethtypes (although lwIP does not use all of them): */
|
/**
|
||||||
#define ETHTYPE_IP 0x0800U /* Internet protocol v4 */
|
* @ingroup ethernet
|
||||||
#define ETHTYPE_ARP 0x0806U /* Address resolution protocol */
|
* A list of often ethtypes (although lwIP does not use all of them): */
|
||||||
#define ETHTYPE_WOL 0x0842U /* Wake on lan */
|
enum eth_type {
|
||||||
#define ETHTYPE_VLAN 0x8100U /* Virtual local area network */
|
/** Internet protocol v4 */
|
||||||
#define ETHTYPE_IPV6 0x86DDU /* Internet protocol v6 */
|
ETHTYPE_IP = 0x0800U,
|
||||||
#define ETHTYPE_PPPOEDISC 0x8863U /* PPP Over Ethernet Discovery Stage */
|
/** Address resolution protocol */
|
||||||
#define ETHTYPE_PPPOE 0x8864U /* PPP Over Ethernet Session Stage */
|
ETHTYPE_ARP = 0x0806U,
|
||||||
#define ETHTYPE_JUMBO 0x8870U /* Jumbo Frames */
|
/** Wake on lan */
|
||||||
#define ETHTYPE_PROFINET 0x8892U /* Process field network */
|
ETHTYPE_WOL = 0x0842U,
|
||||||
#define ETHTYPE_ETHERCAT 0x88A4U /* Ethernet for control automation technology */
|
/** RARP */
|
||||||
#define ETHTYPE_LLDP 0x88CCU /* Link layer discovery protocol */
|
ETHTYPE_RARP = 0x8035U,
|
||||||
#define ETHTYPE_SERCOS 0x88CDU /* Serial real-time communication system */
|
/** Virtual local area network */
|
||||||
#define ETHTYPE_PTP 0x88F7U /* Precision time protocol */
|
ETHTYPE_VLAN = 0x8100U,
|
||||||
#define ETHTYPE_QINQ 0x9100U /* Q-in-Q, 802.1ad */
|
/** Internet protocol v6 */
|
||||||
|
ETHTYPE_IPV6 = 0x86DDU,
|
||||||
|
/** PPP Over Ethernet Discovery Stage */
|
||||||
|
ETHTYPE_PPPOEDISC = 0x8863U,
|
||||||
|
/** PPP Over Ethernet Session Stage */
|
||||||
|
ETHTYPE_PPPOE = 0x8864U,
|
||||||
|
/** Jumbo Frames */
|
||||||
|
ETHTYPE_JUMBO = 0x8870U,
|
||||||
|
/** Process field network */
|
||||||
|
ETHTYPE_PROFINET = 0x8892U,
|
||||||
|
/** Ethernet for control automation technology */
|
||||||
|
ETHTYPE_ETHERCAT = 0x88A4U,
|
||||||
|
/** Link layer discovery protocol */
|
||||||
|
ETHTYPE_LLDP = 0x88CCU,
|
||||||
|
/** Serial real-time communication system */
|
||||||
|
ETHTYPE_SERCOS = 0x88CDU,
|
||||||
|
/** Media redundancy protocol */
|
||||||
|
ETHTYPE_MRP = 0x88E3U,
|
||||||
|
/** Precision time protocol */
|
||||||
|
ETHTYPE_PTP = 0x88F7U,
|
||||||
|
/** Q-in-Q, 802.1ad */
|
||||||
|
ETHTYPE_QINQ = 0x9100U
|
||||||
|
};
|
||||||
|
|
||||||
/** The 24-bit IANA IPv4-multicast OUI is 01-00-5e: */
|
/** The 24-bit IANA IPv4-multicast OUI is 01-00-5e: */
|
||||||
#define LL_IP4_MULTICAST_ADDR_0 0x01
|
#define LL_IP4_MULTICAST_ADDR_0 0x01
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Ethernet common functions
|
* Ethernet common functions
|
||||||
|
*
|
||||||
|
* @defgroup ethernet Ethernet
|
||||||
|
* @ingroup callbackstyle_api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -236,14 +239,17 @@ free_and_return:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send an ethernet packet on the network using netif->linkoutput
|
* @ingroup ethernet
|
||||||
|
* Send an ethernet packet on the network using netif->linkoutput().
|
||||||
* The ethernet header is filled in before sending.
|
* The ethernet header is filled in before sending.
|
||||||
*
|
*
|
||||||
|
* @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
|
||||||
|
*
|
||||||
* @param netif the lwIP network interface on which to send the packet
|
* @param netif the lwIP network interface on which to send the packet
|
||||||
* @param p the packet to send, p->payload pointing to the (uninitialized) ethernet header
|
* @param p the packet to send, p->payload pointing to the (uninitialized) ethernet header
|
||||||
* @param src the source MAC address to be copied into the ethernet header
|
* @param src the source MAC address to be copied into the ethernet header
|
||||||
* @param dst the destination MAC address to be copied into the ethernet header
|
* @param dst the destination MAC address to be copied into the ethernet header
|
||||||
* @param eth_type ethernet type
|
* @param eth_type ethernet type (@ref eth_type)
|
||||||
* @return ERR_OK if the packet was sent, any other err_t on failure
|
* @return ERR_OK if the packet was sent, any other err_t on failure
|
||||||
*/
|
*/
|
||||||
err_t
|
err_t
|
||||||
|
Loading…
Reference in New Issue
Block a user