📄 enet.h
字号:
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2001/12/12 08:14:27 $* $Source: M:/psisrc/stack/incl/rcs/enet.h $* $Revision: 1.11 $*************************************************************************** File Description: Ethernet layer definitions***************************************************************************/#ifndef _ENET_#define _ENET_#include "config.h"#include "ccdep.h"#define ENET_RAW 0 /* protocol handle */#define EN_MAX_DATA 1500#define EN_MIN_DATA 46#define EN_MIN_PACKET (EN_MIN_DATA + EN_HDR_SIZE)#define EN_MAX_PACKET (EN_MAX_DATA + EN_HDR_SIZE)#define EN_HDR_SIZE 14#define EN_JAM_MAX 16#define EN_BACKOFF_MAX 10 /* maximum backoff exponent *//* OL: following structures need to be packed */#define ENH_DEST 0 /* destination address, 6 bytes */#define ENH_SOURCE 6 /* source address, 6 bytes */#define ENH_TYPE 12 /* type 2 bytes */#define SIZEOF_ENH (ENH_TYPE+2) /* size of ethernet header */typedef u8 ENH;/* Defined Ethernet types */#define EN_XNS 0x0600 /* XNS Packet */#define EN_IP 0x0800 /* Darpa Internet Protocol Packet */#define EN_ARP 0x0806 /* Address Resolution Protocol Packet */#define EN_RARP 0x8035 /* Reverse Address Resolution Protocol Packet */#define EN_KDB 0xBEEF /* EXPERIMENTAL Kernel DeBug Packet */#define EN_PPPOE_DIS 0x8863 /* PPPoE Protocol Discovery Phase Packet */#define EN_PPPOE_SES 0x8864 /* PPPoE Protocol Session Phase Packet */#ifdef ETHER_PROTOCOLimport st en_scomm(m * mp);import st en_up(m * mp);#endif/* macro to replace the isbroadcast function */#define isbroadcast(a48p) \ ( ( OS_MEMCMP( ((char *)a48p), (char *) &(fns_bcstring[0]),6)) ? false : true)#endif /*_ENET_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -