sitara_depot/components/free_rtos/ethernet/eth_frame.h

41 lines
860 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* eth_frame.h
*
* Created on: 7 мар. 2023 г.
* Author: sychev
*/
#ifndef FREE_RTOS_ETHERNET_ETH_FRAME_H_
#define FREE_RTOS_ETHERNET_ETH_FRAME_H_
#include <stdint.h>
#define ETH_FRAME_MAC_ADDR_LEN_BYTES (6u)
#define ETH_FRAME_MAC_ADDR_MASK (0xFFFFFFFFFFFFul)
#define ETH_FRAME_MAC_ADDR_BROADCAST (0xFFFFFFFFFFFFul)
#define ETH_FRAME_MIN_LEN (14u)
#define ETH_FRAME_MAX_LEN (1518u)
typedef union {
uint64_t addr;
uint8_t bytes[8];
} __attribute__ ((packed)) TEthFrameMacAddr;
typedef struct {
uint8_t mac_dest[ETH_FRAME_MAC_ADDR_LEN_BYTES];
uint8_t mac_src[ETH_FRAME_MAC_ADDR_LEN_BYTES];
uint16_t prot_id;
} __attribute__ ((packed)) TEthFrameHeader;
typedef struct {
uint8_t data[ETH_FRAME_MAX_LEN]; //__attribute__ ((aligned(32)))
uint32_t length;
}TEthPkt;
#endif /* FREE_RTOS_ETHERNET_ETH_FRAME_H_ */