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

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

?? tcp_ip.h

?? udp,tcp/ip在智能家居芯片上的代碼實現(xiàn).包括芯片NE64的網(wǎng)絡(luò)驅(qū)動源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
 *Copyright (c) 2000-2002 Viola Systems Ltd.
 *All rights reserved.
 *
 *Redistribution and use in source and binary forms, with or without 
 *modification, are permitted provided that the following conditions 
 *are met:
 *
 *1. Redistributions of source code must retain the above copyright 
 *notice, this list of conditions and the following disclaimer.
 *
 *2. Redistributions in binary form must reproduce the above copyright 
 *notice, this list of conditions and the following disclaimer in the 
 *documentation and/or other materials provided with the distribution.
 *
 *3. The end-user documentation included with the redistribution, if 
 *any, must include the following acknowledgment:
 *	"This product includes software developed by Viola 
 *	Systems (http://www.violasystems.com/)."
 *
 *Alternately, this acknowledgment may appear in the software itself, 
 *if and wherever such third-party acknowledgments normally appear.
 *
 *4. The names "OpenTCP" and "Viola Systems" must not be used to 
 *endorse or promote products derived from this software without prior 
 *written permission. For written permission, please contact 
 *opentcp@opentcp.org.
 *
 *5. Products derived from this software may not be called "OpenTCP", 
 *nor may "OpenTCP" appear in their name, without prior written 
 *permission of the Viola Systems Ltd.
 *
 *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 
 *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
 *MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
 *IN NO EVENT SHALL VIOLA SYSTEMS LTD. OR ITS CONTRIBUTORS BE LIABLE 
 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
 *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
 *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
 *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
 *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
 *EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *====================================================================
 *
 *OpenTCP is the unified open source TCP/IP stack available on a series 
 *of 8/16-bit microcontrollers, please see <http://www.opentcp.org>.
 *
 *For more information on how to network-enable your devices, or how to 
 *obtain commercial technical support for OpenTCP, please see 
 *<http://www.violasystems.com/>.
 */

/** \file tcp_ip.h
 *	\brief OpenTCP ARP interface file
 *	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\version 1.0
 *	\date 1.2.2002
 * 	
 *	OpenTCP TCP and UDP protocol function declarations, constants, etc. 
 */

#ifndef INCLUDE_TCP_IP_H
#define INCLUDE_TCP_IP_H

#include <datatypes.h>
#include <ethernet.h>
#if defined(IPv6)
	#include <ipv6.h>
#else
	#include <ip.h>
#endif

/* User define			*/

/** \def NO_OF_TCPSOCKETS
 *	\ingroup opentcp_config
 *	\brief Defines number of TCP sockets available
 *
 *	Change this number to change maximum number of TCP sockets available
 *	to the application.
 *
 */
#define NO_OF_TCPSOCKETS	8

/** \def NO_OF_UDPSOCKETS
 *	\ingroup opentcp_config
 *	\brief Defines number of UDP sockets available
 *
 *	Change this number to change maximum number of UDP sockets available
 *	to the application.
 *
 */
#define NO_OF_UDPSOCKETS	4

/** \def TCP_PORTS_END
 *	\ingroup opentcp_config
 *	\brief Define reserved-ports space
 *
 *	TCP socket numbers will only be assigned to be lower than this 
 *	number. 
 */
#define TCP_PORTS_END		1023

/** \def UDP_PORTS_END
 *	\ingroup opentcp_config
 *	\brief Define reserved-ports space
 *
 *	UDP socket numbers will only be assigned to be lower than this 
 *	number. 
 */
#define UDP_PORTS_END			1023					

/* UDP Control optios			*/

/** \def UDP_OPT_NONE
 *	\brief Disable checksum calculation for UDP socket
 *
 *	By choosing only this option for UDP socket, checksum calculation 
 *	will be disabled for both incoming/outgoing UDP packets. This will
 *	make UDP extremely fast, but also more prone to errors. This is usually
 *	not a big limitation considering that checksum is not so good in
 *	error-detection anyway.
 */
#define UDP_OPT_NONE		0

/** \def UDP_OPT_SEND_CS
 *	\brief Enable checksum calculation for outgoing UDP packets
 *
 *	When only this option is chosen, checksum is calculated for outgoing
 *	UDP packets. This is sometimes neccessary since certain applications
 *	can disable reception of UDP packets without a calculated checksum.
 *
 */
#define UDP_OPT_SEND_CS		1

/** \def UDP_OPT_CHECK_CS
 *	\brief Enable checksum checking for received UDP packets
 *
 *	When this option is enabled, checksum is checked for all received
 *	UDP packets to check for transmission errors.
 */
#define UDP_OPT_CHECK_CS	2

#define UDP_SEND_MTU		ETH_MTU - ETH_HEADER_LEN - UDP_HLEN - IP_MAX_HLEN

#define UDP_HLEN			8				/**< UDP Header Length			*/

#define	MIN_TCP_HLEN		20
#define	MAX_TCP_OPTLEN		40				
#define TCP_DEF_MTU			512				/* Default MTU for TCP			*/

/** \def TCP_DEF_RETRIES
 *	\ingroup opentcp_config
 *	\brief Number of attempted TCP retransmissions before giving up
 *
 *	This number defines how many times will TCP module try to retransmit
 *	the data before recognizing that connection was broken. Increase this
 *	value for high-latency, low-throughput networks with substantial packet
 *	loss.
 *
 */
#define	TCP_DEF_RETRIES		7			

/** \def TCP_CON_ATTEMTPS
 *	\ingroup opentcp_config
 *	\brief Number of connection-establishment attempts
 *
 *	This number defines how many times will TCP module try to connect
 *	to the desired host.
 */
#define TCP_CON_ATTEMPTS	7

/** \def TCP_DEF_KEEPALIVE
 *	\ingroup opentcp_config
 *	\brief Defines a number of  seconds after which an empty ACK packet is sent
 *
 *	If for TCP_DEF_KEEPALIVE seconds nothing is received/sent over the
 *	TCP connection (this includes received empty TCP packets) an empty
 *	(keep-alive) TCP packet will be sent to check if the other side is 
 *	still replying (and able to reply).
 */
#define	TCP_DEF_KEEPALIVE	4			

/** \def TCP_DEF_RETRY_TOUT
 *	\ingroup opentcp_config
 *	\brief Default data-retransmission period (in seconds)
 *
 *	If data was not acknowledged during the time-frame defined by this
 *	value (in seconds) retransmission procedure will occur.
 */
#define TCP_DEF_RETRY_TOUT	4

/** \def TCP_INIT_RETRY_TOUT
 *	\ingroup opentcp_config
 *	\brief Initial retransmission period (in seconds)
 *
 *	Initial retransmission is made a little faster, which helps with
 *	connection establishment if ARP cache didn't contain remote IP address.
 */
#define TCP_INIT_RETRY_TOUT	1

/** \def TCP_SYN_RETRY_TOUT
 *	\ingroup opentcp_config
 *	\brief Retranmission period for SYN packet
 *
 *	Controls SYN packet (segment) retransmit period.
 */
#define TCP_SYN_RETRY_TOUT	2

/** \def TCP_TOS_NORMAL
 *	\brief Defines normal type of service for TCP socket
 *
 *	This defines normal (and for now the only one implemented) type of
 *	service for the TCP socket.
 */
#define TCP_TOS_NORMAL		0

/** \def TCP_DEF_TOUT
 *	\ingroup opentcp_config
 *	\brief Default idle timeout
 *
 *	This period defines idle timeout in seconds - this feature allows
 *	TCP/IP stack to close the TCP connection if no data has been exchanged
 *	over it during this period of time. This relates ONLY to data. Empty
 *	keep-alive TCP packets are not included.
 */
#define TCP_DEF_TOUT		120				

#define TCP_HALF_SEQ_SPACE	0x0000FFFF		/* For detecting sequence space	*/


/* ICMP message types */

#define ICMP_TYPE_DEST_UNREACHABLE	3
#define ICMP_ECHO_REQUEST	8
#define ICMP_ECHO_REPLY		0
#define ICMP_CODE_FRAGMENTATION_NEEDED_DF_SET	4
#define ICMP_MTUMSG_LEN	16
#define ICMP_ECHOREQ_HLEN	8
#define ICMP_TEMPIPSET_DATALEN	102


/* UDP States					*/

/** \def UDP_STATE_FREE
 *	\brief Defines that UDP socket is free and available
 *	
 *	If an entry of ucb type has this as a state value, then it is free
 *	and can be allocated by the udp_getsocket().
 */
#define UDP_STATE_FREE			1

/** \def UDP_STATE_CLOSED
 *	\brief Defines that UDP socket is allocated but closed
 *
 *	Entries of ucb type that have this as their state value were
 *	allocated by udp_getsocket() but they are in the closed state,
 *	so no data can be received/sent through the socket.
 */
#define UDP_STATE_CLOSED		2

/** \def UDP_STATE_OPENED
 *	\brief Defines that UDP socket is allocated and opened
 *
 *	Corresponding UDP socket was allocated and opened so data
 *	can be transmitted/received through it.
 */
#define UDP_STATE_OPENED		3

/* UDP Events					*/

/** \def UDP_EVENT_DATA
 *	\brief Only UDP event notified to UDP socket event listener
 *
 *	For now, this is the only UDP event that is notified to the
 *	UDP sockets' event listener.
 */
#define UDP_EVENT_DATA			64


/* TCP FLAGS					*/

#define	TCP_FLAG_ACK			0x10
#define TCP_FLAG_PUSH			0x08
#define TCP_FLAG_RESET			0x04
#define TCP_FLAG_SYN			0x02
#define TCP_FLAG_FIN			0x01

/* TCP Internal flags			*/

#define TCP_INTFLAGS_CLOSEPENDING	0x01

/* TCP socket types				*/
/** \def TCP_TYPE_NONE
 *	\brief TCP socket is nor a client nor a server
 *
 *	If TCP socket entry is of this type it can not be used for anything. 
 *	This may only be used for testing, debugging, etc. purposes or if 
 *	application is not sure what it wants to be it can reserve a TCP 
 *	socket by getting a socket of type TCP_TYPE_NONE.
 */
#define	TCP_TYPE_NONE			0x00

/** \def TCP_TYPE_SERVER
 *	\brief TCP socket represents a server application
 *
 *	If TCP socket entry is of server type, application using it can only
 *	listen on a given socket for incoming connections. No connections
 *	can be opened towards some outside host unless the outside host
 *	initiates the connection.
 */
#define	TCP_TYPE_SERVER			0x01

/** \def TCP_TYPE_CLIENT
 *	\brief TCP socket represents a client application
 *
 *	If TCP socket entry is of client type, application using it can
 *	establish connection through it towards other Internet hosts but
 *	can not accept any incoming connections on the port (execute
 *	tcp_listen() on it that is).
 */
#define	TCP_TYPE_CLIENT			0x02

/** \def TCP_TYPE_CLIENT_SERVER
 *	\brief	TCP socket can act as client or as server
 *
 *	If TCP socket entry is of this type, application using it can 
 *	both listen on a given socket or establish connection towards an
 *	outside host.
 */
#define	TCP_TYPE_CLIENT_SERVER	0x03

/* TCP States. For more detailed descriptions see RFC793		*/

#define	TCP_STATE_FREE			1	/**< Entry is free and unused 				*/
#define	TCP_STATE_RESERVED		2	/**< Entry is reserved for use				*/
#define	TCP_STATE_CLOSED		3	/**< Entry allocated, socket still closed	*/
#define TCP_STATE_LISTENING		4	/**< Socket in listening state,
									 *	 waiting for incoming connections
									 */
#define TCP_STATE_SYN_RECEIVED	5	/**< SYN packet received (either first
									 *	 SYN packet or response to SYN that
									 *	 we have previously sent)
									 */
