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

📄 mplsldp.h

📁 技术文件名称:MPLSv1.0软件模块测试规程
💻 H
📖 第 1 页 / 共 2 页
字号:
/********************************************************************          
*	Product Name:	ZXB10                                       	          
*	Module  Name:	EPPC    										
*	File    Name:   mplsldp.h								        	          
*	Function    :	definition of struct for mpls lsr mib and stat 
*                   information
*   History:
*   Date          Version        modifier         Activities 
* ==================================================================
*   01-8-9         2.1.2        Sun Baoping        create		
********************************************************************/ 

#ifndef MPLSLDP_H
#define MPLSLDP_H

#include "mpls.h"
#include "mplsOamS.h"

/* #include "ldpcomn.h" */
#include "_noalign.h"

/* mpls ldp entity table  */
typedef struct {
	unsigned char			RowStatus;         /* in RFC1903/1902, (R-W)
                                         active(1), notInService(2), notReady(3),
                                         createAndGo(4), createAndWait(5), destroy(6) */  
	mplsLdpId_t		ldpId;             /* =(ipaddress + 0)entityLdpId和entityIndex都可以用来检索此表 */
	unsigned long			index;             /*ifindex*/
	unsigned char          	protocolVersion;   /*=1   (R-W)值为0表示未知, long型 in the mib  */	
 	unsigned char        	adminStatus;       /*=1   (R-W).enable(1),disable(2), what cisco 
 	                                     done is wrong ,becauseits default is disable,
 	                                     long型 and continuous in the mib */ 
   	unsigned char 			operStatus;        /*=1        (R-O)operational status of this entity.
   	                                               unknown(0),enabled(1),disabled(2),
   	                                               long型 and continuous in the mib*/ 	
	unsigned short			wellKnownTcpDiscoveryPort;     /*=646  (R-W), ulong型 in the mib */
	unsigned short			wellKnownUdpDiscoveryPort;     /*=646  (R-W),ulong型 in the mib*/
	unsigned short         	maxPduLength;                  /*=4096 UNITS is "octets", (R-W),unsigned long in the mib*/
	unsigned long			keepAliveHoldTimer;            /*=60 (defval:40 in the mib)  (R-W) UNITS is "seconds",nicety is "10 microseconds"*/
	unsigned long 			helloHoldTimer;                /*=15 (R-W) 值为0表示默认值(link hello:15s,targeted hello:45s),其它值表示无穷大*/
	unsigned char 		    failedInitSessiontrapenable;   /*=1,(R-W), enable(1),disable(2),long型 and continuous in the mib,
	                                                when enabled the trap(当会话初始化一方超过超过阈值时,对等方要发送通告消息) is generated*/
	unsigned short 		    failedInitSessionThreshold;    /*=8 (R-W),当会话初始化一方超过超过阈值时,对等方要发送通告消息,
	                                                long型 in the mib,*/
	unsigned char			labelDistributionMethod;       /*=1 (R-W),downstreamOnDemand(1),downstreamUnsolicited(2),
	                                                long型 and continuous in the mib */
	unsigned char			labelretentionmode;            /*=1,(R-W),conservative(1),liberal(2),long型 and continuous in the mib */
	unsigned char			pvLimitMismatchtrapenabled;    /*=1,(R-W), enable(1),disable(2),long型 and continuous in the mib  */
	unsigned char			pathvectorlimit;               /*range is 0..255,(R-W),if the value is 0 
	                                                 then loop dection for path vectors is diabled*/
	unsigned char			hopcountlimit;                 /*range is 0..255,(R-W),"0" indicates "diabled"*/
	unsigned char			targetedpeer;          /*=0,(R-W), true(1),false(0),set this  to true when using targeted peer */
	unsigned short          targetedPeerAddrType;  /*=1 (R-W), IPv4(1),IPv6(2)*/
	unsigned long           targetedPeerAddr;      /*=0 (R-W), the internetwork layer address is used for the extended discovery */
	unsigned char			optionalParameters;    /*=2   (R-W)MplsLdpLabelTypes,generic(1)表示初始化消息中不带可选参数,
											    atmParameters(2)表示对应这个Entity表项要产生一个mplsLdpEntityAtmParms表项,
											    frameRelayParameters(3)表示对应这个Entity表项要产生一个mplsLdpEntityFrameRelayParms表项*/
	unsigned long			discontinuitytime;     /*(R-O),UNITS is "seconds",nicety is "10 microseconds"*/
	unsigned char			storagetype;           /* in RFC1903 
	                                          other(1),
	                                          volatile(2),    -- e.g., in RAM
                                              nonVolatile(3), -- e.g., in NVRAM
                                              permanent(4),   -- e.g., partially in ROM
                                              readOnly(5)     -- e.g., completely in ROM
                                           */
	
	/* the following items not in the mib */
	unsigned char               loopDetectionCapable;  /*(R-W),none(1),other(2),hopcount(3),pathvector(4),hopcountandpathvector(5)*/
	unsigned char               controlMode;           /* =1, 1: ordered    2: independent */
	backOff_t           backOff;               /* 5-65535*/
	unsigned short			    mtu;                   /* default 1500 */
	unsigned long               transAddr;             /* transport address   sbp 2002-6-18 */
	unsigned char               transFlag;             /* 0: not config,  1: config  sbp 2002-6-18 */
	unsigned short              ifIndex;
	interface_name_t	ifName;
}MPLS_PACK MplsLdpEntityTable_t;

/*  mpls ldp entity configurable generic label range table */
typedef struct {
	unsigned char			RowStatus;          /* has the same value of the rowstatus related to this entry in the entity table*/
	unsigned long 			labelRngMin;
	unsigned long			labelRngMax;
	unsigned long			ifIndexorZero;
	unsigned char			storageType;
	
	/* the following items not in the mib */
	mplsLdpId_t		entityLdpId;        /* the same as the ldpId related to this entry in the entity table*/
	unsigned long			entityindex;        /* the same as the index related to this entry in the entity table*/
	
	interface_name_t	ifName;
	unsigned short              ifIndex;
}MPLS_PACK MplsLdpEntityConfGenericLabelRangeTable_t;

/*  mpls ldp entity atm parameter table  */
typedef struct {
	unsigned char			RowStatus;            /* has the same value of the rowstatus related to this entry in the entity table*/
	unsigned long			ifindexorzero;        /* 可以去掉,因为除了0值其他和entityindex重复*/
	unsigned char			mergecap;             /*=2,(R-W),notsupported(0),vp merge(1),vc merge(2),vp&vc merge(3), 
	                                        long型 and continuous in the mib */
	unsigned long			labelrangecomponents; /*=1,(1..65535),(R-W),the number of labelrange components in the initialization
	                                        message. This also represents the number og entries in the mplsldplabelrangecomponent
	                                        which corresponds to this entry. not implemented now.*/ 
	unsigned char			vcdirectionality;     /*=1,(R-W),bidirectional(0),unidirectional(1)*/
	unsigned char			lsrconnectivity;      /*=1,(R-W),direct(1),indirect(2)*/
	unsigned short			defaultcontrolvpi;    /*=0, (R-W),range is 0..4095,(R-W),the default VPI value for the non-mpls connection.*/
	unsigned short 			defaultcontrolvci;    /*=32,(R-W),range is 32..65535 */
	unsigned short			unlabtrafvpi;         /*=0,(R-W),range is 0..4095,VPI value of the VCC supporting unlabelled traffic.*/
	unsigned short			unlabtrafvci;         /*=32,(R-W),range is 32..65535,VCI value of the VCC supporting unlabelled traffic.*/
	unsigned char			storagetype;          /* in RFC1903 
	                                          other(1),
	                                          volatile(2),    -- e.g., in RAM
                                              nonVolatile(3), -- e.g., in NVRAM
                                              permanent(4),   -- e.g., partially in ROM
                                              readOnly(5)     -- e.g., completely in ROM
                                           */
    /* the following items not in the mib */ 
    mplsLdpId_t		entityLdpId;          /* the same as the ldpId related to this entry in the entity table*/
	unsigned long			entityindex;          /* the same as the index related to this entry in the entity table*/
	                               
	unsigned char           aggregate;
	interface_name_t	ifName;           /*interface name struct, added in order to show the name of intefaces */
	unsigned short              ifIndex;
}MPLS_PACK MplsLdpEntityAtmParamsTable_t;

/*  mpls ldp entity congigurable atm label range table  */
typedef struct {
	unsigned char			RowStatus;            /* has the same value of the rowstatus related to this entry in the entity table*/
	mplsLdpId_t		entityLdpId;          /* the same as the ldpId related to this entry in the entity table*/
	unsigned long			entityindex;          /* the same as the index related to this entry in the entity table*/

	unsigned long			ifindexorzero;        /* 可以去掉,因为除了0值其他和entityindex重复 */

	unsigned short 			minVpi;               /*(R-W),range is 0..4095,(R-W),*/
	unsigned short			minVci;               /*(R-W),range is 32..65535 */
	unsigned short			maxVpi;               /*(R-W),range is 0..4095,(R-W),*/
	unsigned short			maxVci;               /*(R-W),range is 32..65535 */

	unsigned char			storagetype;          /* in RFC1903 
	                                          other(1),
	                                          volatile(2),    -- e.g., in RAM
                                              nonVolatile(3), -- e.g., in NVRAM
                                              permanent(4),   -- e.g., partially in ROM
                                              readOnly(5)     -- e.g., completely in ROM
                                          */ 
	/*in order to show*/
	interface_name_t	ifName;   
	unsigned short              ifIndex;         
}MPLS_PACK MplsLdpEntityConfAtmLabelRangeTable_t;

/*  mpls ldp entity frame relay parameter table  */
typedef struct {
	unsigned char			RowStatus;
	mplsLdpId_t		entityLdpId;
	unsigned long			entityindex;
	unsigned long 		    ifindexorzero;
	unsigned char			frmergecap;
	unsigned long			labelrangecomponents;
	unsigned short			frlen;
	unsigned short			vcdirectionality;
	unsigned char			storagetype;
}MPLS_PACK MplsLdpEntityFrameRelayParamsTable_t;

/*  mpls ldp entity frame relay range components  */
typedef struct {
	unsigned char			RowStatus;
	mplsLdpId_t		entityLdpId;
	unsigned long			entityindex;
	unsigned long 			MinDlci;
	unsigned long			MaxDlci;
	unsigned char			storagetype;
}MPLS_PACK mplsLdpEntityConfFrLabelRangeTable_t;

/*  mpls ldp entity statistics table
    achieve from every card */
typedef struct {
	mplsLdpId_t		entityLdpId;    /*the fore three entries not in the mib */
	mplsLdpId_t		peerLdpId;      /*the same as the corresponding entry in the peer table */
	unsigned long 			entityindex;    /*the same as the corresponding entry in the entity table */

	unsigned long 	attemptedsessions;                   /*(R-O),a count of the total attempted sessions for this ldp entity*/
	unsigned long   sessionrejectednohelloerrors;        /*(R-O),a count of the session rejected/no hello
	                                              error notification messages sent or received by this ldp entity*/
	unsigned long	sessionrejectedadvertisementerrors;  /*(R-O),分发模式错误的通告消息数*/
	unsigned long	sessionrejectedmaxpduerrors;         /*(R-O),最大PDU长度错误的通告消息数*/
	unsigned long	sessionrejectedlabelrangeerrors;     /*(R-O),标签范围错误的通告信息数*/
	unsigned long   badldpidentifiererrors;              /*(R-O),错误的LDPID的消息数*/
	unsigned long	badpdulengtherrros;                  /*(R-O),错误的PDU长度的消息数*/
	unsigned long	badmessagelengtherrors;              /*(R-O),错误的消息长度的消息数*/
	unsigned long	badtlvlengtherrors;                  /*(R-O),TLV长度的出错数*/
	unsigned long	malformedtlvvalueErrors;             /*(R-O),TLV类型的出错数*/
	unsigned long	KeepAliveTimerExpiredErrors;         /*(R-O),超时错误数*/
	unsigned long	ShutdownNotifReceived;               /*(R-O),收到的关掉通告数*/
	unsigned long   ShutdownNotifSent;                   /*(R-O),发出的关掉通告数*/
	
    unsigned short              ifIndex;              /*in order to show */
    interface_name_t	        ifName;                  
	unsigned long               IpAddr;
}MPLS_PACK mplsLdpEntityStatsTable_t;



