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

📄 rsvpte_struct.h

📁 实现了MPLS中的标签分发协议(LDP 3036 )的基本功能
💻 H
📖 第 1 页 / 共 5 页
字号:
      Minimum VCI (16 bits)         This 16 bit field specifies the lower bound of a block of         Virtual Connection Identifiers that is supported on the         originating switch.  If the VCI is less than 16-bits it MUST be         right justified in this field and preceding bits MUST be set to         zero.      Maximum VPI (12 bits)         This 12 bit field specifies the upper bound of a block of         Virtual Path Identifiers that is supported on the originating         switch.  If the VPI is less than 12-bits it MUST be right         justified in this field and preceding bits MUST be set to zero.      Maximum VCI (16 bits)         This 16 bit field specifies the upper bound of a block of         Virtual Connection Identifiers that is supported on the         originating switch.  If the VCI is less than 16-bits it MUST be         right justified in this field and preceding bits MUST be set to         zero.   Label Request with Frame Relay Label Range Class = 19, C_Type = 3    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |           Reserved            |             L3PID             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Reserved    |DLI|                     Minimum DLCI            |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Reserved        |                     Maximum DLCI            |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Reserved         This field is reserved.  It MUST be set to zero on transmission         and ignored on receipt.      L3PID         an identifier of the layer 3 protocol using this path.         Standard Ethertype values are used.      DLI         DLCI Length Indicator.  The number of bits in the DLCI.  The         following values are supported:                   Len    DLCI bits                    0        10                    2        23      Minimum DLCI         This 23-bit field specifies the lower bound of a block of Data         Link Connection Identifiers (DLCIs) that is supported on the         originating switch.  The DLCI MUST be right justified in this         field and unused bits MUST be set to 0.      Maximum DLCI         This 23-bit field specifies the upper bound of a block of Data         Link Connection Identifiers (DLCIs) that is supported on the         originating switch.  The DLCI MUST be right justified in this         field and unused bits MUST be set to 0.**********************************************************************/#define RSVP_LABELREQ_GENERIC_SIZE 4typedef struct rsvpLabelReqGeneric_s {    u_short reserved;    u_short l3pid;} rsvpLabelReqGeneric_t;#define RSVP_LABELREQ_ATM_SIZE 12typedef struct rsvpLabelReqAtmMinFlag_s {    BITFIELDS_ASCENDING_3(u_short M:1,		u_short reserved:3,		u_short vpi:12);} rsvpLabelReqAtmMinFlag_t;typedef struct rsvpLabelReqAtmMaxFlag_s {    BITFIELDS_ASCENDING_2(u_short reserved:4,		u_short vpi:12);} rsvpLabelReqAtmMaxFlag_t;typedef struct rsvpLabelReqAtm_s {    u_short reserved;    u_short l3pid;    union {	struct rsvpLabelReqAtmMinFlag_s flags;	u_short mark;    } minFlags;    u_short minVci;    union {	struct rsvpLabelReqAtmMaxFlag_s flags;	u_short mark;    } maxFlags;    u_short maxVci;} rsvpLabelRequestAtm_t;#define RSVP_LABELREQ_FR_SIZE 12#define RSVP_LABEL_REQUEST_FR_LEN_10 0#define RSVP_LABEL_REQUEST_FR_LEN_23 2typedef struct rsvpLabelReqFrMinFlag_s {    BITFIELDS_ASCENDING_3(u_int reserved:6,		u_int dli:2,		u_int min:12);} rsvpLabelReqFrMinFlag_t;typedef struct rsvpLabelReqFrMaxFlag_s {    BITFIELDS_ASCENDING_2(u_int reserved:8,		u_int max:24);} rsvpLabelReqFrMaxFlag_t;typedef struct rsvpLabelReqFr_s {    u_short reserved;    u_short l3pid;    union {	struct rsvpLabelReqFrMinFlag_s flags;	u_int mark;    } minFlags;    union {	struct rsvpLabelReqFrMaxFlag_s flags;	u_int mark;    } maxFlags;} rsvpLabelRequestFr_t;typedef struct rsvpLabelRequestObject_s {    struct rsvpObjectHeader_s hdr;    union {	struct rsvpLabelReqGeneric_s generic;	struct rsvpLabelReqAtm_s atm;	struct rsvpLabelReqFr_s fr;    } u;} rsvpLabelRequestObject_t;#define RSVP_EXPLICIT_ROUTE_CLASS 20#define RSVP_EXPLICIT_ROUTE_CTYPE 1#define RSVP_ERO_TYPE_IPV4 1#define RSVP_ERO_TYPE_IPV6 2#define RSVP_ERO_TYPE_ASN 32#define RSVP_MAX_ERO 16/**********************************************************************   Explicit Route Object Class = 20, C_Type = 1   Explicit routes are specified via the EXPLICIT_ROUTE object (ERO).   The Explicit Route Class is 20.  Currently one C_Type is defined,   Type 1 Explicit Route.  The EXPLICIT_ROUTE object has the following   format:    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                                                               |   //                        (Subobjects)                          //   |                                                               |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   The contents of an EXPLICIT_ROUTE object are a series of variable-   length data items called subobjects.  The subobjects are defined in   section 4.3.3 below.   If a Path message contains multiple EXPLICIT_ROUTE objects, only the   first object is meaningful.  Subsequent EXPLICIT_ROUTE objects MAY be   ignored and SHOULD NOT be propagated.   Subobjects   The contents of an EXPLICIT_ROUTE object are a series of variable-   length data items called subobjects.  Each subobject has the form:    0                   1    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------//----------------+   |L|    Type     |     Length    | (Subobject contents)          |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------//----------------+      L         The L bit is an attribute of the subobject.  The L bit is set         if the subobject represents a loose hop in the explicit route.         If the bit is not set, the subobject represents a strict hop in         the explicit route.      Type         The Type indicates the type of contents of the subobject.         Currently defined values are:                   1   IPv4 prefix                   2   IPv6 prefix                  32   Autonomous system number      Length         The Length contains the total length of the subobject in bytes,         including the L, Type and Length fields.  The Length MUST be at         least 4, and MUST be a multiple of 4    Subobject 1:  IPv4 prefix    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |L|    Type     |     Length    | IPv4 address (4 bytes)        |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | IPv4 address (continued)      | Prefix Length |      Resvd    |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      L         The L bit is an attribute of the subobject.  The L bit is set         if the subobject represents a loose hop in the explicit route.         If the bit is not set, the subobject represents a strict hop in         the explicit route.      Type         0x01  IPv4 address      Length         The Length contains the total length of the subobject in bytes,         including the Type and Length fields.  The Length is always 8.      IPv4 address         An IPv4 address.  This address is treated as a prefix based on         the prefix length value below.  Bits beyond the prefix are         ignored on receipt and SHOULD be set to zero on transmission.      Prefix length         Length in bits of the IPv4 prefix      Padding         Zero on transmission.  Ignored on receipt.   The contents of an IPv4 prefix subobject are a 4-octet IPv4 address,   a 1-octet prefix length, and a 1-octet pad.  The abstract node   represented by this subobject is the set of nodes that have an IP   address which lies within this prefix.  Note that a prefix length of   32 indicates a single IPv4 node.   Subobject 2:  IPv6 Prefix    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |L|    Type     |     Length    | IPv6 address (16 bytes)       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | IPv6 address (continued)                                      |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | IPv6 address (continued)                                      |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | IPv6 address (continued)                                      |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | IPv6 address (continued)      | Prefix Length |      Resvd    |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      L         The L bit is an attribute of the subobject.  The L bit is set         if the subobject represents a loose hop in the explicit route.         If the bit is not set, the subobject represents a strict hop in         the explicit route.      Type         0x02  IPv6 address      Length         The Length contains the total length of the subobject in bytes,         including the Type and Length fields.  The Length is always 20.      IPv6 address         An IPv6 address.  This address is treated as a prefix based on         the prefix length value below.  Bits beyond the prefix are         ignored on receipt and SHOULD be set to zero on transmission.      Prefix Length         Length in bits of the IPv6 prefix.      Padding         Zero on transmission.  Ignored on receipt.   The contents of an IPv6 prefix subobject are a 16-octet IPv6 address,   a 1-octet prefix length, and a 1-octet pad.  The abstract node   represented by this subobject is the set of nodes that have an IP   address which lies within this prefix.  Note that a prefix length of   128 indicates a single IPv6 node.   Subobject 32:  Autonomous System Number   The contents of an Autonomous System (AS) number subobject are a 2-   octet AS number.  The abstract node represented by this subobject is   the set of nodes belonging to the autonomous system.   The length of the AS number subobject is 4 octets.**********************************************************************/typedef struct rsvpExplicitRouteFlag_s {    BITFIELDS_ASCENDING_3(u_short L:1,		u_short type:3,		u_short len:4);} rsvpExplicitRouteFlag_t;#define RSVP_ER4_SIZE 8typedef struct rsvpExplicitRoute4_s {    union {	struct rsvpExplicitRouteFlag_s flags;	u_short mark;    } flags;    u_char address[RSVP_IPV4_ADDR_LEN];    u_char prefixLen;    u_char reserved;    /* used only for easy access to content

⌨️ 快捷键说明

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