A certification path is an ordered list of certificates starting with a certificate issued by the relying party s trust root, and ending with the target certificate that needs to be validated. Certification path validation procedures are based on the algorithm supplied in ITU-T Recommendation X.509 and further defined in Internet Engineering Task Force (IETF) Request for Comments (Rfc) 3280. Certification path processing verifies the binding between the subject distinguished name and/or subject alternative name and the subject public key defined in the target certificate. The binding is limited by constraints, which are specified in the certificates that comprise the path, and inputs that are specified by the relying party. To ensure secure interoperation of PKI-enabled applications, the path validation must be done in accordance with the X.509 and Rfc 3280 specifications. This document provides the test assertions and the test cases for testing path validation software against these specifications.
標(biāo)簽: certification certificates certificate starting
上傳時(shí)間: 2017-07-31
上傳用戶(hù):清風(fēng)冷雨
本書(shū)是英文版,但內(nèi)容非常不錯(cuò),本書(shū)目錄如下: Table of Contents SIP—Understanding the Session Initiation Protocol, Second Edition Foreword to the First Edition Preface to - the Second Edition Preface to - the First Edition Chapter 1 - SIP and the Internet Chapter 2 - Introduction to SIP Chapter 3 - SIP Clients and Servers Chapter 4 - SIP Request Messages Chapter 5 - SIP Response Messages Chapter 6 - SIP Header Fields Chapter 7 - Related Protocols Chapter 8 - Comparison to H.323 Chapter 9 - Wireless and 3GPP Chapter 10 - Call Flow Examples Chapter 11 - Future Directions Appendix A - Changes in the SIP Specification from Rfc 2543 to Rfc 3261
標(biāo)簽: 英文
上傳時(shí)間: 2014-01-06
上傳用戶(hù):爺?shù)臍赓|(zhì)
書(shū)名《Visual C++ 網(wǎng)絡(luò)高級(jí)編程>內(nèi)容簡(jiǎn)介:本書(shū)在對(duì)Visual C 各種編程技術(shù)和TCP/IP進(jìn)行系統(tǒng)介紹的基礎(chǔ)上,重點(diǎn)講解網(wǎng)絡(luò)編程的高級(jí)應(yīng)用、使用技巧和難點(diǎn)。包括基本網(wǎng)絡(luò)編程技術(shù),Telnet協(xié)議的實(shí)現(xiàn),HTTP協(xié)議的實(shí)現(xiàn),F(xiàn)TP協(xié)議的實(shí)現(xiàn),文件下載,UDP協(xié)議的實(shí)現(xiàn),ICMP協(xié)議的實(shí)現(xiàn),PPP協(xié)議的實(shí)現(xiàn),代理服務(wù)器的實(shí)現(xiàn),ATL、DCOM、ActiveX技術(shù),網(wǎng)絡(luò)安全,多媒體網(wǎng)絡(luò)編程等。 對(duì)于每個(gè)主題,書(shū)中都給出其開(kāi)發(fā)要領(lǐng)及應(yīng)用的實(shí)例和技巧,本書(shū)主要面向具有一定Visual C 網(wǎng)絡(luò)編程基礎(chǔ)并希望深入研究網(wǎng)絡(luò)編程技術(shù)的讀者。 ISDN:7115095639 第一章 TCP/IP協(xié)議 第二章 Winsock網(wǎng)絡(luò)編程接口 第三章 Visual C 與網(wǎng)絡(luò)編程 第四章 基本網(wǎng)絡(luò)編程技術(shù) 第五章 Telnet協(xié)議的實(shí)現(xiàn) 第六章 HTTP協(xié)議的實(shí)現(xiàn) 第七章 FTP協(xié)議的實(shí)現(xiàn) 第八章 文件下載 第九章 UDP協(xié)議的實(shí)現(xiàn) 第十章 ICMP協(xié)議的實(shí)現(xiàn) 第十一章 PPP協(xié)議的實(shí)現(xiàn) 第十二章 代理服務(wù)器的實(shí)現(xiàn) 第十三章 ATL、DCOM和ActiveX技術(shù) 第十四章 網(wǎng)絡(luò)安全 附錄1 Rfc文檔分類(lèi)
上傳時(shí)間: 2017-09-17
上傳用戶(hù):黑漆漆
/* ********************************************************************************************************* * uC/TCP-IP V2 * The Embedded TCP/IP Suite * * (c) Copyright 2003-2010; Micrium, Inc.; Weston, FL * * All rights reserved. Protected by international copyright laws. * * uC/TCP-IP is provided in source form to registered licensees ONLY. It is * illegal to distribute this source code to any third party unless you receive * written permission by an authorized Micrium representative. Knowledge of * the source code may NOT be used to develop a similar product. * * Please help us continue to provide the Embedded community with the finest * software available. Your honesty is greatly appreciated. * * You can contact us at www.micrium.com. ********************************************************************************************************* */ /* ********************************************************************************************************* * * NETWORK TCP LAYER * (TRANSMISSION CONTROL PROTOCOL) * * Filename : net_tcp.h * Version : V2.10 * Programmer(s) : ITJ ********************************************************************************************************* * Note(s) : (1) Supports Transmission Control Protocol as described in Rfc #793 with the following * restrictions/constraints : * * (a) TCP Security & Precedence NOT supported Rfc # 793, Section 3.6 * * (b) TCP Urgent Data NOT supported Rfc # 793, Section 3.7 * 'The Communication of * Urgent Information' * * (c) The following TCP options NOT supported : * * (1) Window Scale Rfc #1072, Section 2 * Rfc #1323, Section 2 * (2) Selective Acknowledgement (SACK) Rfc #1072, Section 3 * Rfc #2018 * Rfc #2883 * (3) TCP Echo Rfc #1072, Section 4 * (4) Timestamp Rfc #1323, Section 3.2 * (5) Protection Against Wrapped Sequences (PAWS) Rfc #1323, Section 4 * * (d) #### IP-Options-to-TCP-Connection Rfc #1122, Section 4.2.3.8 * Handling NOT supported * * (e) #### ICMP-Error-Message-to-TCP-Connection Rfc #1122, Section 4.2.3.9 * Handling NOT currently supported * * (2) TCP Layer assumes/requires Network Socket Layer (see 'net_sock.h MODULE Note #1a2'). ********************************************************************************************************* */ /*$PAGE*/ /* ********************************************************************************************************* * MODULE * * Note(s) : (1) TCP Layer module is NOT required for UDP-to-Application API configuration. * * See also 'net_cfg.h TRANSPORT LAYER CONFIGURATION' * & 'net_cfg.h USER DATAGRAM PROTOCOL LAYER CONFIGURATION'. * * See also 'net_tcp.h Note #2'. * * (2) The following TCP-module-present configuration value MUST be pre-#define'd in * 'net_cfg_net.h' PRIOR to all other network modules that require TCP Layer * configuration (see 'net_cfg_net.h TCP LAYER CONFIGURATION Note #2b') : * * NET_TCP_MODULE_PRESENT ********************************************************************************************************* */ #ifdef NET_TCP_MODULE_PRESENT /* See Note #2. */ /* ********************************************************************************************************* * EXTERNS ********************************************************************************************************* */ #if ((defined(NET_TCP_MODULE)) && \ (defined(NET_GLOBALS_EXT))) #define NET_TCP_EXT #else #define NET_TCP_EXT extern #endif /*$PAGE*/ /* ********************************************************************************************************* * DEFINES ********************************************************************************************************* */ /* ********************************************************************************************************* * TCP HEADER DEFINES * * Note(s) : (1) The following TCP value MUST be pre-#define'd in 'net_def.h' PRIOR to 'net_buf.h' so that * the Network Buffer Module can configure maximum buffer header size (see 'net_def.h TCP * LAYER DEFINES' & 'net_buf.h NETWORK BUFFER INDEX & SIZE DEFINES Note #1') : * * (a) NET_TCP_HDR_SIZE_MAX 60 (NET_TCP_HDR_LEN_MAX * * NET_TCP_HDR_LEN_WORD_SIZE) * * (2) Urgent pointer & data NOT supported (see 'net_tcp.h Note #1b'). ********************************************************************************************************* */ #define NET_TCP_HDR_LEN_MASK 0xF000u #define NET_TCP_HDR_LEN_SHIFT 12u #define NET_TCP_HDR_LEN_NONE 0u #define NET_TCP_HDR_LEN_MIN 5u #define NET_TCP_HDR_LEN_MAX 15u #define NET_TCP_HDR_LEN_WORD_SIZE CPU_WORD_SIZE_32 #define NET_TCP_HDR_SIZE_MIN (NET_TCP_HDR_LEN_MIN * NET_TCP_HDR_LEN_WORD_SIZE) #if 0 /* See Note #1a. */ #define NET_TCP_HDR_SIZE_MAX (NET_TCP_HDR_LEN_MAX * NET_TCP_HDR_LEN_WORD_SIZE) #endif #define NET_TCP_HDR_SIZE_TOT_MIN (NET_IP_HDR_SIZE_TOT_MIN + NET_TCP_HDR_SIZE_MIN) #define NET_TCP_HDR_SIZE_TOT_MAX (NET_IP_HDR_SIZE_TOT_MAX + NET_TCP_HDR_SIZE_MAX) #define NET_TCP_PSEUDO_HDR_SIZE 12u /* = sizeof(NET_TCP_PSEUDO_HDR) */ #define NET_TCP_PORT_NBR_RESERVED NET_PORT_NBR_RESERVED #define NET_TCP_PORT_NBR_NONE NET_TCP_PORT_NBR_RESERVED #define NET_TCP_HDR_URG_PTR_NONE 0x0000u /* See Note #2. */ /*$PAGE*/ /* ********************************************************************************************************* * TCP HEADER FLAG DEFINES * * Note(s) : (1) See 'TCP HEADER Note #2' for flag fields. * * (2) Urgent pointer & data NOT supported (see 'net_tcp.h Note #1b'). ********************************************************************************************************* */ #define NET_TCP_HDR_FLAG_MASK 0x0FFFu #define NET_TCP_HDR_FLAG_NONE DEF_BIT_NONE #define NET_TCP_HDR_FLAG_RESERVED 0x0FE0u /* MUST be '0'. */ #define NET_TCP_HDR_FLAG_URGENT DEF_BIT_05 /* See Note #2. */ #define NET_TCP_HDR_FLAG_ACK DEF_BIT_04 #define NET_TCP_HDR_FLAG_PUSH DEF_BIT_03 #define NET_TCP_HDR_FLAG_RESET DEF_BIT_02 #define NET_TCP_HDR_FLAG_SYNC DEF_BIT_01 #define NET_TCP_HDR_FLAG_FIN DEF_BIT_00 #define NET_TCP_HDR_FLAG_CLOSE NET_TCP_HDR_FLAG_FIN /* ********************************************************************************************************* * TCP FLAG DEFINES ********************************************************************************************************* */ /* ------------------ NET TCP FLAGS ------------------- */ #define NET_TCP_FLAG_NONE DEF_BIT_NONE #define NET_TCP_FLAG_USED DEF_BIT_00 /* TCP conn cur used; i.e. NOT in free TCP conn pool. */ /* ------------------ TCP TX FLAGS ------------------- */ /* TCP tx flags copied from TCP hdr flags. */ #define NET_TCP_FLAG_TX_FIN NET_TCP_HDR_FLAG_FIN #define NET_TCP_FLAG_TX_CLOSE NET_TCP_FLAG_TX_FIN #define NET_TCP_FLAG_TX_SYNC NET_TCP_HDR_FLAG_SYNC #define NET_TCP_FLAG_TX_RESET NET_TCP_HDR_FLAG_RESET #define NET_TCP_FLAG_TX_PUSH NET_TCP_HDR_FLAG_PUSH #define NET_TCP_FLAG_TX_ACK NET_TCP_HDR_FLAG_ACK #define NET_TCP_FLAG_TX_URGENT NET_TCP_HDR_FLAG_URGENT #define NET_TCP_FLAG_TX_BLOCK DEF_BIT_07 /* ------------------ TCP RX FLAGS ------------------- */ #define NET_TCP_FLAG_RX_DATA_PEEK DEF_BIT_08 #define NET_TCP_FLAG_RX_BLOCK DEF_BIT_15 /*$PAGE*/ /* ********************************************************************************************************* * TCP TYPE DEFINES * * Note(s) : (1) NET_TCP_TYPE_&&& #define values specifically chosen as ASCII representations of the TCP * types. Memory displays of TCP types will display with their chosen ASCII names. ********************************************************************************************************* */ /* ------------------ NET TCP TYPES ------------------- */ #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) #define NET_TCP_TYPE_NONE 0x4E4F4E45u /* "NONE" in ASCII. */ #define NET_TCP_TYPE_CONN 0x54435020u /* "TCP " in ASCII. */ #else #if (CPU_CFG_DATA_SIZE == CPU_WORD_SIZE_32) #define NET_TCP_TYPE_NONE 0x454E4F4Eu /* "NONE" in ASCII. */ #define NET_TCP_TYPE_CONN 0x20504354u /* "TCP " in ASCII. */ #elif (CPU_CFG_DATA_SIZE == CPU_WORD_SIZE_16) #define NET_TCP_TYPE_NONE 0x4F4E454Eu /* "NONE" in ASCII. */ #define NET_TCP_TYPE_CONN 0x43542050u /* "TCP " in ASCII. */ #else /* Dflt CPU_WORD_SIZE_08. */ #define NET_TCP_TYPE_NONE 0x4E4F4E45u /* "NONE" in ASCII. */ #define NET_TCP_TYPE_CONN 0x54435020u /* "TCP " in ASCII. */ #endif #endif /* ********************************************************************************************************* * TCP SEQUENCE NUMBER DEFINES * * Note(s) : (1) TCP initial transmit sequence number is incremented by a fixed value, preferably a large * prime value or a large value with multiple unique factors. * * (a) One reasonable TCP initial transmit sequence number increment value example : * * 65527 = 37 * 23 * 11 * 7 * * * #### NET_TCP_TX_SEQ_NBR_CTR_INC could be developer-configured in 'net_cfg.h'. * * See also 'NET_TCP_TX_GET_SEQ_NBR() Notes #1b2 & #1c2'. ********************************************************************************************************* */ #define NET_TCP_SEQ_NBR_NONE 0u #define NET_TCP_ACK_NBR_NONE NET_TCP_SEQ_NBR_NONE #define NET_TCP_TX_SEQ_NBR_CTR_INC 65527u /* See Note #1. */ #define NET_TCP_ACK_NBR_DUP_WIN_SIZE_SCALE 4 /*$PAGE*/ /* ********************************************************************************************************* * TCP DATA/TOTAL LENGTH DEFINES * * Note(s) : (1) (a) TCP total length #define's (NET_TCP_TOT_LEN) relate to the total size of a complete * TCP packet, including the packet's TCP header. Note that a complete TCP packet MAY * be fragmented in multiple Internet Protocol packets. * * (b) TCP data length #define's (NET_TCP_DATA_LEN) relate to the data size of a complete * TCP packet, equal to the total TCP packet length minus its TCP header size. Note * that a complete TCP packet MAY be fragmented in multiple Internet Protocol packets. ********************************************************************************************************* */ /* See Notes #1a & #1b. */ #define NET_TCP_DATA_LEN_MIN 0u #define NET_TCP_TOT_LEN_MIN (NET_TCP_HDR_SIZE_MIN + NET_TCP_DATA_LEN_MIN) #define NET_TCP_TOT_LEN_MAX (NET_IP_TOT_LEN_MAX - NET_IP_HDR_SIZE_MIN ) #define NET_TCP_DATA_LEN_MAX (NET_TCP_TOT_LEN_MAX - NET_TCP_HDR_SIZE_MIN) /*$PAGE*/ /* ********************************************************************************************************* * TCP SEGMENT SIZE DEFINES * * Note(s) : (1) (a) Rfc # 879, Section 3 states that the TCP Maximum Segment Size "counts only * data octets in the segment, ... not the TCP header or the IP header". * * (b) Rfc #1122, Section 4.2.2.6 requires that : * * (1) "The MSS value to be sent in an MSS option must be less than or equal to * * (A) MMS_R - 20 * * where MMS_R is the maximum size for a transport-layer message that can * be received." * * (2) "If an MSS option is not received at connection setup, TCP MUST assume a * default send MSS of 536 (576 - 40)." * * See also 'net_ip.h IP DATA/TOTAL LENGTH DEFINES Note #1'. ********************************************************************************************************* */ /* See Note #1. */ #define NET_TCP_MAX_SEG_SIZE_DFLT (NET_IP_MAX_DATAGRAM_SIZE_DFLT - NET_IP_HDR_SIZE_MIN - NET_TCP_HDR_SIZE_MIN) #define NET_TCP_MAX_SEG_SIZE_DFLT_RX NET_TCP_DATA_LEN_MAX /* See Note #1b1. */ #define NET_TCP_MAX_SEG_SIZE_DFLT_TX NET_TCP_MAX_SEG_SIZE_DFLT /* See Note #1b2. */ #define NET_TCP_MAX_SEG_SIZE_NONE 0u #define NET_TCP_MAX_SEG_SIZE_MIN NET_TCP_MAX_SEG_SIZE_DFLT #define NET_TCP_MAX_SEG_SIZE_MAX NET_TCP_DATA_LEN_MAX #define NET_TCP_SEG_LEN_MIN NET_TCP_DATA_LEN_MIN #define NET_TCP_SEG_LEN_MAX NET_TCP_DATA_LEN_MAX #define NET_TCP_SEG_LEN_SYNC 1u #define NET_TCP_SEG_LEN_FIN 1u #define NET_TCP_SEG_LEN_CLOSE NET_TCP_SEG_LEN_FIN #define NET_TCP_SEG_LEN_ACK 0u #define NET_TCP_SEG_LEN_RESET 0u #define NET_TCP_SEG_LEN_PROBE 0u #define NET_TCP_DATA_LEN_TX_SYNC 0u #define NET_TCP_DATA_LEN_TX_FIN 0u #define NET_TCP_DATA_LEN_TX_CLOSE NET_TCP_DATA_LEN_TX_FIN #define NET_TCP_DATA_LEN_TX_ACK 0u #define NET_TCP_DATA_LEN_TX_PROBE_NO_DATA 0u #define NET_TCP_DATA_LEN_TX_PROBE_DATA 1u #define NET_TCP_DATA_LEN_TX_RESET 0u #define NET_TCP_TX_PROBE_DATA 0x00u /* ********************************************************************************************************* * TCP WINDOW SIZE DEFINES * * Note(s) : (1) Although NO Rfc specifies the absolute minimum TCP connection window size value allowed, * Rfc #793, Section 3.7 'Data Communication : Managing the Window' states that for "the * window ... there is an assumption that this is related to the currently available data * buffer space available for this connection". ********************************************************************************************************* */ #define NET_TCP_WIN_SIZE_NONE 0u #define NET_TCP_WIN_SIZE_MIN NET_TCP_MAX_SEG_SIZE_MIN #define NET_TCP_WIN_SIZE_MAX DEF_INT_16U_MAX_VAL /*$PAGE*/ /* ********************************************************************************************************* * TCP HEADER OPTIONS DEFINES * * Note(s) : (1) See the following Rfc's for TCP options summary : * * (a) Rfc # 793, Section 3.1 'Header Format : Options' * (b) Rfc #1122; Sections 4.2.2.5, 4.2.2.6 * * (2) TCP option types are encoded in the first octet for each TCP option as follows : * * -------- * | TYPE | * -------- * * The TCP option type value determines the TCP option format : * * (a) The following TCP option types are single-octet TCP options -- i.e. the option type * octet is the ONLY octet for the TCP option. * * (1) TYPE = 0 End of Options List * (2) TYPE = 1 No Operation * * * (b) All other TCP options MUST be multi-octet TCP options (see Rfc #1122, Section 4.2.2.5) : * * ------------------------------ * | TYPE | LEN | TCP OPT | * ------------------------------ * * where * TYPE Indicates the specific TCP option type * LEN Indicates the total TCP option length, in octets, including * the option type & the option length octets * TCP OPT Additional TCP option octets, if any, that contain the remaining * TCP option information * * The following TCP option types are multi-octet TCP options where the option's second * octet specify the total TCP option length, in octets, including the option type & the * option length octets : * * (1) TYPE = 2 Maximum Segment Size See Rfc # 793, Section 3.1 'Header Format : * Options : Maximum Segment Size'; * Rfc #1122, Section 4.2.2.6; * Rfc # 879, Section 3 * * (2) TYPE = 3 Window Scale See 'net_tcp.h Note #1c1' * (3) TYPE = 4 SACK Allowed See 'net_tcp.h Note #1c2' * (4) TYPE = 5 SACK Option See 'net_tcp.h Note #1c2' * (5) TYPE = 6 Echo Request See 'net_tcp.h Note #1c3' * (6) TYPE = 7 Echo Reply See 'net_tcp.h Note #1c3' * (7) TYPE = 8 Timestamp See 'net_tcp.h Note #1c4' * * (3) TCP header allows for a maximum option list length of 40 octets : * * NET_TCP_HDR_OPT_SIZE_MAX = NET_TCP_HDR_SIZE_MAX - NET_TCP_HDR_SIZE_MIN * * = 60 - 20 * * = 40 * * (4) 'NET_TCP_OPT_SIZE' MUST be pre-defined PRIOR to all definitions that require TCP option * size data type. ********************************************************************************************************* */ /*$PAGE*/ #define NET_TCP_HDR_OPT_END_LIST 0u #define NET_TCP_HDR_OPT_NOP 1u #define NET_TCP_HDR_OPT_MAX_SEG_SIZE 2u #define NET_TCP_HDR_OPT_WIN_SCALE 3u #define NET_TCP_HDR_OPT_SACK_PERMIT 4u #define NET_TCP_HDR_OPT_SACK 5u #define NET_TCP_HDR_OPT_ECHO_REQ 6u #define NET_TCP_HDR_OPT_ECHO_REPLY 7u #define NET_TCP_HDR_OPT_TS 8u #define NET_TCP_HDR_OPT_PAD NET_TCP_HDR_OPT_END_LIST #define NET_TCP_HDR_OPT_LEN_END_LIST 1u #define NET_TCP_HDR_OPT_LEN_NOP 1u #define NET_TCP_HDR_OPT_LEN_MAX_SEG_SIZE 4u #define NET_TCP_HDR_OPT_LEN_WIN_SCALE 3u #define NET_TCP_HDR_OPT_LEN_SACK_PERMIT 2u #define NET_TCP_HDR_OPT_LEN_ECHO_REQ 6u #define NET_TCP_HDR_OPT_LEN_ECHO_REPLY 6u #define NET_TCP_HDR_OPT_LEN_TS 10u #define NET_TCP_HDR_OPT_LEN_SACK_MIN 6u #define NET_TCP_HDR_OPT_LEN_SACK_MAX 38u #define NET_TCP_HDR_OPT_LEN_MIN 1u #define NET_TCP_HDR_OPT_LEN_MIN_LEN 2u #define NET_TCP_HDR_OPT_LEN_MAX 38u typedef CPU_INT32U NET_TCP_OPT_SIZE; /* TCP opt size data type (see Note #4). */ #define NET_TCP_HDR_OPT_SIZE_WORD (sizeof(NET_TCP_OPT_SIZE)) #define NET_TCP_HDR_OPT_SIZE_MAX (NET_TCP_HDR_SIZE_MAX - NET_TCP_HDR_SIZE_MIN) #define NET_TCP_HDR_OPT_NBR_MIN 0u #define NET_TCP_HDR_OPT_NBR_MAX (NET_TCP_HDR_OPT_SIZE_MAX / NET_TCP_HDR_OPT_SIZE_WORD) #define NET_TCP_HDR_OPT_IX NET_TCP_HDR_SIZE_MIN /*$PAGE*/ /* ********************************************************************************************************* * TCP OPTION CONFIGURATION TYPE DEFINES * * Note(s) : (1) NET_TCP_OPT_CFG_TYPE_&&& #define values specifically chosen as ASCII representations of * the TCP option configuration types. Memory displays of TCP option configuration buffers * will display the TCP option configuration TYPEs with their chosen ASCII names. ********************************************************************************************************* */ /* ---------------- TCP OPT CFG TYPES ----------------- */ #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) #define NET_TCP_OPT_CFG_TYPE_NONE 0x4E4F4E45u /* "NONE" in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE 0x4D535320u /* "MSS " in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_WIN_SCALE 0x57494E20u /* "WIN " in ASCII (see 'net_tcp.h Note #1c1'). */ #define NET_TCP_OPT_CFG_TYPE_SACK_PERMIT 0x53434B50u /* "SCKP" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_SACK 0x5341434Bu /* "SACK" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REQ 0x45524551u /* "EREQ" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REPLY 0x4543484Fu /* "ECHO" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_TS 0x54532020u /* "TS " in ASCII (see 'net_tcp.h Note #1c4'). */ #else #if (CPU_CFG_DATA_SIZE == CPU_WORD_SIZE_32) #define NET_TCP_OPT_CFG_TYPE_NONE 0x454E4F4Eu /* "NONE" in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE 0x2053534Du /* "MSS " in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_WIN_SCALE 0x204E4957u /* "WIN " in ASCII (see 'net_tcp.h Note #1c1'). */ #define NET_TCP_OPT_CFG_TYPE_SACK_PERMIT 0x504B4353u /* "SCKP" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_SACK 0x4B434153u /* "SACK" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REQ 0x51455245u /* "EREQ" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REPLY 0x4F484345u /* "ECHO" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_TS 0x20205354u /* "TS " in ASCII (see 'net_tcp.h Note #1c4'). */ #elif (CPU_CFG_DATA_SIZE == CPU_WORD_SIZE_16) #define NET_TCP_OPT_CFG_TYPE_NONE 0x4F4E454Eu /* "NONE" in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE 0x534D2053u /* "MSS " in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_WIN_SCALE 0x4957204Eu /* "WIN " in ASCII (see 'net_tcp.h Note #1c1'). */ #define NET_TCP_OPT_CFG_TYPE_SACK_PERMIT 0x4353504Bu /* "SCKP" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_SACK 0x41534B43u /* "SACK" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REQ 0x52455145u /* "EREQ" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REPLY 0x43454F48u /* "ECHO" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_TS 0x53542020u /* "TS " in ASCII (see 'net_tcp.h Note #1c4'). */ #else /* Dflt CPU_WORD_SIZE_08. */ #define NET_TCP_OPT_CFG_TYPE_NONE 0x4E4F4E45u /* "NONE" in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE 0x4D535320u /* "MSS " in ASCII. */ #define NET_TCP_OPT_CFG_TYPE_WIN_SCALE 0x57494E20u /* "WIN " in ASCII (see 'net_tcp.h Note #1c1'). */ #define NET_TCP_OPT_CFG_TYPE_SACK_PERMIT 0x53434B50u /* "SCKP" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_SACK 0x5341434Bu /* "SACK" in ASCII (see 'net_tcp.h Note #1c2'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REQ 0x45524551u /* "EREQ" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_ECHO_REPLY 0x4543484Fu /* "ECHO" in ASCII (see 'net_tcp.h Note #1c3'). */ #define NET_TCP_OPT_CFG_TYPE_TS 0x54532020u /* "TS " in ASCII (see 'net_tcp.h Note #1c4'). */ #endif #endif /*$PAGE*/ /* ********************************************************************************************************* * TCP CONNECTION TIMEOUT DEFINES * * Note(s) : (1) (a) (1) Rfc #1122, Section 4.2.2.13 'DISCUSSION' states that "the graceful close algorithm * of TCP requires that the connection state remain defined on (at least) one end of * the connection, for a timeout period of 2xMSL ... During this period, the (remote * socket, local socket) pair that defines the connection is busy and cannot be reused". * * (2) The following sections reiterate that the TIME-WAIT state timeout scalar is two * maximum segment lifetimes (2 MSL) : * * (A) Rfc #793, Section 3.9 'Event Processing : SEGMENT ARRIVES : * Check Sequence Number : TIME-WAIT STATE' * (B) Rfc #793, Section 3.9 'Event Processing : SEGMENT ARRIVES : * Check FIN Bit : TIME-WAIT STATE' * * (b) (1) Rfc #793, Section 3.3 'Sequence Numbers : Knowing When to Keep Quiet' states that * "the Maximum Segment Lifetime (MSL) is ... to be 2 minutes. This is an engineering * choice, and may be changed if experience indicates it is desirable to do so". * * (2) Microsoft Corporation's Windows XP defaults MSL to 15 seconds. ********************************************************************************************************* */ /* Max seg timeout (see Note #1b) : */ #define NET_TCP_CONN_TIMEOUT_MAX_SEG_MIN_SEC ( 0u ) /* ... min = 0 seconds */ #define NET_TCP_CONN_TIMEOUT_MAX_SEG_MAX_SEC ( 2u * DEF_TIME_NBR_SEC_PER_MIN) /* ... max = 2 minutes */ #define NET_TCP_CONN_TIMEOUT_MAX_SEG_DFLT_SEC ( 15u ) /* ... dflt = 15 seconds */ #define NET_TCP_CONN_TIMEOUT_MAX_SEG_SCALAR 2u /* ... scalar (see Note #1a). */ #define NET_TCP_CONN_TIMEOUT_CONN_DFLT_SEC (120u * DEF_TIME_NBR_SEC_PER_MIN) /* Dflt conn timeout = 120 minutes */ #define NET_TCP_CONN_TIMEOUT_USER_DFLT_SEC ( 30u * DEF_TIME_NBR_SEC_PER_MIN) /* Dflt user timeout = 30 minutes */ /*$PAGE*/ /* ********************************************************************************************************* * TCP CONNECTION STATES * * Note(s) : (1) See the following Rfc's for TCP state machine summary : * * (a) Rfc # 793; Sections 3.2, 3.4, 3.5, 3.9 * (b) Rfc #1122; Sections 4.2.2.8, 4.2.2.10, 4.2.2.11, 4.2.2.13, 4.2.2.18, 4.2.2.20 * * (2) (a) #### Additional closing-data-available state used for closing connections to allow the * application layer to receive any remaining data. * * See also 'net_tcp.c NetTCP_RxPktConnHandlerFinWait1() Note #2f5A2', * 'net_tcp.c NetTCP_RxPktConnHandlerFinWait2() Note #2f5B', * 'net_tcp.c NetTCP_RxPktConnHandlerClosing() Note #2d2B2a1B', * & 'net_tcp.c NetTCP_RxPktConnHandlerLastAck() Note #2d2A1b'. ********************************************************************************************************* */ #define NET_TCP_CONN_STATE_NONE 0u #define NET_TCP_CONN_STATE_FREE 1u #define NET_TCP_CONN_STATE_CLOSED 10u #define NET_TCP_CONN_STATE_LISTEN 20u #define NET_TCP_CONN_STATE_SYNC_RXD 30u #define NET_TCP_CONN_STATE_SYNC_RXD_PASSIVE 31u #define NET_TCP_CONN_STATE_SYNC_RXD_ACTIVE 32u #define NET_TCP_CONN_STATE_SYNC_TXD 35u #define NET_TCP_CONN_STATE_CONN 40u #define NET_TCP_CONN_STATE_FIN_WAIT_1 50u #define NET_TCP_CONN_STATE_FIN_WAIT_2 51u #define NET_TCP_CONN_STATE_CLOSING 52u #define NET_TCP_CONN_STATE_TIME_WAIT 53u #define NET_TCP_CONN_STATE_CLOSE_WAIT 55u #define NET_TCP_CONN_STATE_LAST_ACK 56u #define NET_TCP_CONN_STATE_CLOSING_DATA_AVAIL 59u /* See Note #2a. */ /* ********************************************************************************************************* * TCP CONNECTION QUEUE STATES ********************************************************************************************************* */ #define NET_TCP_RX_Q_STATE_NONE 0u #define NET_TCP_RX_Q_STATE_CLOSED 100u #define NET_TCP_RX_Q_STATE_CLOSING 101u #define NET_TCP_RX_Q_STATE_SYNC 110u #define NET_TCP_RX_Q_STATE_CONN 111u #define NET_TCP_TX_Q_STATE_NONE 0u #define NET_TCP_TX_Q_STATE_CLOSED 200u #define NET_TCP_TX_Q_STATE_CLOSING 201u #define NET_TCP_TX_Q_STATE_SYNC 210u #define NET_TCP_TX_Q_STATE_CONN 211u #define NET_TCP_TX_Q_STATE_SUSPEND 215u #define NET_TCP_TX_Q_STATE_CLOSED_SUSPEND 220u #define NET_TCP_TX_Q_STATE_CLOSING_SUSPEND 221u /*$PAGE*/ /* ********************************************************************************************************* * TCP CONNECTION CODE DEFINES **************
上傳時(shí)間: 2015-11-22
上傳用戶(hù):the same kong
0引言隨著科技的迅猛發(fā)展,高科技產(chǎn)品替代人力的趨勢(shì)越來(lái)越明顯,和生活息息相關(guān)的例子就是遠(yuǎn)程無(wú)線(xiàn)抄表。作為居民,家家戶(hù)戶(hù)都要安裝的水表,人工抄表的工作量大、時(shí)效慢、不能做到即時(shí)讀取和狀態(tài)檢測(cè),而遠(yuǎn)程無(wú)線(xiàn)抄表則能夠做到實(shí)時(shí)狀態(tài)檢測(cè)和抄收數(shù)據(jù),不需要工作人員親臨現(xiàn)場(chǎng)進(jìn)行抄收數(shù)據(jù),因此,效率大大提高。遠(yuǎn)程抄表系統(tǒng)的功能是能夠?qū)崟r(shí)地、可靠地計(jì)量水用量和對(duì)水表實(shí)施遠(yuǎn)程抄收數(shù)據(jù)。在此背景下,本文設(shè)計(jì)了基于SX1278水表端無(wú)線(xiàn)抄表控制器。1硬件設(shè)計(jì)1.1控制器特性SX1278收發(fā)器主要采用 LoRa遠(yuǎn)程調(diào)制解調(diào)器[1用于長(zhǎng)距離擴(kuò)頻通信,不僅抗干擾性強(qiáng),而且功耗低,適用于電池待機(jī)的收發(fā)電路。當(dāng)SX1278工作在LoRa模式時(shí),能獲得超過(guò)-148dBm的高靈敏度,并集成+20dBm的功率放大器,通信距 5km.SX1278頻率范圍137 ~ 1020MHz,帶寬7.8-37.5kHz,數(shù)據(jù)傳輸速率180bps ~ 37.5kbps,能夠檢測(cè)信號(hào)強(qiáng)度,并對(duì)數(shù)據(jù)進(jìn)行CRC校驗(yàn)。片上采用 8位超低功耗單片機(jī) STMBL 151G,通過(guò)SPI接口對(duì)SX1278進(jìn)行初始化,并實(shí)現(xiàn)計(jì)水表計(jì)數(shù)和開(kāi)關(guān)閥門(mén)。1.2電路設(shè)計(jì)1.2.1接收和發(fā)送電路選擇開(kāi)關(guān)由于SX1278是半雙工收發(fā)器,因此收發(fā)數(shù)據(jù)時(shí)要進(jìn)行模式切換。圖 1所示為U1模擬開(kāi)關(guān),通過(guò)CTR引腳和Vdd引腳的高低電平來(lái)選擇天線(xiàn)連接的是接收電路還是發(fā)射電路。當(dāng) Vdd為低電平,CTRL為高電平,RF1通Rfc當(dāng)Vdd高電平,CTRL為低電平,RF2接通Rfc
標(biāo)簽: sx1278 無(wú)線(xiàn)抄表控制器
上傳時(shí)間: 2022-06-19
上傳用戶(hù):
網(wǎng)絡(luò)時(shí)間協(xié)議NTP(Network Time Protocol)是由Rfc 1305定義的時(shí)間同步協(xié)議,用來(lái)在分布式時(shí)間服務(wù)器和客戶(hù)端之間進(jìn)行時(shí)間同步.NTP采用UDP進(jìn)行數(shù)據(jù)傳輸,端口號(hào)為123,可提供了1~50 ms的精確度,精確度取決于同步源和網(wǎng)絡(luò)路徑等特性(簡(jiǎn)單網(wǎng)絡(luò)時(shí)間協(xié)議SNTP(Simple Network Time Pro-tocol)是一個(gè)簡(jiǎn)化了的NTP服務(wù)器和NTP客戶(hù)端策略,SNTP在協(xié)議實(shí)現(xiàn)上沒(méi)有什么更改,在最近也不會(huì)有什么變動(dòng)。訪(fǎng)問(wèn)范例與UDP/TIME協(xié)議是一致的,實(shí)際上,SNTP應(yīng)該更容易適用于使用個(gè)人計(jì)算機(jī)的UDP/TIME客戶(hù),而且SNTP也被設(shè)計(jì)在一個(gè)專(zhuān)門(mén)的服務(wù)器(包括一臺(tái)集成的無(wú)線(xiàn)電時(shí)鐘)上操作.SNTP主要通過(guò)同步算法來(lái)交換時(shí)間服務(wù)器和客戶(hù)端的時(shí)間截,從而估算出數(shù)據(jù)包在網(wǎng)絡(luò)上的往返延遲,進(jìn)而獨(dú)立地估算系統(tǒng)的時(shí)鐘偏差.SNTP報(bào)文格式如圖1所示。
上傳時(shí)間: 2022-06-23
上傳用戶(hù):20125101110
1.RTP概述1.1,RTP是什么TP全名是Real-time Transport Protocol(實(shí)時(shí)傳輸協(xié)議)。它是IETF提出的一個(gè)標(biāo)準(zhǔn),對(duì)應(yīng)的 Rfc文檔為Rfc3550(Rfc1889為其過(guò)期版本).Rfc3550不僅定義了 RTP,而且定義了配套的相關(guān)協(xié)議 RTCP(Real-time Transport Control Protocol,即實(shí)時(shí)傳輸控制協(xié)議)。RTP用來(lái)為IP網(wǎng)上的語(yǔ)音、圖像、傳真等多種需要實(shí)時(shí)傳輸?shù)亩嗝襟w數(shù)據(jù)提供端到端的實(shí)時(shí)傳輸服務(wù)。RTP為Internet上端到端的實(shí)時(shí)傳輸提供時(shí)間信息和流同步,但并不保證服務(wù)質(zhì)量,服務(wù)質(zhì)量由RTCP來(lái)提供。1.2.RTP的應(yīng)用環(huán)境RTP用于在單播或多播網(wǎng)絡(luò)中傳送實(shí)時(shí)數(shù)據(jù)。它們典型的應(yīng)用場(chǎng)合有如下幾個(gè)。(1)簡(jiǎn)單的多播音頻會(huì)議。語(yǔ)音通信通過(guò)一個(gè)多播地址和一對(duì)端口來(lái)實(shí)現(xiàn)。一個(gè)用于音頻數(shù)據(jù)(RTP),另一個(gè)用于控制包(RTCP)2)音頻和視頻會(huì)議。如果在一次會(huì)議中同時(shí)使用了音頻和視頻會(huì)議,這兩種媒體將分別在不同的 RTP會(huì)話(huà)中傳送,每一個(gè)會(huì)話(huà)使用不同的傳輸?shù)刂罚↖P地址+端口)。如果一個(gè)用戶(hù)同時(shí)使用了兩個(gè)會(huì)話(huà),則每個(gè)會(huì)話(huà)對(duì)應(yīng)的 RTCP包都使用規(guī)范化名字CNAME(Canonical Name)。與會(huì)者可以根據(jù)RTCP包中的CNAME來(lái)獲取相關(guān)聯(lián)的音頻和視頻,然后根據(jù) RTCP包中的計(jì)時(shí)信息(Network time protocol)來(lái)實(shí)現(xiàn)音頻和視頻的同步。
上傳時(shí)間: 2022-06-26
上傳用戶(hù):
VIP專(zhuān)區(qū)-嵌入式/單片機(jī)編程源碼精選合集系列(43)資源包含以下內(nèi)容:1. 單片機(jī)利用霍爾元件冊(cè)電機(jī)速度的c語(yǔ)言程序.2. ARM Image for uCOSII for lpc2131工程模板.3. 漢字庫(kù)的實(shí)現(xiàn) 一.獲取字庫(kù).exe 可以獲得漢字庫(kù)及英文字庫(kù) 二.查看字庫(kù).exe 可以查看漢字庫(kù)及英文字庫(kù)的點(diǎn)陣顯示效果 三.顯示程序.h 獲取字庫(kù)點(diǎn)陣及顯示的源代碼 四.其它資料 相關(guān)的字.4. 2410上的I/O控制數(shù)碼管的應(yīng)用程序.5. NORTi3 is a realtime multitasking operating system conforming to the micro-ITRON 3.0 specification..6. ADE7758三相電能芯片讀寫(xiě)源程序.7. AT91RM9200PQ208電路圖.8. 嵌入式系統(tǒng)驅(qū)動(dòng)開(kāi)發(fā).9. 嵌入式系統(tǒng)驅(qū)動(dòng)程序.10. 數(shù)控電流源61控制程序 包含zlg7289的61控制程序.11. Open Jtag小組的產(chǎn)品。有了它.12. flash讀寫(xiě)原代碼.13. 設(shè)計(jì)一個(gè)可容納四組參賽的數(shù)字式搶答器.14. ps2鍵盤(pán)的設(shè)計(jì).15. 簡(jiǎn)明扼要地介紹了uIP TCP/IP協(xié)議堆棧的eCOG1端口。文中還描述了一 個(gè)應(yīng)用于簡(jiǎn)單的web網(wǎng)頁(yè)服務(wù)器的實(shí)例。 開(kāi)放源uIP軟件包為在不犧牲互操作性或Rfc標(biāo)準(zhǔn)的條件下.16. 5單片機(jī)1實(shí)用系統(tǒng).17. 此文檔為采用FPGA實(shí)現(xiàn)的以太網(wǎng)MAC層.18. 一個(gè)用新方法實(shí)現(xiàn)的堆管理器.19. Xinx ISE 官方源代碼盤(pán)第二章.20. Xilinx ISE 官方源代碼盤(pán) 2.21. Xilinx Ise 官方源代碼盤(pán) 第四章.22. Xilinx ISE 官方源代碼盤(pán) 第五章.23. Xilinx ISE官方源代碼盤(pán) 第六章.24. Epson 清零程序大全.25. Xilinx ISE 官方源代碼盤(pán)第七章 Part1.26. Xilinx ISE 官方源代碼盤(pán)第七章 Part 2.27. Xilinx ISE 官方源代碼盤(pán)第八章.28. Xilinx ISE 官方源代碼盤(pán)第九章.29. Xilinx ISE 官方源代碼盤(pán)第十章.30. 是HD61202液晶顯示漢字的完整程序代碼.31. keil c 編寫(xiě)的tea5767HL 的程序代碼.32. 這是關(guān)于vc5416dsk的文檔其中有其原理圖 為學(xué)vc54xdsp的好的參考資料.33. 這是關(guān)于PDIUSBD12usb接口開(kāi)發(fā)的資料.34. 此為tidsp(vc54x)對(duì)語(yǔ)音音頻采集壓縮編碼解碼設(shè)計(jì)原理圖及pcb圖,非常具有參考價(jià)值.35. 心電采集設(shè)計(jì),有源碼,很不錯(cuò),用MSP430做的,有用的可以下來(lái).36. 改進(jìn)版的紅外遙控器解碼程序 抗干擾能力非常強(qiáng) 至今未出現(xiàn)誤觸發(fā).37. I2C總線(xiàn)LINUX驅(qū)動(dòng)程序.38. CyPress的C8051F32X系列底層驅(qū)動(dòng)(C語(yǔ)言)及上位機(jī)demo(vc環(huán)境).39. 微機(jī)接口實(shí)驗(yàn)程序 。。 。。 。。 。。 。。 。。 。。.40. 前有人傳的imagewrite中少了文件ecc.c,根本不能編譯成功,見(jiàn)圖err,現(xiàn)把完整文件改名了上傳.
上傳時(shí)間: 2013-06-12
上傳用戶(hù):eeworm
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1