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

📄 ge_global.h

📁 程序是一个vxworks下对PMC公司3386千兆MAC芯片的驱动和配置
💻 H
字号:
/**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-
*	GE_Global.h - Ethernet 1000M code. 
*
*	Copyright 2001-12 by GDT, Inc
*
*	modification history
*	--------------------
*       2001-12-14,yxy created.
*
*/

#ifndef _INCLUDE_GE_GLOBAL_H
#define _INCLUDE_GE_GLOBAL_H

#include <vxWorks.h>

#define  ULONG        		unsigned long int     
#define  USHORT       		unsigned short int  
#define  UCHAR        		unsigned char

#define IP_PROTO    0x0800
#define ARP_PROTO   0x0806
#define MPLS_PROTO  0x8847

#define GIGA_LINECARD  2

#define NET_PORT_UP/*PORT_ENABLE*/   		1
#define NET_PORT_DOWN/*PORT_DISABLE*/ 		2

#define SYS_OK			0
#define SYS_FAIL		1

#define MAC_ADD_SIZ		6
#define IP_ADD_SIZ		4

#define FULL_DUPLEX		1
#define HALFFULL_DUPLEX 	2

#define NO_FIND_ENTRY 		1
#define FIND_ENTRY  		0

#define LINE_TYPE 		1
#define EN_DIS 			8

#define ERROR_NO_ERROR 		0
#define END_OF_TABLE  		202
#define TEMPT_OF_TABLE 		203  

#define SYS_UNKNOWN_PORT	255
#define SYS_UNKNOWN_RESULT	255

#define	 MAX_MSG_NUM		40
#define  MSG_LENGTH            	140
#define  SYS_PORT_CNT  		2

#define SYS_BDCOM_HEAD_SIZE	12
#define SYS_BDCOM_DATA_OFFSET 	20
/*
#define SYS_TYPE_OFFSET		12
#define SYS_SUBTYPE_OFFSET	20
#define SYS_EXPORT_OFFSET	21
#define SYS_LNPORT_OFFSET	22

#define SYS_MAIN_TYPE_OFFSET	12
#define SYS_MAIN_LEN_OFFSET	16
#define SYS_MAIN_SUBTYPE_OFFSET	20
#define SYS_MAIN_LNPORT_OFFSET	21
*/
/*base address*/
#define   INFPGABASE   		0x13012000
#define   OUTFPGABASE  		0x13013000
#define   PM3386BASE   		0x13010000

/*task_code*/
#define  GE_ARP_TASK_CODE            ARP_TASK_CODE
#define  GE_EVENTSTATIC_TASK_CODE    LINE_SYS_STATIC_TASK_CODE
#define  GE_MAINCMD_TASK_CODE        LINE_SYS_CMD_TASK_CODE
#define  GE_PROTO_RECEIVE_TASK_CODE  PROTO_REV_TASK_CODE
#define  GE_PROTO_SEND_TASK_CODE     PROTO_SEND_TASK_CODE
             
/*priority*/
#define	GE_ARP_TASK_PRI			70
#define GE_EVENTSTATISTIC_TASK_PRI	90
#define GE_MAINCOMMAND_TASK_PRI		80
#define GE_PROTOSEND_TASK_PRI		95
#define	GE_PROTORECEIVE_TASK_PRI	100

/***********************  message type between SYSCON & 1000M board**************************/
#define SYS_CONNECT_REQ		33	/* connect request ( Line card => contrl unit) */
#define SYS_SOFTWARE_LD_REQ	37 	/* software download command request( contrl unit => line card) */
#define SYS_SOFTWARE_LD_REP	38	/* software download command reply ( Line card => contrl unit) */
#define SYS_CONFIG_REQUEST	39	/* config information download command request (contrl unit=>line card)*/
#define SYS_CONFIG_REPLY	40	/* config information download command reply   (Line card=>contrl unit)*/
#define SYS_INITCOMMAND 	41 	/* board start command ( contrl unit => line card) */
#define SYS_INITCOMMAND_R	42	/* board start command reply ( Line card =>contrl unit)*/

#define SYS_SHUTDOWN		43 	/* shutdown ( contrl unit => line card) */ 

#define SYS_PORT_STAT_REQUEST 	44	/* port fpga stat req ( Line card =>contrl unit)*/
#define SYS_PORT_STAT_REPLY   	45	/* port fpga stat reply ( Line card =>contrl unit)*/

#define SYS_ARP_ENTRY_REQUEST 	47
#define SYS_ARP_ENTRY_REPLY   	48

#define SYS_STAT		50
#define SYS_EVENT_REPORT        51
    #define REPORT_MAIN_BACKUP	  1   	/*主控模块的主备状态通告 ( contrl unit => line card) */
    #define REPORT_LINE_STATE	  2	/*某线路接口工作状态改变报告

⌨️ 快捷键说明

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