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

📄 er_conf.h

📁 技术文件名称:MPLSv1.0软件模块测试规程
💻 H
字号:
#ifndef FEC_H
#define FEC_H

#include "_noalign.h" 

#define MPLS_MAX_ER_HOPS 20


/* 1. MPLSNMS_LSR动态配置参数 */

typedef struct{
	
	ULONG		lsrId;                /* (RO)可以使用 RouterId 来表示MplsLsrIdentifier */
	UCHAR		labelRetentionMode;	  /* (RW) 1:conservative	2:liberal */
	UCHAR       loopDetectionForPV;   /* (RO),disabled(0),enabled(1)*/
	UCHAR       pathVectorLimit;      /* (RO)当pathLoopDetectionForPV=enabled(1)时,
									     值域范围是1-255;否则disable(0)时,取值0*/
    UCHAR       edgeId;                 /* 1:表示边缘节点,2:表示骨干节点 */
} STRUCT_MPLSNMS_LSR;


/* 2. MPLSNMS_INTERFACE动态配置参数 */

typedef struct{
	
	USHORT 		 	    	ifIndex;            
    ULONG       	   		ifIpAddress;		
	
	ULONG  					lsrAddress;     /* IP address assigned to LSR    */
	USHORT 					labelSpace;     /* within LSR  */ 
	USHORT 					minVpi;  			
    USHORT 					minVci;   
    USHORT 					maxVpi;   
    USHORT 					maxVci; 
    
    UCHAR                	adminStatus; 		/*=1*//*change*/
	/* up(1):enable MPLS on this interface, down(2):disable MPLS on this interface,
       testing(3):in some test mode */

	UCHAR			    	operStatus;     	/*=1*/
	/* up(1):ready to pass packets, down(2), testing(3):in some test mode,
       unknown(4):status cannot be determined for some reason,
       dormant(5),notPresent(6):some component is missing,
       lowerLayerNotPresent(7):down due to the state of lower layer interfaces
       Indicates the actual status of MPLS on this interface.
   */
   }STRUCT_MPLSNMS_INTERFACE;
   



/* 3. MPLSNMS_ENTITY动态配置参数 */

typedef struct{

  	ULONG			index;                  /*值为0表示暂时不能分配表项*/
  	
  	ULONG  			lsrAddress;     /* IP address assigned to LSR      */
  	USHORT 			labelSpace;     /* within LSR  */ 

 	UCHAR          	protocolVersion;   /*=1        (R-W)值为0表示未知*/
	UCHAR        	adminStatus;       /*=1        (R-W).enable(1),disable(2)*/ 
   	UCHAR 			operStatus;        /*=1        (R-O)operational status of this entity.unknown(0),enabled(1),disabled(2)*/ 
   	USHORT			wellKnownDiscoveryPort;        /*=646  (R-W)*/
	USHORT         	maxPduLength;      /* =4096     (R-W)*/
   	ULONG			keepAliveHoldTimer; /*=60      (R-W) UNITS is "100 microseconds"*/
	ULONG 			helloHoldTimer;    /*=15        (R-W) 值为0表示默认值(link hello:15s,
					 					        targeted hello:45s),其它值表示无穷大*/
	ULONG 		    failedInitSessionThreshold;/*=0 (R-W)当会话初始化一方超过超过阈值时,对等方要发送通告消息*/
	UCHAR			labelDistributionMethod; /*=1  (R-W)downstreamOnDemand(1),downstreamUnsolicited(2)*/
	UCHAR			targetedPeer;          /*=0     (R-W)默认值为0*/
	USHORT          targetedPeerAddrType;  /*=1     (R-W)*/
	ULONG           targetedPeerAddr;      /*=0     (R-W)*/
	UCHAR			optionalParameters;    /*=2   (R-W)MplsLdpLabelTypes,generic(1)表示初始化消息中不带可选参数,
											    atmParameters(2)表示对应这个Entity表项要产生一个mplsLdpEntityAtmParms表项,
											    frameRelayParameters(3)表示对应这个Entity表项要产生一个mplsLdpEntityFrameRelayParms表项*/

	UCHAR 	atmMergeCap;                  /*=0      (RC)notSupported(0),vpMerge(1),vcMerge(2),vpAndVcMerge(3)*/
	UCHAR	atmVcDirectionality;          /*=1      (RC)bidirectional(0),unidirectional(1)*/
	UCHAR	atmLsrConnectivity;           /*=1      (RC)direct(1),indirect(2).默认值为0。
									            !!! indirect情况对vpi,vci有特定的要求,见第888行*/
	USHORT	defaultControlVpi;            /*=0      (RC)用于non-MPLS连接,默认值为0,但允许配置其它值*/
	USHORT  defaultControlVci;            /*=32      (RC)用于non-MPLS连接,默认值为32,但允许配置其它值*/
	USHORT	unlabTrafVpi;                 /*=0      (RC)用于传送非标记的IP包的non-MPLS连接,默认值为0,但允许配置其它值*/
	USHORT  unlabTrafVci;                 /*=32      (RC)用于传送非标记的IP包的non-MPLS连接,默认值为32,但允许配置其它值*/
} STRUCT_MPLSNMS_ENTITY;




/* 4. MPLSNMS_ER_FEC命令配置ERLSP的FECTLV */

typedef struct{
	
	ULONG  index;
	UCHAR  endMark;
	
	UCHAR  OperateType;
	USHORT numberFecElements;
	UCHAR  wcElemExists;
    UCHAR  erTlvExists; /* 描述ER的存在*/	

	
	USHORT fecElemType[MPLS_MAXNUMFECELEMENT];
	USHORT addressFam[MPLS_MAXNUMFECELEMENT];
	UCHAR  preLen[MPLS_MAXNUMFECELEMENT];  
	ULONG  address[MPLS_MAXNUMFECELEMENT];
}	STRUCT_MPLSNMS_ER_FEC;	


/* 5. MPLSNMS_ER_ER命令配置ERLSP的ERTLV */

typedef struct{
	
	ULONG  index;	/*ER消息的序号*/
	UCHAR  endMark; /*0,1,2序号*/
	
	USHORT numberErHops;             
	
	USHORT erHopType[MPLS_MAX_ER_HOPS]; 
	ULONG  flag[MPLS_MAX_ER_HOPS]; /* 对应erHopTlv中的flags字段,包含 'L'位,并且建议填写二进制数 */
	ULONG  address[MPLS_MAX_ER_HOPS];
}STRUCT_MPLSNMS_ER_ER; 
	

	
/* 6. MPLSNMS_ER_OTHER命令配置ERLSP的其它TLV参数 */

typedef struct{	
	
	ULONG  index;
	UCHAR  endMark;
	
	/* 流量参数部分 */
    UCHAR  flag;	/* 建议填写二进制数 */  
    UCHAR  freq; 
    UCHAR  weight; 
    ULONG  pdr;
    ULONG  pbs;
    ULONG  cdr;
    ULONG  cbs;
    ULONG  ebs;

	UCHAR  pinFlag:1;	/* 1 => route pinning requested */
	
	ULONG  rsCls;    	/* resource class bit mask */
	
	UCHAR  setPrio;  	/* 0 => most important path */
    UCHAR  holdPrio; 	/* 0 => most important path */
}STRUCT_MPLSNMS_ER_OTHER;      
	
#include "_restore.h"

#endif	

⌨️ 快捷键说明

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