亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mpls_encdec_02.c

?? Linux平臺下
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*******************************************************************************                       Nortel Networks Software License                      **                                                                             ** READ THE TERMS OF THIS LICENSE CAREFULLY.  BY USING, MODIFYING, OR          ** DISTRIBUTING THIS SOFTWARE AND ANY ACCOMPANYING DOCUMENTATION (COLLECTIVELY,** "SOFTWARE") YOU ARE AGREEING TO ALL OF THE TERMS OF THIS LICENSE.           **                                                                             ** 1.      Nortel Telecom Limited, on behalf of itself and its subsidiaries    ** (collectively "Nortel Networks") grants to you a non-exclusive, perpetual,  ** world-wide right to use, copy, modify, and distribute the Software at no    ** charge.                                                                     **                                                                             ** 2.      You may sublicense recipients of redistributed Software to use,     ** copy, modify, and distribute the Software on substantially the same terms as** this License.  You may not impose any further restrictions on the           ** recipient's exercise of the rights in the Software granted under this       ** License.  Software distributed to other parties must be accompanied by a    ** License containing a grant, disclaimer and limitation of liability          ** substantially in the form of 3, 4, and 5 below provided that references to  ** "Nortel Networks" may be changed to "Supplier".                             **                                                                             ** 3.      Nortel Networks reserves the right to modify and release new        ** versions of the Software from time to time which may include modifications  ** made by third parties like you. Accordingly, you agree that you shall       ** automatically grant a license to Nortel Networks to include, at its option, ** in any new version of the Software any modifications to the Software made by** you and made available directly or indirectly to Nortel Networks.  Nortel   ** Networks shall have the right to use, copy, modify, and distribute any such ** modified Software on substantially the same terms as this License.          **                                                                             ** 4.      THE SOFTWARE IS PROVIDED ON AN "AS IS" BASIS.  NORTEL NETWORKS AND  ** ITS AGENTS AND SUPPLIERS DISCLAIM ALL REPRESENTATIONS, WARRANTIES AND       ** CONDITIONS RELATING TO THE SOFTWARE, INCLUDING, BUT NOT LIMITED TO, IMPLIED ** WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND         ** NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS.  NORTEL       ** NETWORKS AND ITS AGENTS AND SUPPLIERS DO NOT WARRANT, GUARANTEE, OR MAKE ANY** REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE        ** SOFTWARE IN TERMS OR CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS, OR    ** OTHERWISE.                                                                  **                                                                             ** 5.      NEITHER NORTEL NETWORKS NOR ANY OF ITS AGENTS OR SUPPLIERS SHALL BE ** LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR EXEMPLARY     ** DAMAGES, OR ECONOMIC LOSSES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS,** BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION AND THE LIKE), ARISING  ** FROM THE SOFTWARE OR THIS LICENSE AGREEMENT, EVEN IF NORTEL NETWORKS OR SUCH** AGENT OR SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR    ** LOSSES, AND WHETHER ANY SUCH DAMAGE OR LOSS ARISES OUT OF CONTRACT, TORT, OR** OTHERWISE.                                                                  **                                                                             ** 6.      This License shall be governed by the laws of the Province of       ** Ontario, Canada.                                                            ********************************************************************************//****************************************************************************** * This file contains the C implementation for encode/decode functions        *  * for the following types of messages: notification, hello, initialization,  * * keepAlive, address, address Withdraw, label Mapping, label Request, label  * * Withdraw and label Release. There are also encode/decode methods for all   *  * tlv types required by the previously enumerated messages.                  *  * Please remember that the pdu will always contain the header followed by 1  * * or more LDP messages. The file contains functions to encode/decode the LDP * * header as well.  							      *  * All the messages, header message and the tlvs are in conformity with the   *  * draft-ietf-mpls-ldp-04  (May 1999) and with draft-ietf-mpls-cr-ldp-01      * * (Jan 1999). 								      *  *								              * * Please note that the U bit in the message and the F bit in the tlv are     * * ignored in this version of the code.                                       * *								              * * Please note that the traffic parameters for traffic TLV have to be IEEE    * * single precision floating point numbers.                                   * *								              * * Please note that there might be a small chance for bit field manipulation  * * portability inconsistency. If such problems occure, the code requires      * * changes for a suitable bit-field manipulation. The code for encoding and   * * decoding makes the assumption that the compiler packs the bit fields in a  * * structure into adjacent bits of the same unit.                             *  *								              * * The usage of the encode/decode functions is described below.               *  *								              * * The encode functions take as arguments: a pointer to the structure which   * * implements msg/tlv, a nbuffer (where the encoding is done) and the buffer   * * length.							              * * If the encode is successfull, the function returns the total encoded       *  * length.								      * * If the encode fails, the function returns an error code.                   * * The encode functions for messages and message headers do not modify the    * * content of the struct which is to be encoded. All the other encode         * * functions will change the content of the structure. The pointer which      * * points to the beginning of the buffer is not changed.                      * *									      * * The decode functions take as arguments: a pointer to the structure which   * * is going to be populated after decoding, a pointer to a buffer and the     * * buffer length.							      * * If the decode is successful, the function returns the total decoded length * * If the decode fails, the function returns an error code. The decode        * * functions do not modify the pointer to the buffer which contains the data  * * to be decoded.							      * *									      * * Example on how to use the encode/decode functions for a keepAlive message: * *									      * *           Encode the keep alive message:                                   *  *           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    				      * *           u_char buffer[500];	 				      * *           int returnCode; 						      * *           struct mplsLdpKeepAlMsg_s keepAliveMsg;            	      * *           keepAliveMsg.baseMsg.msgType   = MPLS_KEEPAL_MSGTYPE;            * *           keepAliveMsg.baseMsg.msgLength = MPLS_MSGIDFIXLEN;               * *           keepAliveMsg.baseMsg.msgId     = 123;		              * *           bzero(buffer, 500);                                  	      * *           returnCode = Mpls_encodeLdpKeepAliveMsg(&keepAliveMsg,           * *                                                   buffer,                  * *                                                   500);                    * *           if (returnCode < 0)                                              * *              check the error code				              * *           else                                                             * *              write(fd, buffer, returnCode);                                * *									      * *									      * *           Decode the keep alive meesage:                                   * *           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^		                      * *           u_char buffer[500];					      * *           int returnCode;					              * *           struct mplsLdpKeepAlMsg_s keepAliveMsg;	            	      * *           read(fd, buffer, length);                                        * *           returnCode =  Mpls_decodeLdpKeepAliveMsg(&keepAliveMsg,          *  *                                                    buffer,                 * *                                                    500); 		      * *           if (returnCode < 0)	                                      * *              check the error code					      * *           else				 			      * *           { 								      * *              printKeepAliveMsg(&keepAliveMsg);	 	              * *           } 						                      * *								              * * An example on how to use the decode functions for the header and the       * * messages can be found in the main function.                                * *								              * * The code was tested for big endian and little endian for sparc5, linux     * * and i960.                                                                  * *								              * * In order to compile for little endian, the LITTLE_ENDIAN_BYTE_ORDER should * * be defined.								      * *								              * * At the end of this file there is an examples of a hex buffers and its      * * corresponding values.                                                      * *								              * *								              * * Version History                                                            * * Version          Date      Authors            Description                  * * ===========      ========  =========          ======================       * * mpls_encdec_01.c 99/03/15  Antonela Paraschiv draft-ietf-mpls-ldp-03 and   *  *                                               draft-ietf-mpls-cr-ldp-01    * *								              * * mpls_encdec_02.c 99/05/19  Antonela Paraschiv draft-ietf-mpls-ldp-04 and   *  *                                               draft-ietf-mpls-cr-ldp-01    * *								              * ******************************************************************************/#define LITTLE_ENDIAN_BYTE_ORDER 1  /* <----- Please define this accordingly *//* #define VXWORKS                  1 */ #include <stdio.h>#include <stdlib.h>#include <string.h>#ifdef VXWORKS   #include <in.h>         /* htons, htonl, ntohs, ntohl         */   #include <types.h>      /* u_int, u_char, u_short, float etc. */#else   #include <netinet/in.h> /* htons, htonl, ntohs, ntohl         */   #include <sys/types.h>  /* u_int, u_char, u_short, float etc. */#endif VXWORKS #define MEM_COPY(X, Y, Z) memcpy(X, Y, Z)/* macros to handle different byte orders (little endian or big endian) */#ifdef LITTLE_ENDIAN_BYTE_ORDER    #define BITFIELDS_ASCENDING_2(X, Y)                Y; X;   #define BITFIELDS_ASCENDING_3(X, Y, Z)             Z; Y; X;   #define BITFIELDS_ASCENDING_4(X, Y, Z, W)          W; Z; Y; X;   #define BITFIELDS_ASCENDING_7(X, Y, Z, W, U, A, B) B; A; U; W; Z; Y; X;# else   #define BITFIELDS_ASCENDING_2(X, Y)                X; Y;   #define BITFIELDS_ASCENDING_3(X, Y, Z)             X; Y; Z;   #define BITFIELDS_ASCENDING_4(X, Y, Z, W)          X; Y; Z; W;   #define BITFIELDS_ASCENDING_7(X, Y, Z, W, U, A, B) X; Y; Z; W; U; A; B;#endif LITTLE_ENDIAN_BYTE_ORDER /* macros used to decode the entire LDP; they declare local var for   different type of messages */#define MPLS_MSGSTRUCT( e )                 \   mplsLdp ## e ## Msg_t test ## e ## Msg;  \#define MPLS_MSGPARAM( e )                  \   test ## e ## Msg                         \#define DEBUG_INFO              1  /* set this to 0 if no debug info 				      required                      *//* debug macros */#define DEBUG_CALL(X)           if (DEBUG_INFO) X;#define PRINT_2(X, Y)           if (DEBUG_INFO) printf(X, Y)#define PRINT_4(X, Y, Z, W)     if (DEBUG_INFO) printf(X, Y, Z, W)#define PRINT_ERR(X)            if (DEBUG_INFO) printf(X)#define PRINT_ERR_2(X, Y)       if (DEBUG_INFO) printf(X, Y)#define PRINT_ERR_4(X, Y, Z, W) if (DEBUG_INFO) printf(X, Y, Z, W)/* *    MESSAGE TYPE CONSTANS & TLV CONSTANTS */#define MPLS_LDP_HDRSIZE         10      /* the size for mpls ldp hdr  */#define MPLS_TLVFIXLEN           4       /* type + len                 */#define MPLS_MSGIDFIXLEN         4       /* type + len                 */#define MPLS_LDPIDLEN            6 #define MPLS_PDUMAXLEN           4096     /* octets                    */#define MPLS_VERSION             0x0001  #define MPLS_IPV4ADDRFAMILYN     0x0100   /* rfc 1700 (network order)  */#define MPLS_INIFINITE_TIMEVAL   0xfffff/* for initialize message */#define MPLS_INIT_MSGTYPE        0x0200  /* initialization msg          */#define MPLS_CSP_TLVTYPE         0x0500  /* common params for init msg  */#define MPLS_ASP_TLVTYPE         0x0501  /* atm session params          */#define MPLS_FSP_TLVTYPE         0x0502  /* frame relay session params  */#define MPLS_ASPFIXLEN           4       /* M + N + D + res             */#define MPLS_FSPFIXLEN           4       /* M + N + res                 */#define MPLS_CSPFIXLEN           14      /* protocolV + ... + ldp ids   */#define MPLS_ATMLBLMAXLEN        10#define MPLS_ATMLRGFIXLEN        8      #define MPLS_FRLRGFIXLEN         8#define MPLS_ASP_NOMERGE         0#define MPLS_ASP_VPMERGE         1  #define MPLS_ASP_VCMERGE         2  #define MPLS_ASP_VPVCMERGE       3  #define MPLS_FRLBLMAXLEN         10#define MPLS_FRDLCI10BITS        0#define MPLS_FRDLCI17BITS        1#define MPLS_FRDLCI23BITS        2 /* for notification message */#define MPLS_NOT_MSGTYPE         0x0001  /* notification msg            */#define MPLS_NOT_ST_TLVTYPE      0x0300  /* status tlv for not msg      */#define MPLS_NOT_ES_TLVTYPE      0x0301  /* extended status for not msg */#define MPLS_NOT_RP_TLVTYPE      0x0302  /* returned PDU for not msg    */#define MPLS_NOT_RM_TLVTYPE      0x0303  /* returned msg for not msg    */#define MPLS_STATUSFIXLEN        10      /* status code + id + type     */#define MPLS_EXSTATUSLEN         4 #define MPLS_NOT_MAXSIZE         MPLS_PDUMAXLEN - MPLS_TLVFIXLEN - \				 MPLS_MSGIDFIXLEN  /* for hello message */#define MPLS_HELLO_MSGTYPE       0x0100  /* hello msg                   */#define MPLS_CHP_TLVTYPE         0x0400  /* Common Hello Param Tlv      */#define MPLS_TRADR_TLVTYPE       0x0401  /* Transport Address Param Tlv */#define MPLS_CSN_TLVTYPE         0x0402  /* Conf Seq Number Param Tlv   */#define MPLS_CHPFIXLEN           4 #define MPLS_CSNFIXLEN           4 #define MPLS_TRADRFIXLEN         4 /* for keep alive message */#define MPLS_KEEPAL_MSGTYPE      0x0201  /* keep alive msg              *//* for address messages */#define MPLS_ADDR_MSGTYPE        0x0300  /* address msg                 */#define MPLS_ADDRWITH_MSGTYPE    0x0301  /* address withdraw msg        */#define MPLS_ADDRLIST_TLVTYPE    0x0101  /* addrss list tlv type        */#define MPLS_IPv4LEN             4#define MPLS_ADDFAMFIXLEN        2#define MPLS_ADDLISTMAXLEN       MPLS_PDUMAXLEN - 2*MPLS_TLVFIXLEN - \			         MPLS_MSGIDFIXLEN - MPLS_ADDFAMFIXLEN #define MPLS_MAXNUMBERADR        MPLS_ADDLISTMAXLEN / 4 /* for label mapping message */#define MPLS_LBLMAP_MSGTYPE      0x0400  /* label mapping msg           */#define MPLS_FEC_TLVTYPE         0x0100  /* label mapping msg           */#define MPLS_GENLBL_TLVTYPE      0x0200  /* generic label tlv           */#define MPLS_ATMLBL_TLVTYPE      0x0201  /* atm label tlv               */#define MPLS_FRLBL_TLVTYPE       0x0202  /* frame relay label tlv       */#define MPLS_HOPCOUNT_TLVTYPE    0x0103  /* ho count tlv                */#define MPLS_PATH_TLVTYPE        0x0104  /* path vector tlv             */#define MPLS_REQMSGID_TLVTYPE    0x0600  /* lbl request msg id tlv      */#define MPLS_WC_FEC              0x01    /* wildcard fec element        */#define MPLS_PREFIX_FEC          0x02    /* prefix fec element          */#define MPLS_HOSTADR_FEC         0x03    /* host addr fec element       */#define MPLS_CRLSP_FEC           0x04    /* crlsp fec element           */#define MPLS_MARTINIVC_FEC       0x80    /* Martini VC fec element      */#define MPLS_FECMAXLEN           MPLS_PDUMAXLEN - 2*MPLS_TLVFIXLEN - \			         MPLS_MSGIDFIXLEN#define MPLS_LBLFIXLEN           4       /* v + vpi + vci + res         */#define MPLS_HOPCOUNTFIXLEN      1       /* v + vpi + vci + res         */#define MPLS_VCIDLEN             4       /* Martini VC id length        */#define MPLS_VCIFPARAMMAXLEN     80      /* Martini VC Intf param max size */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区日韩| 欧美一区二视频| 久久人人爽爽爽人久久久| 亚洲一区欧美一区| 91美女精品福利| 国产精品伦一区| kk眼镜猥琐国模调教系列一区二区| 欧美日韩久久久久久| 一级做a爱片久久| 国产suv精品一区二区三区| 国产精品免费视频观看| 成人18视频日本| 中文字幕在线不卡视频| 97久久超碰精品国产| 一区二区三区日韩在线观看| 91成人网在线| 香港成人在线视频| 欧美一区二区人人喊爽| 免费看日韩精品| 国产清纯白嫩初高生在线观看91 | 欧美日韩电影在线| 久久精品免费观看| 国产日韩精品一区二区三区在线| 国产在线精品一区二区三区不卡| 精品毛片乱码1区2区3区| 国产盗摄一区二区三区| 一区二区三区精密机械公司| 欧美视频精品在线| 黄色成人免费在线| 亚洲靠逼com| 日韩精品一区在线观看| 国产老妇另类xxxxx| 亚洲影视在线播放| 中文无字幕一区二区三区 | 亚洲男人的天堂在线aⅴ视频| 欧美精选午夜久久久乱码6080| 捆绑紧缚一区二区三区视频| 国产精品福利av| 这里是久久伊人| 99国产精品久久久久久久久久| 亚洲va欧美va人人爽| 国产精品女主播av| 欧美mv日韩mv国产| 色婷婷综合久久久| 国产乱码一区二区三区| 午夜私人影院久久久久| 中文字幕亚洲在| 精品成人佐山爱一区二区| 欧美日韩精品二区第二页| 不卡的av在线| 国产福利不卡视频| 国产一区二区久久| 精品在线亚洲视频| 蜜桃视频第一区免费观看| 五月激情综合网| 偷窥国产亚洲免费视频| 亚洲黄色av一区| 天天综合色天天综合色h| 五月激情综合色| 日本三级韩国三级欧美三级| 亚洲成av人影院在线观看网| 午夜精品久久久久影视| 亚洲午夜三级在线| 久久精品国产网站| 成人免费视频播放| 欧美日韩精品欧美日韩精品一 | 制服丝袜一区二区三区| 制服丝袜中文字幕一区| 2023国产精华国产精品| 久久这里只有精品6| 亚洲欧美日韩成人高清在线一区| 亚洲欧美日韩中文播放 | 日韩一级成人av| 亚洲精品一区二区三区99| 久久久久99精品国产片| 国产欧美一区二区精品性| 亚洲精品视频在线观看免费| 天堂成人免费av电影一区| 精品一区二区久久久| 91啦中文在线观看| 欧美一区在线视频| 国产女同性恋一区二区| 亚洲综合久久久久| 国产乱子伦一区二区三区国色天香| 国产福利精品一区| 91精品国产欧美日韩| 久久精品一二三| 亚洲成人在线观看视频| 99视频有精品| 精品国产伦理网| 日日摸夜夜添夜夜添国产精品| 国产麻豆精品theporn| 欧美视频你懂的| 亚洲欧美日韩国产另类专区| 国产精品夜夜嗨| 欧美一卡二卡三卡| 日韩高清在线不卡| 欧美性一二三区| 亚洲精品中文在线观看| 成人久久视频在线观看| 欧美va亚洲va国产综合| 久久国产精品99久久久久久老狼| 欧美日韩精品欧美日韩精品一综合| 日韩毛片精品高清免费| 国产aⅴ综合色| 自拍偷拍欧美精品| 日本韩国一区二区三区视频| 国产精品福利一区| 91女厕偷拍女厕偷拍高清| 国产精品婷婷午夜在线观看| 大尺度一区二区| 日韩毛片一二三区| 色婷婷综合久久久中文字幕| 亚洲电影视频在线| 欧美一级一区二区| 美女网站色91| 国产欧美日韩不卡免费| 99久久99久久免费精品蜜臀| 综合欧美一区二区三区| 在线亚洲一区观看| 日韩高清在线不卡| 久久久99免费| 欧美影片第一页| 久久99日本精品| 亚洲色图第一区| 欧美日韩高清一区二区| 国产乱码精品一区二区三| 国产精品久久久久久久第一福利| 91麻豆国产精品久久| 日韩有码一区二区三区| 欧美国产乱子伦| 欧美丝袜丝交足nylons| 美女视频第一区二区三区免费观看网站| 99re视频精品| 久久99精品网久久| 午夜精品久久久久久久久久| 久久免费午夜影院| 宅男噜噜噜66一区二区66| 成人av在线一区二区| 六月丁香婷婷久久| 亚洲国产aⅴ天堂久久| 中文字幕日韩av资源站| 久久理论电影网| 欧美电视剧免费全集观看| 欧美三级在线看| 欧美日韩国产乱码电影| 欧美中文一区二区三区| 91影院在线免费观看| 成人v精品蜜桃久久一区| 精彩视频一区二区三区| 亚洲3atv精品一区二区三区| 亚洲精品你懂的| 亚洲一区二区av电影| 国产精品国产馆在线真实露脸 | 欧美精三区欧美精三区| 91麻豆精品国产91久久久使用方法 | 久久久九九九九| 中文字幕在线不卡视频| 亚洲精品国产精华液| 亚洲黄色免费网站| 日本一不卡视频| 美国十次综合导航| 亚洲午夜影视影院在线观看| 亚洲超碰97人人做人人爱| 久久精品国产免费| 国产91精品一区二区麻豆亚洲| 丁香激情综合国产| 在线观看av一区二区| 欧美一区二区二区| 成人免费在线视频观看| 亚洲第一会所有码转帖| 国产剧情在线观看一区二区| 日本高清无吗v一区| 日韩欧美一区二区视频| 亚洲欧美视频在线观看视频| 蜜桃一区二区三区四区| 国产成人精品www牛牛影视| 一本一本大道香蕉久在线精品| 日韩精品一区二区三区在线观看 | 精品少妇一区二区三区免费观看| 国产精品久久久久久久第一福利| 日韩激情视频网站| 99免费精品在线观看| 日韩欧美中文字幕公布| 亚洲在线观看免费视频| 99在线精品观看| 国产欧美日韩综合精品一区二区| 香蕉影视欧美成人| 色94色欧美sute亚洲13| 久久久蜜桃精品| 国产一区在线观看麻豆| 精品国产网站在线观看| 亚洲国产精品视频| 欧洲视频一区二区| 亚洲日本丝袜连裤袜办公室| 成人av午夜电影| 精品少妇一区二区三区在线播放| 亚洲18色成人| 男男gaygay亚洲| 日韩欧美国产午夜精品|