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

📄 defxx.h

📁 powerpc内核mpc8241linux系统下net驱动程序
💻 H
📖 第 1 页 / 共 4 页
字号:
/* * File Name: *   defxx.h * * Copyright Information: *   Copyright Digital Equipment Corporation 1996. * *   This software may be used and distributed according to the terms of *   the GNU Public License, incorporated herein by reference. * * Abstract: *   Contains all definitions specified by port specification and required *   by the defxx.c driver. * * Maintainers: *   LVS	Lawrence V. Stefani * * Contact: *	 The author may be reached at: * *		Inet: stefani@lkg.dec.com *		Mail: Digital Equipment Corporation *			  550 King Street *			  M/S: LKG1-3/M07 *			  Littleton, MA  01460 * * Modification History: *		Date		Name	Description *		16-Aug-96	LVS		Created. *		09-Sep-96	LVS		Added group_prom field.  Moved read/write I/O *							macros to DEFXX.C. *		12-Sep-96	LVS		Removed packet request header pointers. */#ifndef _DEFXX_H_#define _DEFXX_H_/* Define basic types for unsigned chars, shorts, longs */typedef u8	PI_UINT8;typedef u16	PI_UINT16;typedef u32	PI_UINT32;/* Define general structures */typedef struct							/* 64-bit counter */	{	PI_UINT32  ms;	PI_UINT32  ls;	} PI_CNTR;typedef struct							/* LAN address */	{											PI_UINT32  lwrd_0;	PI_UINT32  lwrd_1;	} PI_LAN_ADDR;typedef struct							/* Station ID address */	{	PI_UINT32  octet_7_4;	PI_UINT32  octet_3_0;	} PI_STATION_ID;/* Define general constants */#define PI_ALIGN_K_DESC_BLK	  			8192	/* Descriptor block boundary		*/#define PI_ALIGN_K_CONS_BLK	  	 		64		/* Consumer block boundary		  	*/#define PI_ALIGN_K_CMD_REQ_BUFF  		128	 	/* Xmt Command que buffer alignment */#define PI_ALIGN_K_CMD_RSP_BUFF	 		128	 	/* Rcv Command que buffer alignment */#define PI_ALIGN_K_UNSOL_BUFF	 		128	 	/* Unsol que buffer alignment	   	*/#define PI_ALIGN_K_XMT_DATA_BUFF 		0	   	/* Xmt data que buffer alignment	*/#define PI_ALIGN_K_RCV_DATA_BUFF 		128	 	/* Rcv que buffer alignment			*//* Define PHY index values */#define PI_PHY_K_S						0		/* Index to S phy */#define PI_PHY_K_A						0		/* Index to A phy */#define PI_PHY_K_B						1		/* Index to B phy */#define PI_PHY_K_MAX					2		/* Max number of phys *//* Define FMC descriptor fields */#define PI_FMC_DESCR_V_SOP				31#define PI_FMC_DESCR_V_EOP				30#define PI_FMC_DESCR_V_FSC				27#define PI_FMC_DESCR_V_FSB_ERROR		26#define PI_FMC_DESCR_V_FSB_ADDR_RECOG	25#define PI_FMC_DESCR_V_FSB_ADDR_COPIED	24#define PI_FMC_DESCR_V_FSB				22#define PI_FMC_DESCR_V_RCC_FLUSH		21#define PI_FMC_DESCR_V_RCC_CRC			20#define PI_FMC_DESCR_V_RCC_RRR			17#define PI_FMC_DESCR_V_RCC_DD			15#define PI_FMC_DESCR_V_RCC_SS			13#define PI_FMC_DESCR_V_RCC				13#define PI_FMC_DESCR_V_LEN				0#define PI_FMC_DESCR_M_SOP				0x80000000#define PI_FMC_DESCR_M_EOP				0x40000000#define PI_FMC_DESCR_M_FSC				0x38000000#define PI_FMC_DESCR_M_FSB_ERROR		0x04000000#define PI_FMC_DESCR_M_FSB_ADDR_RECOG	0x02000000#define PI_FMC_DESCR_M_FSB_ADDR_COPIED	0x01000000#define PI_FMC_DESCR_M_FSB				0x07C00000#define PI_FMC_DESCR_M_RCC_FLUSH		0x00200000#define PI_FMC_DESCR_M_RCC_CRC			0x00100000#define PI_FMC_DESCR_M_RCC_RRR			0x000E0000#define PI_FMC_DESCR_M_RCC_DD			0x00018000#define PI_FMC_DESCR_M_RCC_SS			0x00006000#define PI_FMC_DESCR_M_RCC				0x003FE000#define PI_FMC_DESCR_M_LEN				0x00001FFF#define PI_FMC_DESCR_K_RCC_FMC_INT_ERR	0x01AA#define PI_FMC_DESCR_K_RRR_SUCCESS		0x00#define PI_FMC_DESCR_K_RRR_SA_MATCH		0x01#define PI_FMC_DESCR_K_RRR_DA_MATCH		0x02#define PI_FMC_DESCR_K_RRR_FMC_ABORT	0x03#define PI_FMC_DESCR_K_RRR_LENGTH_BAD	0x04#define PI_FMC_DESCR_K_RRR_FRAGMENT		0x05#define PI_FMC_DESCR_K_RRR_FORMAT_ERR	0x06#define PI_FMC_DESCR_K_RRR_MAC_RESET	0x07#define PI_FMC_DESCR_K_DD_NO_MATCH		0x0#define PI_FMC_DESCR_K_DD_PROMISCUOUS	0x1#define PI_FMC_DESCR_K_DD_CAM_MATCH		0x2#define PI_FMC_DESCR_K_DD_LOCAL_MATCH	0x3#define PI_FMC_DESCR_K_SS_NO_MATCH		0x0#define PI_FMC_DESCR_K_SS_BRIDGE_MATCH	0x1#define PI_FMC_DESCR_K_SS_NOT_POSSIBLE	0x2#define PI_FMC_DESCR_K_SS_LOCAL_MATCH	0x3/* Define some max buffer sizes */#define PI_CMD_REQ_K_SIZE_MAX			512#define PI_CMD_RSP_K_SIZE_MAX			512#define PI_UNSOL_K_SIZE_MAX				512#define PI_SMT_HOST_K_SIZE_MAX			4608		/* 4 1/2 K */#define PI_RCV_DATA_K_SIZE_MAX			4608		/* 4 1/2 K */#define PI_XMT_DATA_K_SIZE_MAX			4608		/* 4 1/2 K *//* Define adapter states */#define PI_STATE_K_RESET				0#define PI_STATE_K_UPGRADE		  		1#define PI_STATE_K_DMA_UNAVAIL			2#define PI_STATE_K_DMA_AVAIL			3#define PI_STATE_K_LINK_AVAIL			4#define PI_STATE_K_LINK_UNAVAIL	 		5#define PI_STATE_K_HALTED		   		6#define PI_STATE_K_RING_MEMBER			7#define PI_STATE_K_NUMBER				8 /* Define codes for command type */#define PI_CMD_K_START					0x00#define PI_CMD_K_FILTERS_SET			0x01#define PI_CMD_K_FILTERS_GET			0x02#define PI_CMD_K_CHARS_SET				0x03#define PI_CMD_K_STATUS_CHARS_GET		0x04#define PI_CMD_K_CNTRS_GET				0x05#define PI_CMD_K_CNTRS_SET				0x06#define PI_CMD_K_ADDR_FILTER_SET		0x07#define PI_CMD_K_ADDR_FILTER_GET		0x08#define PI_CMD_K_ERROR_LOG_CLEAR		0x09#define PI_CMD_K_ERROR_LOG_GET			0x0A#define PI_CMD_K_FDDI_MIB_GET			0x0B#define PI_CMD_K_DEC_EXT_MIB_GET		0x0C#define PI_CMD_K_DEVICE_SPECIFIC_GET	0x0D#define PI_CMD_K_SNMP_SET				0x0E#define PI_CMD_K_UNSOL_TEST				0x0F#define PI_CMD_K_SMT_MIB_GET			0x10#define PI_CMD_K_SMT_MIB_SET			0x11#define PI_CMD_K_MAX					0x11	/* Must match last *//* Define item codes for Chars_Set and Filters_Set commands */#define PI_ITEM_K_EOL					0x00 	/* End-of-Item list 		  */#define PI_ITEM_K_T_REQ					0x01 	/* DECnet T_REQ 			  */#define PI_ITEM_K_TVX					0x02 	/* DECnet TVX 				  */#define PI_ITEM_K_RESTRICTED_TOKEN		0x03 	/* DECnet Restricted Token 	  */	 #define PI_ITEM_K_LEM_THRESHOLD			0x04 	/* DECnet LEM Threshold 	  */#define PI_ITEM_K_RING_PURGER			0x05 	/* DECnet Ring Purger Enable  */	#define PI_ITEM_K_CNTR_INTERVAL			0x06 	/* Chars_Set 				  */#define PI_ITEM_K_IND_GROUP_PROM		0x07 	/* Filters_Set 				  */#define PI_ITEM_K_GROUP_PROM			0x08 	/* Filters_Set 				  */#define PI_ITEM_K_BROADCAST				0x09 	/* Filters_Set 				  */#define PI_ITEM_K_SMT_PROM				0x0A 	/* Filters_Set				  */#define PI_ITEM_K_SMT_USER				0x0B 	/* Filters_Set 				  */#define PI_ITEM_K_RESERVED				0x0C 	/* Filters_Set 				  */#define PI_ITEM_K_IMPLEMENTOR			0x0D 	/* Filters_Set 				  */#define PI_ITEM_K_LOOPBACK_MODE			0x0E 	/* Chars_Set 				  */#define PI_ITEM_K_CONFIG_POLICY			0x10 	/* SMTConfigPolicy 			  */#define PI_ITEM_K_CON_POLICY			0x11 	/* SMTConnectionPolicy 		  */#define PI_ITEM_K_T_NOTIFY				0x12 	/* SMTTNotify 				  */#define PI_ITEM_K_STATION_ACTION		0x13 	/* SMTStationAction			  */#define PI_ITEM_K_MAC_PATHS_REQ	   		0x15 	/* MACPathsRequested 		  */#define PI_ITEM_K_MAC_ACTION			0x17 	/* MACAction 				  */#define PI_ITEM_K_CON_POLICIES			0x18 	/* PORTConnectionPolicies	  */#define PI_ITEM_K_PORT_PATHS_REQ		0x19 	/* PORTPathsRequested 		  */#define PI_ITEM_K_MAC_LOOP_TIME			0x1A 	/* PORTMACLoopTime 			  */#define PI_ITEM_K_TB_MAX				0x1B 	/* PORTTBMax 				  */#define PI_ITEM_K_LER_CUTOFF			0x1C 	/* PORTLerCutoff 			  */#define PI_ITEM_K_LER_ALARM				0x1D 	/* PORTLerAlarm 			  */#define PI_ITEM_K_PORT_ACTION			0x1E 	/* PORTAction 				  */#define PI_ITEM_K_FLUSH_TIME			0x20 	/* Chars_Set 				  */#define PI_ITEM_K_MAC_T_REQ				0x29 	/* MACTReq 					  */#define PI_ITEM_K_EMAC_RING_PURGER		0x2A 	/* eMACRingPurgerEnable		  */#define PI_ITEM_K_EMAC_RTOKEN_TIMEOUT	0x2B 	/* eMACRestrictedTokenTimeout */#define PI_ITEM_K_FDX_ENB_DIS			0x2C 	/* eFDXEnable				  */#define PI_ITEM_K_MAX					0x2C 	/* Must equal high item		  *//* Values for some of the items */#define PI_K_FALSE						0	   /* Generic false */#define PI_K_TRUE						1	   /* Generic true  */#define PI_SNMP_K_TRUE					1	   /* SNMP true/false values */#define PI_SNMP_K_FALSE					2#define PI_FSTATE_K_BLOCK				0	   /* Filter State */#define PI_FSTATE_K_PASS				1/* Define command return codes */#define PI_RSP_K_SUCCESS				0x00#define PI_RSP_K_FAILURE				0x01#define PI_RSP_K_WARNING				0x02#define PI_RSP_K_LOOP_MODE_BAD			0x03#define PI_RSP_K_ITEM_CODE_BAD			0x04#define PI_RSP_K_TVX_BAD				0x05#define PI_RSP_K_TREQ_BAD				0x06#define PI_RSP_K_TOKEN_BAD				0x07#define PI_RSP_K_NO_EOL					0x0C#define PI_RSP_K_FILTER_STATE_BAD		0x0D#define PI_RSP_K_CMD_TYPE_BAD			0x0E#define PI_RSP_K_ADAPTER_STATE_BAD		0x0F#define PI_RSP_K_RING_PURGER_BAD		0x10#define PI_RSP_K_LEM_THRESHOLD_BAD		0x11#define PI_RSP_K_LOOP_NOT_SUPPORTED		0x12#define PI_RSP_K_FLUSH_TIME_BAD			0x13#define PI_RSP_K_NOT_IMPLEMENTED		0x14#define PI_RSP_K_CONFIG_POLICY_BAD		0x15#define PI_RSP_K_STATION_ACTION_BAD		0x16#define PI_RSP_K_MAC_ACTION_BAD			0x17#define PI_RSP_K_CON_POLICIES_BAD		0x18#define PI_RSP_K_MAC_LOOP_TIME_BAD		0x19#define PI_RSP_K_TB_MAX_BAD				0x1A#define PI_RSP_K_LER_CUTOFF_BAD			0x1B#define PI_RSP_K_LER_ALARM_BAD			0x1C#define PI_RSP_K_MAC_PATHS_REQ_BAD		0x1D#define PI_RSP_K_MAC_T_REQ_BAD			0x1E#define PI_RSP_K_EMAC_RING_PURGER_BAD	0x1F#define PI_RSP_K_EMAC_RTOKEN_TIME_BAD	0x20#define PI_RSP_K_NO_SUCH_ENTRY			0x21#define PI_RSP_K_T_NOTIFY_BAD			0x22#define PI_RSP_K_TR_MAX_EXP_BAD			0x23#define PI_RSP_K_MAC_FRM_ERR_THR_BAD	0x24#define PI_RSP_K_MAX_T_REQ_BAD			0x25#define PI_RSP_K_FDX_ENB_DIS_BAD		0x26#define PI_RSP_K_ITEM_INDEX_BAD			0x27#define PI_RSP_K_PORT_ACTION_BAD		0x28/* Commonly used structures */typedef struct									/* Item list */	{	PI_UINT32  item_code;	PI_UINT32  value;	} PI_ITEM_LIST;typedef struct									/* Response header */	{	PI_UINT32  reserved;	PI_UINT32  cmd_type;	PI_UINT32  status;	} PI_RSP_HEADER;/* Start Command */typedef struct	{	PI_UINT32  cmd_type;	} PI_CMD_START_REQ;/* Start Response */typedef struct 	{	PI_RSP_HEADER   header;		} PI_CMD_START_RSP;/* Filters_Set Request */#define PI_CMD_FILTERS_SET_K_ITEMS_MAX  63		/* Fits in a 512 byte buffer */typedef struct 	{	PI_UINT32		cmd_type;	PI_ITEM_LIST	item[PI_CMD_FILTERS_SET_K_ITEMS_MAX];	} PI_CMD_FILTERS_SET_REQ;/* Filters_Set Response */typedef struct	{	PI_RSP_HEADER   header;		} PI_CMD_FILTERS_SET_RSP;/* Filters_Get Request */typedef struct	{	PI_UINT32		cmd_type;   	} PI_CMD_FILTERS_GET_REQ;/* Filters_Get Response */typedef struct 	{	PI_RSP_HEADER   header;		PI_UINT32		ind_group_prom;	PI_UINT32		group_prom;	PI_UINT32		broadcast_all;	PI_UINT32		smt_all;	PI_UINT32		smt_user;	PI_UINT32		reserved_all;	PI_UINT32		implementor_all;	} PI_CMD_FILTERS_GET_RSP;/* Chars_Set Request */#define PI_CMD_CHARS_SET_K_ITEMS_MAX 42		/* Fits in a 512 byte buffer */typedef struct	{	PI_UINT32		cmd_type;	struct							  		/* Item list */		{		PI_UINT32	item_code;		PI_UINT32	value;		PI_UINT32	item_index;		} item[PI_CMD_CHARS_SET_K_ITEMS_MAX];		} PI_CMD_CHARS_SET_REQ;/* Chars_Set Response */typedef struct	{	PI_RSP_HEADER   header;		} PI_CMD_CHARS_SET_RSP;/* SNMP_Set Request */#define PI_CMD_SNMP_SET_K_ITEMS_MAX 42	   	/* Fits in a 512 byte buffer */typedef struct	{	PI_UINT32		cmd_type;	struct							   		/* Item list */		{		PI_UINT32	item_code;		PI_UINT32	value;		PI_UINT32	item_index;		} item[PI_CMD_SNMP_SET_K_ITEMS_MAX];		} PI_CMD_SNMP_SET_REQ;/* SNMP_Set Response */typedef struct	{	PI_RSP_HEADER   header;		} PI_CMD_SNMP_SET_RSP;/* SMT_MIB_Set Request */#define PI_CMD_SMT_MIB_SET_K_ITEMS_MAX 42	/* Max number of items */ typedef struct	{	PI_UINT32	cmd_type;	struct		{		PI_UINT32	item_code;		PI_UINT32	value;		PI_UINT32	item_index;		} item[PI_CMD_SMT_MIB_SET_K_ITEMS_MAX];	} PI_CMD_SMT_MIB_SET_REQ;/* SMT_MIB_Set Response */typedef struct	{	PI_RSP_HEADER   header;		} PI_CMD_SMT_MIB_SET_RSP;/* SMT_MIB_Get Request */typedef struct	{	PI_UINT32  cmd_type;	} PI_CMD_SMT_MIB_GET_REQ;/* SMT_MIB_Get Response */typedef struct						  /* Refer to ANSI FDDI SMT Rev. 7.3 */	{	PI_RSP_HEADER  header;		/* SMT GROUP */														  	PI_STATION_ID  	smt_station_id;	PI_UINT32 		smt_op_version_id;	PI_UINT32	   	smt_hi_version_id;	PI_UINT32	   	smt_lo_version_id;	PI_UINT32	   	smt_user_data[8];	PI_UINT32	   	smt_mib_version_id;	PI_UINT32	   	smt_mac_ct;	PI_UINT32	   	smt_non_master_ct;	PI_UINT32	   	smt_master_ct;	PI_UINT32	   	smt_available_paths;	PI_UINT32	   	smt_config_capabilities;	PI_UINT32	   	smt_config_policy;	PI_UINT32	   	smt_connection_policy;	PI_UINT32	   	smt_t_notify;	PI_UINT32	   	smt_stat_rpt_policy;	PI_UINT32	   	smt_trace_max_expiration;	PI_UINT32	   	smt_bypass_present;	PI_UINT32	  	smt_ecm_state;	PI_UINT32	   	smt_cf_state;	PI_UINT32	   	smt_remote_disconnect_flag;	PI_UINT32	   	smt_station_status;	PI_UINT32	   	smt_peer_wrap_flag;	PI_CNTR	   		smt_msg_time_stamp;	PI_CNTR	  		smt_transition_time_stamp;	/* MAC GROUP */	PI_UINT32		mac_frame_status_functions;	PI_UINT32		mac_t_max_capability;	PI_UINT32		mac_tvx_capability;

⌨️ 快捷键说明

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