Linux Home Server 是专门为家庭和SOHO/SMB 设计的高性价比的ISCSI 存储服务器, 具有如下的特色: 强大的iscsi 存储服务器软件; 混合iscsi 和NAS 服务; Free, 基于Linux; LHS-200 的编译使用openwrt 框架,需要先下载并配置openwrt 开发环境 从openwrt 的开发站点 https://dev.openwrt.org, 下载最新的开发分枝,并下载到本地 svn co https://svn.openwrt.org/openwrt/trunk/ 为方便起见,建议下载所有的可选包,后面要用到 svn co https://svn.openwrt.org/openwrt/packages/ 从公司网站 http://www.linuxce.cn 或者 http://www.linuxce.net 下载 LHS-200 的最新源代码并解压缩,源代码中包含两个目录和一个README文件,按README文件的要求,拷贝下列包到trunk/package 目录 libs/libiconv net/samba3 utils/pciutils net/wget net/ctorrent libs/uclibc++ 然后从解压缩的源代码中分别拷贝目录modified 和lhstoolfix中的内容到trunk 目录 至此,就可以象通常的openwrt 项目一样进行编译, Target System 选 "RDC 321x", Target Profile 选 "R3210 based linux home server board"
上传时间: 2017-02-09
上传用户:xaijhqx
XML Copy Editor is free software released under the GNU General Public License. It is available in Chinese (simplified and traditional), English, French, German, Italian, Slovak, Swedish and Ukrainian. There are Linux packages for Arch, Fedora, Gentoo, Slackware and Ubuntu.
标签: available software released General
上传时间: 2013-12-20
上传用户:lizhizheng88
/* ********************************************************************************************************* * 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 **************
上传时间: 2015-11-22
上传用户:the same kong
#include <stdio.h> #include <stdlib.h> ///链式栈 typedef struct node { int data; struct node *next; }Node,*Linklist; Linklist Createlist() { Linklist p; Linklist h; int data1; scanf("%d",&data1); if(data1 != 0) { h = (Node *)malloc(sizeof(Node)); h->data = data1; h->next = NULL; } else if(data1 == 0) return NULL; scanf("%d",&data1); while(data1 != 0) { p = (Node *)malloc(sizeof(Node)); p -> data = data1; p -> next = h; h = p; scanf("%d",&data1); } return h; } void Outputlist(Node *head) { Linklist p; p = head; while(p != NULL ) { printf("%d ",p->data); p = p->next; } printf("\n"); } void Freelist(Node *head) { Node *p; Node *q = NULL; p = head; while(p != NULL) { q = p; p = p->next; free(q); } } int main() { Node *head; head = Createlist(); Outputlist(head); Freelist(head); return 0; } 2.顺序栈 [cpp] view plain copy #include <iostream> #include <stdio.h> #include <stdlib.h> ///顺序栈 #define MaxSize 100 using namespace std; typedef
上传时间: 2018-05-09
上传用户:123456..
|- 我的虚拟机和ubuntu下载 - 0 B|- 腾讯课堂公开课 - 0 B|- 工具软件 - 0 B|- X210光盘资料 - 0 B|- 4.C语言专题精讲篇 - 0 B|- 2.uboot和linux内核移植 - 0 B|- 1.ARM裸机全集 - 0 B|- 0.基础预科 - 0 B|- 专用播放器第一代-已不用,请下载第二代.rar - 18.10 MB|- 专用播放器-《朱老师物联网大讲堂》收费视频.rar - 18.10 MB|- 朱老师物联网大讲堂高级课程专用播放器-第二代.rar - 28.10 MB
标签: 物联网
上传时间: 2022-06-06
上传用户:
|- 数据科学速查表 - 0 B|- 迁移学习实战 - 0 B|- 零起点Python机器学习快速入门 - 0 B|- 《深度学习入门:基于Python的理论与实现》高清中文版PDF+源代码 - 0 B|- 《Python生物信息学数据管理》中文版PDF+英文版PDF+源代码 - 0 B|- 《Python深度学习》2018中文版pdf+英文版pdf+源代码 - 0 B|- 《Python编程:从入门到实践》中文版+源代码 - 0 B|- stanford machine learning - 0 B|- Python语言程序设计2018版电子教案 - 0 B|- Python网络编程第三版 (原版+中文版+源代码) - 0 B|- Python机器学习实践指南(中文版带书签)、原书代码、数据集 - 0 B|- python官方文档 - 0 B|- Python编程(第4版 套装上下册) - 0 B|- PyQt5快速开发与实战(pdf+源码) - 0 B|- linux - 0 B|- 征服PYTHON-语言基础与典型应用.pdf - 67.40 MB|- 与孩子一起学编程_中文版_详细书签.pdf - 69.10 MB|- 用Python做科学计算.pdf - 6.10 MB|- 用Python写网络爬虫.pdf - 9.90 MB|- 用Python进行自然语言处理(中文翻译NLTK).pdf - 4.40 MB|- 像计算机科学家那样思考 Python中文版第二版.pdf - 712.00 kB|- 网络爬虫-Python和数据分析.pdf - 6.90 MB|- 图解机器学习.pdf - 59.40 MB|- 凸优化.pdf - 5.70 MB|- 数据挖掘导论.pdf - 2.50 MB|- 数据科学入门.pdf - 13.30 MB|- 数据结构与算法__Python语言描述_裘宗燕编著_北京:机械工业出版社_,_2016.01_P346.pdf - 74.30 MB|- 神经网络与深度学习.pdf - 92.60 MB|- 深入Python3...
标签: python
上传时间: 2022-06-06
上传用户:
简介QpenWrt是一个基于Linux的开源嵌入式操作系统,其在linux上进行深入的定制,加入大量网络应用和管理界面,使其广泛应用于路由器中。我们的项目是基于QpenWrt开发的,故其系统框架是相同的。二、OpenWrt编译编译流程a)安装Linux系统)安装编译所需的各种工具;通过Subversion版本库获得源代码;更新并安装package feeds:创建一个默认配置以检查编译环境是否搭建好了;)用menuconfig来配置要加入固件中的软件包;)最后开始编译固件和清理工作。a)首先要安装一个Linux系统,建议使用Ubuntu(以下以Ubuntu为例),安装教程,可看官方wiki:http://wiki.ubuntu.orq.cn/%E9%A6%06%%A1%B5b)需安装如下工具:·升级Ubuntu软件包sudo apt-get update安装所需的工具
上传时间: 2022-06-20
上传用户:zhanglei193
本文的目的是把嵌入式技术与计算机网络技术相结合,构造一个性能稳定且具有较强处理能力的数字化远程视频监控系统。该监控系统以嵌入式Linux系统平台作为服务器端,服务器程序在其上以后台方式运行,等待监控系统环境中的客户机使用浏览器向其发送访问请求,实现在局域网乃至Internet网上对摄像头的远程控制。文中把系统设计分为三大部分:系统硬件设计、嵌入式Linux在硬件平台的实现和系统软件设计。硬件设计部分首先提出了整个硬件系统的实现方案,接着详细介绍了S3C2410处理器与存储器、以太网控制器芯片以及USB和串口的接口电路设计;第二部分详细叙述了嵌入式Linux在本系统硬件平台的移植实现及应用程序的开发特点,重点讲述了本系统平台上Linux的引导加载程序Bootloader的设计过程;系统软件部分首先介绍了USB接口摄像头驱动在嵌入式Linux 下的实现,重点讲述了Video4Linux下视频采集的实现,接着论述了如何实现图像的JPEG压缩,最后针对基于B/S模式的网络通信系统结构,详细阐述了网络通信的具体实现过程和方法。
上传时间: 2022-07-24
上传用户:
智能机器人硬件功能模块介绍1.核心控制板:raspberry b+(树莓派B+):一种卡片式电脑。树莓派是只有信用卡大小的卡片式电脑,其系统基于Linux。截止至2012年6月1日,树莓派只有A和B两个型号,主要区别:A型:1个USB、无有线网络接口、功率2.5W,500mA、256MB RAM;B型:2个USB、支持有线网络、功率3.5W,700mA、512MB RAM。2.底层电路驱动芯片:Arduino 。Mega2560的处理器核心是ATmega2560,同时具有54路数字输入/输出口(其中16路可作为PWM输出),16路模拟输入,4路UART接口,一个16MHz晶体振荡器,一个USB口,一个电源插座,一个ICSP header和一个复位按钮。Arduino Mega2560也能兼容为Arduino UNO设计的扩展板。3.底层硬件:驱动电路、控制电路 包括(ln298、hc-06蓝牙模块、舵机、摄像头、麦克风、无线网卡、电机、地盘、传感器若干、材料等) 4.工作原理:树莓派用来处理上层指令、运用大型代码、和代码整合等,例如:人脸识别、语音识别、邮件发送、环境数据上传到互联网、获取网络指令等。通过串口通讯和底层驱动芯片arduino进行交互,和数据传输。arduino则负责底层电路的驱动、环境检测、快速机动、预报处理等工作1.该项目中我们自主研发了一套无线充电设备,最大的转换效率可以达到40%,安装在机器人的底端,可以实现机器人长时间的工作而不需要人为去充电,解决了用户不在家机器人也能正常工作的问题。该项目已经获得了专利。
上传时间: 2022-07-25
上传用户:zhaiyawei
eeworm.com VIP专区 单片机源码系列 40资源包含以下内容:1. 一些机器人制作教程.pdf2. 3D8光立方取模软件.zip3. 2012春单片机课程设计题目.doc4. 51单片机教程(汇编).doc5. MC68302UM资料.pdf6. 电子设计与开发项目模拟试题.pdf7. 单片机电子琴.rar8. 单片机学习步骤及单片机c语言入门.doc9. MSC-51单片机(有史以来,最简单易懂教程).pdf10. 上下拉电阻知识.doc11. 初学51单片机的教程.pdf12. 单片机控制的矩阵键盘扫描程序集.doc13. 诺基亚5110 LCD资料.rar14. STC15F104E单片机最小系统开发板.rar15. AVR使用入门.doc16. XMC4000系列开发环境介绍(DAVE3).rar17. 单片机课程设计案例.zip18. 单片机原理与应用习题答案.doc19. 华东交大测控技术与仪器单片机试卷.doc20. STC8051系列单片机器件手册.pdf21. XMC4000简介.rar22. 内存与I/O访问.pdf23. 单片机程序.zip24. AT89S51电子钟设计(原理图+PCB+LCD).rar25. 汇编指令大全.doc26. 赠单片机开发常用小软件.zip27. 课程设计计算器.rar28. 16*16点阵设计.doc29. 51芯片手册.zip30. 自动检测技术实验指导书.doc31. led点阵数字时钟.rar32. PL2303驱动 可兼容win7.zip33. 温度监控系统的设计.doc34. 基于软PLC和Web的现场总线远程监控.pdf35. XMC4000系列微控制器内核与主要外设介绍.rar36. 一种小型嵌入式TCP_IP协议栈的设计与实现.pdf37. 智能温度计设计报告.doc38. 基于XMC4000的应用.rar39. 科迪主板维修说明.pdf40. 1 MSP430简介.doc41. 汇编指令大全.doc42. 1602液晶说明.pdf43. 51单片机与PC串口间通讯设计与分析.doc44. AVR_fighter.exe45. LED路灯智能控制系统设计方案.doc46. 单片机课程设计单片机与PC串口通信.pdf47. 单片机电源.ppt48. 12864液晶中文资料.doc49. AT90S1200资料.PDF50. T6963C中文资料.pdf51. 饮料机的界面演示.exe52. 单片机指令工具.exe53. TX-1C型单片机实验板原理图.pdf54. 面向新手的AVR开发工具及基本知识_中文.pdf55. 易懂单片机教程.rar56. 单片机原理与接口技术.ppt57. 资源与接口清单.pdf58. 电子仿真软件Multisim使用技巧集合.pdf59. 老外做的LED旋转钟(电路图、源代码).rar60. Keil+uVision4+中文教程(文档).pdf61. CH5 定时与计数系统设计案例.ppt62. 单片机的40个实验.doc63. Keil_C与Proteus连接调试的经典教程.doc64. 单片机C51的定时器程序.rar65. Proteus入门教程.pdf66. mcs51指令系统速查卡.pdf67. PIC单片机软件模拟器.zip68. 基于视频序列的交通检测系统.rar69. 单片机原理及应用.ppt70. 小信号放大电路设计.pdf71. 中央空调温湿度检测系统设计.rar72. 单片机程序下载器.doc73. 01 打开LabVIEW编程之门.pdf74. ARM-Linux-IIC设备的添加与驱动实现.rar75. 基于单片机的交流LED智能照明系统设计.rar76. 单片机仿真实例大全.part001.rar77. 基于ARM的SIM卡检测系统的研究.rar78. 编程卓越之道.pdf79. 用单片机制作MP3.zip80. 基于STM32F103RB的两相混合式步进电机细分驱动器设计.rar81. 学习单片机总结宝典.pdf82. MSP430实验指导书.doc83. 学习51单片机必备--串口中断.zip84. 51—52系列单片机特殊功能寄存器一览表.doc85. 单片机控制的太阳能LED智能路灯照明系统.rar86. STM32F103增强型系列数据手册.rar87. 51单片机100例.pdf88. 贴片电容识别.doc89. 51单片机C语言全新教程_(强力推荐).pdf90. PLCC-44 封装尺寸图P-44A.pdf91. 单片机的应用.ppt92. 12864液晶中文资料.doc93. 基于AT89S52的双模糊温度控制器设计.rar94. 基于单片机的医疗点滴输液控制系统设计.pdf95. 超声波测距数码管显示.rar96. 高手进阶,终极内存技术指南——完整.doc97. 电子元器件综合知识大全.doc98. 超声波测距LC1602显示.rar99. 各类继电器引脚图.pdf100. 微波炉控制电路设计——.rar
上传时间: 2013-04-15
上传用户:eeworm