#define	TCP_STATE_SYN_SENT		6	/**< SYN packet sent as an attempt
									 *	 to establish a connection
									 */
#define TCP_STATE_FINW1			7	/**< User issued tcp_close request
									 *	 issued so FIN packet was sent
									 */
#define	TCP_STATE_FINW2			8	/**< Received ACK of our FIN, now
									 *	 waiting for other side to send
									 *	 FIN
									 */
#define TCP_STATE_CLOSING		9	/**< Received FIN independently of 
									 *	 our FIN
									 */
#define	TCP_STATE_LAST_ACK		10	/**< Waiting for last ACK packet as a 
									 *	 response to our FIN

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区精品在线视频| 亚洲欧洲精品天堂一级| 国产中文字幕精品| 在线成人av网站| 日韩高清国产一区在线| 2020国产精品| 91猫先生在线| 老司机精品视频一区二区三区| 欧美激情综合五月色丁香| 欧洲色大大久久| 丁香网亚洲国际| 一二三四区精品视频| 日本精品一区二区三区四区的功能| 激情欧美一区二区三区在线观看| 国产精品电影院| 久久久精品一品道一区| 欧洲亚洲国产日韩| 国产精品亚洲第一| 午夜日韩在线观看| 日本一区二区三区免费乱视频| 欧美精品1区2区3区| 丰满岳乱妇一区二区三区| 日韩国产高清在线| 国产精品国产三级国产aⅴ入口| 在线观看视频一区二区欧美日韩| 国产精品中文字幕欧美| 五月天激情小说综合| 国产精品污污网站在线观看| 日韩视频免费观看高清在线视频| 欧美日韩一级二级| 风间由美一区二区av101| 亚洲一本大道在线| 亚洲欧洲无码一区二区三区| 精品国产免费人成在线观看| 5566中文字幕一区二区电影| 91浏览器在线视频| 国内外精品视频| 丝瓜av网站精品一区二区| 一区免费观看视频| 中文字幕不卡的av| 精品乱码亚洲一区二区不卡| 欧美精品粉嫩高潮一区二区| 国产成人综合网| 久久99热狠狠色一区二区| 亚洲一区视频在线| 久久精品网站免费观看| 精品国产乱码久久久久久蜜臀| 不卡av在线免费观看| 亚洲欧美另类久久久精品| 不卡一卡二卡三乱码免费网站| 亚洲夂夂婷婷色拍ww47| 国产精品视频麻豆| 丁香婷婷综合五月| 日韩电影免费在线看| 国产精品一区二区在线看| 日韩一区二区视频在线观看| 亚洲一区二区在线视频| 高清成人在线观看| 国产乱码精品一区二区三区忘忧草 | 不卡av电影在线播放| 亚洲国产精品视频| 日韩一区二区中文字幕| 久久激五月天综合精品| 日韩一区二区三区四区五区六区| 午夜久久久久久电影| 在线观看三级视频欧美| 午夜影视日本亚洲欧洲精品| 日本免费在线视频不卡一不卡二| 中文字幕一区二区三区在线播放| 国产欧美一区二区三区在线老狼| 欧美一区二区三区免费| 欧美大片一区二区| 日韩一区日韩二区| 中文字幕在线不卡一区二区三区| av在线综合网| 99re8在线精品视频免费播放| 黑人巨大精品欧美黑白配亚洲| 免费久久精品视频| 日韩一区有码在线| 日韩一区在线播放| 亚洲精品视频免费看| 亚洲一区二区中文在线| 亚洲电影在线播放| 亚洲另类中文字| 夜色激情一区二区| 欧美—级在线免费片| 91福利在线免费观看| 一本一本大道香蕉久在线精品 | 欧美亚洲另类激情小说| 91精品国产一区二区三区 | 国产婷婷精品av在线| 久久久噜噜噜久久中文字幕色伊伊 | 在线观看91视频| 精品国产乱码久久久久久图片| 精品国产免费人成电影在线观看四季 | 亚洲一区视频在线观看视频| 日本亚洲天堂网| 国内精品伊人久久久久av影院| 懂色一区二区三区免费观看| 在线免费观看成人短视频| 99久久婷婷国产综合精品| 欧美在线播放高清精品| 在线亚洲人成电影网站色www| 国产精品久久毛片a| 亚洲综合无码一区二区| 日日摸夜夜添夜夜添国产精品 | 亚洲一本大道在线| 韩国精品免费视频| 欧美精品1区2区| 国产精品青草综合久久久久99| 午夜精品福利在线| 国产成人av电影免费在线观看| 色偷偷久久人人79超碰人人澡| 在线看不卡av| 久久久www免费人成精品| 亚洲国产日韩在线一区模特| 国产乱码一区二区三区| 欧美亚洲综合另类| 国产精品天干天干在线综合| 一区二区三区四区乱视频| 国产一级精品在线| 欧美日韩一区二区三区高清| 日韩美女精品在线| 久久99精品久久久久久| av在线播放成人| 久久久亚洲国产美女国产盗摄 | 久久综合成人精品亚洲另类欧美 | 中文字幕在线不卡| 极品少妇一区二区| 欧美精品自拍偷拍动漫精品| 欧美一二三在线| 日韩av不卡一区二区| 99国产精品99久久久久久| 欧美在线不卡视频| 亚洲人成在线播放网站岛国| 国产在线日韩欧美| 精品三级av在线| 日日夜夜免费精品视频| 高清在线观看日韩| 久久综合999| 奇米影视一区二区三区| 91精品久久久久久蜜臀| 亚洲国产精品综合小说图片区| 中文字幕免费不卡在线| 精品一区二区国语对白| 欧美猛男gaygay网站| 国产精品初高中害羞小美女文| 国产精品99久久久久久似苏梦涵| 欧美一级一级性生活免费录像| 亚洲精品国产一区二区精华液| 在线视频一区二区三| 亚洲男人天堂一区| 欧美丝袜丝交足nylons图片| 亚洲综合自拍偷拍| 丁香激情综合国产| 亚洲欧美日韩国产综合| av动漫一区二区| 中文幕一区二区三区久久蜜桃| 国产在线精品视频| 欧美日韩另类国产亚洲欧美一级| 欧美国产精品一区二区三区| 国产精品一区二区在线看| 久久综合狠狠综合| 日韩成人免费电影| 国产蜜臀97一区二区三区 | 日韩中文字幕麻豆| 日韩视频一区二区三区在线播放| 麻豆国产一区二区| 久久影院午夜论| 国产电影精品久久禁18| 欧美国产国产综合| 成人精品一区二区三区中文字幕| 亚洲精品一区在线观看| 国产激情一区二区三区| 精品福利二区三区| 成人成人成人在线视频| 日韩欧美一区在线| 国产综合久久久久久鬼色| 久久精品一区二区| 一本色道久久加勒比精品| 亚洲精品视频一区二区| 91精品国产91热久久久做人人 | 色综合久久中文字幕综合网| 亚洲精品国产a| 色婷婷激情综合| 日韩影院精彩在线| 国产三级欧美三级| 国产综合色精品一区二区三区| 一色屋精品亚洲香蕉网站| 色婷婷精品大在线视频| 亚洲国产欧美另类丝袜| 欧美精品一区二区三区在线| av电影天堂一区二区在线| 麻豆专区一区二区三区四区五区| 精品三级av在线| 欧美日韩一区二区三区在线| 国精品**一区二区三区在线蜜桃| 中文字幕日韩av资源站| 欧美一区二区三区免费在线看| 国产麻豆精品95视频|