⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ethernet.h

📁 newos is new operation system
💻 H
字号:
/*** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.** Distributed under the terms of the NewOS License.*/#ifndef _NEWOS_KERNEL_NET_ETHERNET_H#define _NEWOS_KERNEL_NET_ETHERNET_H#include <kernel/net/if.h>#include <kernel/cbuf.h>#define PROT_TYPE_IPV4 0x0800#define PROT_TYPE_ARP  0x0806#define ETHERNET_HEADER_SIZE (6+6+2)#define ETHERNET_MAX_SIZE (ETHERNET_HEADER_SIZE+1500)#define ETHERNET_MIN_SIZE (ETHERNET_HEADER_SIZE+46)typedef uint8 ethernet_addr[6];// not to be called directly, use the ifnet.link_output and link_inputint ethernet_input(cbuf *buf, ifnet *i);int ethernet_output(cbuf *buf, ifnet *i, netaddr *target, int protocol_type);int ethernet_init(void);void dump_ethernet_addr(ethernet_addr addr);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -