mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
arch/arm/src/lpc54xx: Resolves some design issues with multicast address filtering and also with AVBTP multi-channel operation (the latter design is still incomplete).
This commit is contained in:
@@ -57,13 +57,28 @@
|
||||
|
||||
/* Recognized values of the type bytes in the Ethernet header */
|
||||
|
||||
#define ETHTYPE_ARP 0x0806 /* Address resolution protocol */
|
||||
#define ETHTYPE_IP 0x0800 /* IP protocol */
|
||||
#define ETHTYPE_IP6 0x86dd /* IP protocol version 6 */
|
||||
#define ETHTYPE_ARP 0x0806 /* Address resolution protocol */
|
||||
#define ETHTYPE_IP 0x0800 /* IP protocol */
|
||||
#define ETHTYPE_IP6 0x86dd /* IP protocol version 6 */
|
||||
|
||||
/* Tag protocol identifier (TPID) of 0x8100 identifies the frame as an
|
||||
* IEEE 802.1Q-tagged frame. This field is located at the same position as
|
||||
* the Ethernet type field in untagged frames and is thus used to
|
||||
* distinguish the frame from untagged frames.
|
||||
*/
|
||||
|
||||
#define TPID_8021QVLAN 0x8100
|
||||
|
||||
/* These are some of the types then associated with withe QVLAN tagged
|
||||
* Ethernet packets.
|
||||
*/
|
||||
|
||||
#define ETHTYPE_AVBTP 0x22f0 /* Audio/Video bridging type */
|
||||
|
||||
/* Size of the Ethernet header */
|
||||
|
||||
#define ETH_HDRLEN 14 /* Minimum size: 2*6 + 2 */
|
||||
#define ETH_HDRLEN 14 /* Minimum size: 2*6 + 2 */
|
||||
#define ETH_8021Q_HDRLEN 18 /* Minimum size: 2*6 + 4 + 2 */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
@@ -81,6 +96,22 @@ struct eth_hdr_s
|
||||
uint16_t type; /* Type code (2 bytes) */
|
||||
};
|
||||
|
||||
/* IEEE 802.1Q adds a 32-bit field between the source MAC address and the
|
||||
* type fields of the original Ethernet header. Two bytes are used for the
|
||||
* tag protocol identifier (TPID), the other two bytes for tag control
|
||||
* information TCI). The TCI field is further divided into PCP, DEI, and
|
||||
* VID.
|
||||
*/
|
||||
|
||||
struct eth_8021qhdr_s
|
||||
{
|
||||
uint8_t dest[6]; /* Ethernet destination address (6 bytes) */
|
||||
uint8_t src[6]; /* Ethernet source address (6 bytes) */
|
||||
uint16_t tpid; /* TCI: Tag protocol identifier (2 bytes) */
|
||||
uint16_t tci; /* TCI: Tag control information: PCP, DEI, VID (2 bytes) */
|
||||
uint16_t type; /* Type code (2 bytes) */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user