CoolPotOS/include/etherframe.h
2024-05-12 00:17:47 +08:00

20 lines
451 B
C
Raw 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.

#ifndef CRASHPOWEROS_ETHERFRAME_H
#define CRASHPOWEROS_ETHERFRAME_H
#include <stdint.h>
struct EthernetFrame_head {
uint8_t dest_mac[6];
uint8_t src_mac[6];
uint16_t type;
} __attribute__((packed));
struct EthernetFrame_tail {
uint32_t CRC; // 这里可以填写为0网卡会自动计算
};
void ether_frame_provider_send(uint64_t dest_mac, uint16_t type, uint8_t *buffer,
uint32_t size);
#endif