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

📄 rsvpte_struct.h

📁 实现了MPLS中的标签分发协议(LDP 3036 )的基本功能
💻 H
📖 第 1 页 / 共 5 页
字号:
           3 bits: Sender selection control                000b: Reserved                001b: Wildcard                010b: Explicit                011b - 111b: Reserved      The low order bits of the option vector are determined by the      style, as follows:              WF 10001b              FF 01010b              SE 10010b***********************************************************************/typedef struct rsvpStyleFlag_s {  BITFIELDS_ASCENDING_4(u_int flag:8,	/* flags  */    u_int reserved:19,			/* reserved */    u_int shareControl:2,		/* sharing control */    u_int senderSelectionControl:3); /* sender selection control */} rsvpStyleFlag_t;typedef struct rsvpStyleObject_s {    struct rsvpObjectHeader_s hdr;    union {	struct rsvpStyleFlag_s flag;	u_int mark;    } flag;} rsvpStyleObject_t;#define RSVP_FILTER_SPEC_CLASS 10#define RSVP_FILTER_SPEC_CTYPE_IPV4 1#define RSVP_FILTER_SPEC_CTYPE_IPV6 2#define RSVP_FILTER_SPEC_CTYPE_FLOW 3#define RSVP_FILTER_SPEC4_SIZE 8#define RSVP_FILTER_SPEC6_SIZE 20#define RSVP_FILTER_SPEC_FLOW_SIZE 20/***********************************************************************  FILTER_SPEC class = 10.      o    IPv4 FILTER_SPEC object: Class = 10, C-Type = 1    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   +---------------+---------------+---------------+---------------+   |                   IPv4 SrcAddress (4 bytes)                   |   +---------------+---------------+---------------+---------------+   |     //////    |     //////    |            SrcPort            |   +---------------+---------------+---------------+---------------+      o    IPv6 FILTER_SPEC object: Class = 10, C-Type = 2    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   +---------------+---------------+---------------+---------------+   |                                                               |   +                                                               +   |                                                               |   +               IPv6 SrcAddress (16 bytes)                      +   |                                                               |   +                                                               +   |                                                               |   +---------------+---------------+---------------+---------------+   |     //////    |     //////    |            SrcPort            |   +---------------+---------------+---------------+---------------+      o    IPv6 Flow-label FILTER_SPEC object: Class = 10, 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   +---------------+---------------+---------------+---------------+   |                                                               |   +                                                               +   |                                                               |   +                   IPv6 SrcAddress (16 bytes)                  +   |                                                               |   +                                                               +   |                                                               |   +---------------+---------------+---------------+---------------+   |    ///////    |            Flow Label (24 bits)               |   +---------------+---------------+---------------+---------------+      SrcAddress           The IP source address for a sender host.  Must be non-zero.      SrcPort           The UDP/TCP source port for a sender, or zero to indicate           `none'.      Flow Label           A 24-bit Flow Label, defined in IPv6.  This value may be used           by the packet classifier to efficiently identify the packets           belonging to a particular (sender->destination) data flow.***********************************************************************/typedef struct rsvpFilterSpec4_s {  u_int sourceAddr;  u_short reserved;  u_short sourcePort;} rsvpFilterSpec4_t;typedef struct rsvpFilterSpec6_s {  u_char sourceAddr[RSVP_IPV6_ADDR_LEN];  u_short reserved;  u_short sourcePort;} rsvpFilterSpec6_t;typedef struct rsvpFilterSpecFlags_s {  BITFIELDS_ASCENDING_2(u_int reserved:8,    u_int flowLabel:24);} rsvpFilterSpecFlags_t;typedef struct rsvpFilterSpecFlow6_s {  u_char sourceAddr[RSVP_IPV6_ADDR_LEN];  union {    u_int mark;    struct rsvpFilterSpecFlags_s flowLabel;  } flag;} rsvpFilterSpecFlow6_t;typedef struct rsvpFilterSpecObject_s {    struct rsvpObjectHeader_s hdr;    union {	struct rsvpFilterSpec4_s ipv4;	struct rsvpFilterSpec6_s ipv6;	struct rsvpFilterSpecFlow6_s flow;    } u;} rsvpFilterSpecObject_t;#define RSVP_SENDER_TEMPLATE_CLASS 11#define RSVP_SENDER_TEMPLATE_CTYPE_IPV4 1#define RSVP_SENDER_TEMPLATE_CTYPE_IPV6 2#define RSVP_SENDER_TEMPLATE_CTYPE_FLOW 3#define RSVP_SENDER_TEMPLATE_CTYPE_TUNNEL4 7#define RSVP_SENDER_TEMPLATE_CTYPE_TUNNEL6 8#define RSVP_SENDER_TEMPLATE_TUNNEL4_SIZE 8#define RSVP_SENDER_TEMPLATE_TUNNEL6_SIZE 20/**********************************************************************      SENDER_TEMPLATE Class      SENDER_TEMPLATE class = 11.      o    IPv4 SENDER_TEMPLATE object: Class = 11, C-Type = 1           Definition same as IPv4/UDP FILTER_SPEC object.      o    IPv6 SENDER_TEMPLATE object: Class = 11, C-Type = 2           Definition same as IPv6/UDP FILTER_SPEC object.      o    IPv6 Flow-label SENDER_TEMPLATE object: Class = 11, C-Type = 3   LSP_TUNNEL_IPv4 Sender Template Object   Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7    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   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                   IPv4 tunnel sender address                  |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |  MUST be zero                 |            LSP ID             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      IPv4 tunnel sender address         IPv4 address for a sender node      LSP ID         A 16-bit identifier used in the SENDER_TEMPLATE and the         FILTER_SPEC that can be changed to allow a sender to share         resources with itself.   LSP_TUNNEL_IPv6 Sender Template Object   Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv6 C_Type = 8    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   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                                                               |   +                                                               +   |                   IPv6 tunnel sender address                  |   +                                                               +   |                            (16 bytes)                         |   +                                                               +   |                                                               |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |  MUST be zero                 |            LSP ID             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      IPv6 tunnel sender address         IPv6 address for a sender node      LSP ID         A 16-bit identifier used in the SENDER_TEMPLATE and the         FILTER_SPEC that can be changed to allow a sender to share         resources with itself.**********************************************************************/#define rsvpSenderTemplate4_s rsvpFilterSpec4_s#define rsvpSenderTemplate4_t rsvpFilterSpec4_t#define rsvpSenderTemplate6_s rsvpFilterSpec6_s#define rsvpSenderTemplate6_t rsvpFilterSpec6_t#define rsvpSenderTemplateFlow6_s rsvpFilterSpecFlow6_s#define rsvpSenderTemplateFlow6_t rsvpFilterSpecFlow6_t#define rsvpteEncodeSenderTemplate4 rsvpteEncodeFilterSpec4#define rsvpteEncodeSenderTemplate6 rsvpteEncodeFilterSpec6#define rsvpteEncodeSenderTemplateFlow rsvpteEncodeFilterSpecFlow#define rsvpteDecodeSenderTemplate4 rsvpteDecodeFilterSpec4#define rsvpteDecodeSenderTemplate6 rsvpteDecodeFilterSpec6#define rsvpteDecodeSenderTemplateFlow rsvpteDecodeFilterSpecFlowtypedef struct rsvpSenderTemplateTunnel4_s {    u_int sender;    u_short reserved;    u_short lspId;} rsvpSenderTemplateTunnel4_t;typedef struct rsvpSenderTemplateTunnel6_s {    u_char sender[RSVP_IPV6_ADDR_LEN];    u_short reserved;    u_short lspId;} rsvpSenderTemplateTunnel6_t;typedef struct rsvpSenderTemplateObject_s {    struct rsvpObjectHeader_s hdr;    union {	struct rsvpSenderTemplate4_s ipv4;	struct rsvpSenderTemplate6_s ipv6;	struct rsvpSenderTemplateFlow6_s flow;	struct rsvpSenderTemplateTunnel4_s tunnel4;	struct rsvpSenderTemplateTunnel6_s tunnel6;    } u;} rsvpSenderTemplateObject_t;#define RSVP_SENDER_TSPEC_CLASS 12#define RSVP_SENDER_TSPEC_CTYPE_INTSRV 2/**********************************************************************      SENDER_TSPEC Class      SENDER_TSPEC class = 12.      o    Intserv SENDER_TSPEC object: Class = 12, C-Type = 2   The RSVP SENDER_TSPEC object carries information about a data   source's generated traffic. The required RSVP SENDER_TSPEC object   contains a global Token_Bucket_TSpec parameter (service_number 1,   parameter 127, as defined in [RFC 2215]). This TSpec carries traffic   information usable by either the Guaranteed or Controlled-Load QoS   control services.        31           24 23           16 15            8 7             0       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   1   | 0 (a) |    reserved           |             7 (b)             |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   2   |    1  (c)     |0| reserved    |             6 (d)             |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   3   |   127 (e)     |    0 (f)      |             5 (g)             |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   4   |  Token Bucket Rate [r] (32-bit IEEE floating point number)    |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   5   |  Token Bucket Size [b] (32-bit IEEE floating point number)    |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   6   |  Peak Data Rate [p] (32-bit IEEE floating point number)       |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   7   |  Minimum Policed Unit [m] (32-bit integer)                    |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   8   |  Maximum Packet Size [M]  (32-bit integer)                    |       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     (a) - Message format version number (0)     (b) - Overall length (7 words not including header)     (c) - Service header, service number 1 (default/global information)     (d) - Length of service 1 data, 6 words not including header     (e) - Parameter ID, parameter 127 (Token_Bucket_TSpec)     (f) - Parameter 127 flags (none set)     (g) - Parameter 127 length, 5 words not including header   In this TSpec, the parameters [r] and [b] are set to reflect the   sender's view of its generated traffic. The peak rate parameter [p]   may be set to the sender's peak traffic generation rate (if known and   controlled), the physical interface line rate (if known), or positive   infinity (if no better value is available).  Positive infinity is   represented as an IEEE single-precision floating-point number with an   exponent of all ones (255) and a sign and mantissa of all zeros.  The   format of IEEE floating-point numbers is further summarized in [RFC   1832].   The minimum policed unit parameter [m] should generally be set equal   to the size of the smallest packet generated by the application. This   packet size includes the application data and all protocol headers at   or above the IP level (IP, TCP, UDP, RTP, etc.). The size given does   not include any link-level headers, because these headers will change   as the packet crosses different portions of the internetwork.   The [m] parameter is used by nodes within the network to compute the   maximum bandwidth overhead needed to carry a flow's packets over the   particular link-level technology, based on the ratio of [m] to the   link-level header size. This allows the correct amount of bandwidth   to be allocated to the flow at each point in the net.  Note that   smaller values of this parameter lead to increased overhead   estimates, and thus increased likelyhood of a reservation request   being rejected by the node. In some cases, an application   transmitting a low percentage of very small packets may therefore   choose to set the value of [m] larger than the actual minimum   transmitted packet size. This will increase the likelyhood of the   reservation succeeding, at the expense of policing packets of size   less than [m] as if they were of size [m].   Note that the an [m] value of zero is illegal. A value of zero would   indicate that no data or IP headers are present, and would give an   infinite amount of link-level overhead.   The maximum packet size parameter [M] should be set to the size of   the largest packet the application might wish to generate, as

⌨️ 快捷键说明

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