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

📄 mplslsr.h

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


#ifndef MPLSLSR_H
#define MPLSLSR_H

#include "mpls.h"
#include "mplsOamS.h"
#include "_noalign.h"
 /* #include "mplstype.h" */


/* mpls interface configuration table */
typedef struct {
	unsigned char   rowStatus;
	unsigned short 	ifIndex;          /* MIB中为long型数据,范围为0~2147483647, 我们从应用的角度出发,将它
	                             定义为ushort型,范围为0~65535,0代表该端口未知或没有启动MPLS。*/
	                            
	unsigned long   labelMinIn;
	unsigned long   labelMaxIn;
    unsigned long   labelMinOut;
    unsigned long   labelMaxOut;
                                
	unsigned long 	totalbandwidth;     /* 端口的总带宽,0代表端口不能用,赋予其ifindex为0,MIB定义为long型。
	                               单位为kbps */
	unsigned long	availablebandwidth;     /*  可用带宽,ifindex为0时此值不可用,MIB定义为long型。单位为kbps */
	unsigned char	labelparticipationtype;   /* 0: perplatform, 1: perinterface */		
	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
                                             */    
   /* mplsLdpAtmLblRange_t  labelRange;  此处指的是用户网络端口的标签值,
                                        VPI: 对于UNI:0~255,对于NNI:0~4095 */
                                        
    
    /* the following are in the entity table */
    /* unsigned char       rowStatus;   -- the following two values are states:   in RFC1903/1902
                               -- these values may be read or written
                               active(1), notInService(2),
                               
                               -- the following value is a state:
                               -- this value may be read, but not written
                               notReady(3),

                               -- the following three values are
                               -- actions: these values may be written,
                               --   but are never read
                               createAndGo(4), createAndWait(5), destroy(6)
                            */ 
    #if 1
    unsigned char			       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.   */
    unsigned char                  adminStatus;     /*=1*/
	                                        /* up(1):enable MPLS on this interface, 
	                                           down(2):disable MPLS on this interface,
                                               testing(3):in some test mode */
    #endif
                           
/*  interface name added in order to show or config other tables,by sbp 01-7-20 17:43*/ 
	interface_name_t	ifName;
}MPLS_PACK MplsInterfaceConfTable_t;

/*mpls interface performance table */
typedef struct {
	unsigned short	inlabelsused;
	unsigned short 	failedlabellookup;
	unsigned short 	outlabelsused;
	unsigned short	failedoutfragments;	  /*  ???? */
}MPLS_PACK MplsInterfacePerfTable_t;

/*mpls in-segment table */
typedef struct {
	unsigned char	RowStatus;
	unsigned short 	ifIndex;
	unsigned long	label;
	unsigned long	Npop;
	unsigned long	addrfamily;
	unsigned long	xcindex;
	unsigned char	owner;
	unsigned long 	trafficparamptr;
	unsigned char	storagetype;
}MPLS_PACK MplsInSegmentTable_t;

/* mpls in-segment performance table */
typedef struct {
	unsigned long 	octets;
	unsigned long	packets;
	unsigned long	errors;
	unsigned long 	discards;
	
	unsigned long	hcoctets;	    /*  ????  */
	
	unsigned long 	discontinuitytime;
}MPLS_PACK MplsInSegmentPerfTable_t;

/*  mpls out-segment table */
typedef struct {
	unsigned char	rowstatus;
	unsigned long	index;
	unsigned short 	ifIndex;
	unsigned char	pushtoplabel;
	unsigned long	toplabel;
	unsigned char	nexthopipaddrtype;
	unsigned long 	nexthopipv4addr;
	unsigned long	nexthopipv6addr;
	unsigned long	xcindex;
	unsigned char	owner;
	unsigned long	trafficparamptr;
	unsigned char	storagetype;
}MPLS_PACK MplsOutSegmentTable_t;

/*  mpls out-segment performance table */
typedef struct {
	unsigned long 	octets;
	unsigned long 	packets;
	unsigned long	errors;
	unsigned long 	discards;
	
	unsigned long	hcoctets;
	unsigned long 	discontinuitytime;	
}MPLS_PACK MplsOutSegmentPerfTable_t;

/*  mpls cross-connect table  */
typedef struct {
	unsigned char	rowstatus;
	unsigned long	xcindex;
	unsigned long  	insegmentifindex;
	unsigned long	insegmentlabel;
	unsigned long 	outsegmentindex;
	unsigned short	lspid;
	unsigned long	labelstackindex;
	unsigned char	owner;
	unsigned char 	storagetype;
	unsigned char 	adminstatus;
	unsigned char 	operstatus;
}MPLS_PACK MplsXCTable_t;


/*  mpls traffic parameter table  */
typedef struct {
	unsigned char	rowstatus;     /* -- the following two values are states:
                               -- these values may be read or written
                               active(1), notInService(2),
                               
                               -- the following value is a state:
                               -- this value may be read, but not written
                               notReady(3),

                               -- the following three values are
                               -- actions: these values may be written,
                               --   but are never read
                               createAndGo(4), createAndWait(5), destroy(6)
                           */    
	unsigned long 	index;        /*to identifies this row of the table,range: 1..2147483647,not the 
	                      ifindex, to see the example in the draft-ietf-mpls-lsr-mib-07.txt,
	                      however, think of it as ifindex for processing simply.*/
	unsigned long	maxrate;       /* MIB定义为long型。单位为kbps */
	unsigned long	meanrate;      /* MIB定义为long型。单位为kbps */
	unsigned long	maxburstsize;  /* MIB定义为long型。单位为bytes */
	unsigned char	storagetype;   /* creating, modifying, deleting this row
	                        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
                           */
                           
	/*not in the mib,added in order to show the name of interfaces */
	interface_name_t	ifName;  
	unsigned short              ifIndex;
}MPLS_PACK MplsTrafficParamTable_t;

/* notification configuration  */
typedef struct {
	unsigned char 	mplsxctrapenable;
	unsigned char 	mplsxcup;
	unsigned char	mplsxcdown;
}MPLS_PACK MplsNotificationConfTable_t;

#include"_restore.h"

#endif

⌨️ 快捷键说明

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