/*  mpls ldp peer table  */
typedef struct {
	mplsLdpId_t		entityLdpId;      /* the fore three item corresponding the entries in the entity or peer table*/
	unsigned long			entityindex;
	mplsLdpId_t		peerLdpId;	
	unsigned char			peerlabeldistributionmethod;  /*(R-O),downstreamOnDemand(1),downstreamUnsolicited(2),
	                                                long型 and continuous in the mib label distribution method of peer */
	unsigned char			peerloopdetectionforpv;       /*(R-O),disabled(0),enabled(1)*/
	unsigned short			peerpathvectorlimit;          /*(R-O),range is 0..255, long型 in the mib,*/
	
/* the following not in the mib, added in order to show */
	unsigned short					downstream;   /* 1: downstream;   2: upstream */
	unsigned long					PIEsSent;     /* 发出的协议信元数,hello msg*/
	unsigned long					PIEsRcvd;     /* 收到的协议信元数,hello msg*/
	connectivity_t  		connect;      /* 用于TCP连接*/
	unsigned short					state;        /* 0: transient,hello连接到会话完毕 ;  1: oper,会话后 */
	unsigned long					oldtime;      /* 记录最近一次operation开始的时间点,可以去掉 */
	unsigned char			addrSrcNum;
	Address_sources_t       AddressSources[ADDRESS_SOURCE_MAX]; /* LDP发现活动的源头,
	                                                                对等设备的接口(可能要去掉)*/
	unsigned char           ldpIdentNum;
	unsigned long          			LdpIdent[LDPIDENT_MAX];              /* 路由表中对等体的地址 */
	
	interface_name_t	    ifName;
	unsigned short                  ifIndex;
}MPLS_PACK mplsLdpPeerTable_t;

/*  mpls ldp hello adjacency table  */
typedef struct {
	mplsLdpId_t		entityLdpId;    /* the fore three item corresponding the entries in the entity or peer table*/
	unsigned long			entityindex;
	mplsLdpId_t		peerLdpId;
	unsigned long 			adjacencyindex; /* 如果不是对等体的ifindex,就没有意义,因为和entityindex重复,或本身就没意义*/
	unsigned long 			adjacencyholdtimeremaining;  /*(R-O),units:seconds,精度:0.01s 协商前的保持时间*/
	unsigned short			adjacencytype;  /*(R_O),link(1), targeted(2)*/

    /* the item not in the mib, added in order to show the 
	                             connectivity of the adjacencyies */
	connectivity_t	  connect;        
	interface_name_t  ifName; 
	unsigned short            ifIndex;                                  
}MPLS_PACK mplsLdpHelloAdjacencyTable_t;

/*  mpls ldp sessions table  */
typedef struct {
	mplsLdpId_t		entityLdpId;    /*the fore three entries not in the mib */              
	mplsLdpId_t		peerLdpId;                  
	unsigned long 			index;             /* It is not ifindex */
	
	unsigned short 			state;            /*(RO)NONEXISTENT(1),INITIALIZED(2),OPENREC(3),OPENSENT(4),OPERATIONAL(5)*/

⌨️ 快捷键说明

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