ethernet.h
来自「newos is new operation system」· C头文件 代码 · 共 30 行
H
30 行
/*** 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 + =
减小字号Ctrl + -
显示快捷键?