CoolPotOS/include/etherframe.h

20 lines
451 B
C
Raw Normal View History

2024-05-12 00:17:47 +08:00
#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