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

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

?? uip-doc.txt

?? spi口的超小型網(wǎng)絡(luò)連接器
?? TXT
?? 第 1 頁 / 共 4 頁
字號:
/**\mainpage The uIP TCP/IP stack\author Adam Dunkels, http://www.sics.se/~adam/The uIP TCP/IP stack is intended to make it possible to communicateusing the TCP/IP protocol suite even on small 8-bitmicro-controllers. Despite being small and simple, uIP do not requiretheir peers to have complex, full-size stacks, but can communicatewith peers running a similarly light-weight stack. The code size is onthe order of a few kilobytes and RAM usage can be configured to be aslow as a few hundred bytes.uIP can be found at the uIP web page: http://www.sics.se/~adam/uip/\sa \ref apps "Application programs"\sa \ref uipopt "Compile-time configuration options"\sa \ref uipconffunc "Run-time configuration functions"\sa \ref uipinit "Initialization functions"\sa \ref uipdevfunc "Device driver interface" and    \ref uipdrivervars "variables used by device drivers"\sa \ref uipappfunc "uIP functions called from application programs"(see below) and the \ref psock "protosockets API" and their underlying\ref pt "protothreads" \section uIPIntroduction IntroductionWith the success of the Internet, the TCP/IP protocol suite has becomea global standard for communication. TCP/IP is the underlying protocolused for web page transfers, e-mail transmissions, file transfers, andpeer-to-peer networking over the Internet. For embedded systems, beingable to run native TCP/IP makes it possible to connect the systemdirectly to an intranet or even the global Internet. Embedded deviceswith full TCP/IP support will be first-class network citizens, thusbeing able to fully communicate with other hosts in the network.Traditional TCP/IP implementations have required far too muchresources both in terms of code size and memory usage to be useful insmall 8 or 16-bit systems. Code size of a few hundred kilobytes andRAM requirements of several hundreds of kilobytes have made itimpossible to fit the full TCP/IP stack into systems with a few tensof kilobytes of RAM and room for less than 100 kilobytes ofcode.The uIP implementation is designed to have only the absolute minimalset of features needed for a full TCP/IP stack. It can only handle asingle network interface and contains the IP, ICMP, UDP and TCPprotocols. uIP is written in the C programming language.Many other TCP/IP implementations for small systems assume that theembedded device always will communicate with a full-scale TCP/IPimplementation running on a workstation-class machine. Under thisassumption, it is possible to remove certain TCP/IP mechanisms thatare very rarely used in such situations. Many of those mechanisms areessential, however, if the embedded device is to communicate withanother equally limited device, e.g., when running distributedpeer-to-peer services and protocols. uIP is designed to be RFCcompliant in order to let the embedded devices to act as first-classnetwork citizens. The uIP TCP/IP implementation that is not tailoredfor any specific application.\section tcpip TCP/IP CommunicationThe full TCP/IP suite consists of numerous protocols, ranging from lowlevel protocols such as ARP which translates IP addresses to MACaddresses, to application level protocols such as SMTP that is used totransfer e-mail. The uIP is mostly concerned with the TCP and IPprotocols and upper layer protocols will be referred to as "theapplication". Lower layer protocols are often implemented in hardwareor firmware and will be referred to as "the network device" that arecontrolled by the network device driver.TCP provides a reliable byte stream to the upper layer protocols. Itbreaks the byte stream into appropriately sized segments and eachsegment is sent in its own IP packet. The IP packets are sent out onthe network by the network device driver. If the destination is not onthe physically connected network, the IP packet is forwarded ontoanother network by a router that is situated between the twonetworks. If the maximum packet size of the other network is smallerthan the size of the IP packet, the packet is fragmented into smallerpackets by the router. If possible, the size of the TCP segments arechosen so that fragmentation is minimized. The final recipient of thepacket will have to reassemble any fragmented IP packets before theycan be passed to higher layers.The formal requirements for the protocols in the TCP/IP stack isspecified in a number of RFC documents published by the InternetEngineering Task Force, IETF. Each of the protocols in the stack isdefined in one more RFC documents and RFC1122 collectsall requirements and updates the previous RFCs. The RFC1122 requirements can be divided into two categories; thosethat deal with the host to host communication and those that deal withcommunication between the application and the networking stack. Anexample of the first kind is "A TCP MUST be able to receive a TCPoption in any segment" and an example of the second kind is "ThereMUST be a mechanism for reporting soft TCP error conditions to theapplication." A TCP/IP implementation that violates requirements ofthe first kind may not be able to communicate with other TCP/IPimplementations and may even lead to network failures. Violation ofthe second kind of requirements will only affect the communicationwithin the system and will not affect host-to-host communication.In uIP, all RFC requirements that affect host-to-host communicationare implemented. However, in order to reduce code size, we haveremoved certain mechanisms in the interface between the applicationand the stack, such as the soft error reporting mechanism anddynamically configurable type-of-service bits for TCPconnections. Since there are only very few applications that make useof those features they can be removed without loss of generality.\section mainloop Main Control LoopThe uIP stack can be run either as a task in a multitasking system, oras the main program in a singletasking system. In both cases, the maincontrol loop does two things repeatedly: - Check if a packet has arrived from the network. - Check if a periodic timeout has occurred.If a packet has arrived, the input handler function, uip_input(),should be invoked by the main control loop. The input handler functionwill never block, but will return at once. When it returns, the stackor the application for which the incoming packet was intended may haveproduced one or more reply packets which should be sent out. If so,the network device driver should be called to send out these packets.Periodic timeouts are used to drive TCP mechanisms that depend ontimers, such as delayed acknowledgments, retransmissions andround-trip time estimations. When the main control loop infers thatthe periodic timer should fire, it should invoke the timer handlerfunction uip_periodic(). Because the TCP/IP stack may performretransmissions when dealing with a timer event, the network devicedriver should called to send out the packets that may have been produced.\section arch Architecture Specific FunctionsuIP requires a few functions to be implemented specifically for thearchitecture on which uIP is intended to run. These functions shouldbe hand-tuned for the particular architecture, but generic Cimplementations are given as part of the uIP distribution.\subsection checksums Checksum CalculationThe TCP and IP protocols implement a checksum that covers the data andheader portions of the TCP and IP packets. Since the calculation ofthis checksum is made over all bytes in every packet being sent andreceived it is important that the function that calculates thechecksum is efficient. Most often, this means that the checksumcalculation must be fine-tuned for the particular architecture onwhich the uIP stack runs.While uIP includes a generic checksum function, it also leaves it openfor an architecture specific implementation of the two functionsuip_ipchksum() and uip_tcpchksum(). The checksum calculations in thosefunctions can be written in highly optimized assembler rather thangeneric C code.\subsection longarith 32-bit ArithmeticThe TCP protocol uses 32-bit sequence numbers, and a TCPimplementation will have to do a number of 32-bit additions as part ofthe normal protocol processing. Since 32-bit arithmetic is notnatively available on many of the platforms for which uIP is intended,uIP leaves the 32-bit additions to be implemented by the architecturespecific module and does not make use of any 32-bit arithmetic in themain code base.While uIP implements a generic 32-bit addition, there is support forhaving an architecture specific implementation of the uip_add32()function.\section memory Memory ManagementIn the architectures for which uIP is intended, RAM is the mostscarce resource. With only a few kilobytes of RAM available for theTCP/IP stack to use, mechanisms used in traditional TCP/IP cannot bedirectly applied.The uIP stack does not use explicit dynamic memoryallocation. Instead, it uses a single global buffer for holdingpackets and has a fixed table for holding connection state. The globalpacket buffer is large enough to contain one packet of maximumsize. When a packet arrives from the network, the device driver placesit in the global buffer and calls the TCP/IP stack. If the packetcontains data, the TCP/IP stack will notify the correspondingapplication. Because the data in the buffer will be overwritten by thenext incoming packet, the application will either have to actimmediately on the data or copy the data into a secondary buffer forlater processing. The packet buffer will not be overwritten by newpackets before the application has processed the data. Packets thatarrive when the application is processing the data must be queued,either by the network device or by the device driver. Most single-chipEthernet controllers have on-chip buffers that are large enough tocontain at least 4 maximum sized Ethernet frames. Devices that arehandled by the processor, such as RS-232 ports, can copy incomingbytes to a separate buffer during application processing. If thebuffers are full, the incoming packet is dropped. This will causeperformance degradation, but only when multiple connections arerunning in parallel. This is because uIP advertises a very smallreceiver window, which means that only a single TCP segment will be inthe network per connection.In uIP, the same global packet buffer that is used for incomingpackets is also used for the TCP/IP headers of outgoing data. If theapplication sends dynamic data, it may use the parts of the globalpacket buffer that are not used for headers as a temporary storagebuffer. To send the data, the application passes a pointer to the dataas well as the length of the data to the stack. The TCP/IP headers arewritten into the global buffer and once the headers have beenproduced, the device driver sends the headers and the application dataout on the network. The data is not queued forretransmissions. Instead, the application will have to reproduce thedata if a retransmission is necessary.The total amount of memory usage for uIP depends heavily on theapplications of the particular device in which the implementations areto be run. The memory configuration determines both the amount oftraffic the system should be able to handle and the maximum amount ofsimultaneous connections. A device that will be sending large e-mailswhile at the same time running a web server with highly dynamic webpages and multiple simultaneous clients, will require more RAM than asimple Telnet server. It is possible to run the uIP implementationwith as little as 200 bytes of RAM, but such a configuration willprovide extremely low throughput and will only allow a small number ofsimultaneous connections.\section api Application Program Interface (API)The Application Program Interface (API) defines the way theapplication program interacts with the TCP/IP stack. The most commonlyused API for TCP/IP is the BSD socket API which is used in most Unixsystems and has heavily influenced the Microsoft Windows WinSockAPI. Because the socket API uses stop-and-wait semantics, it requiressupport from an underlying multitasking operating system. Since theoverhead of task management, context switching and allocation of stackspace for the tasks might be too high in the intended uIP targetarchitectures, the BSD socket interface is not suitable for ourpurposes.uIP provides two APIs to programmers: protosockets, a BSD socket-likeAPI without the overhead of full multi-threading, and a "raw"event-based API that is nore low-level than protosockets but uses lessmemory.\sa \ref psock\sa \ref pt\subsection rawapi The uIP raw APIThe "raw" uIP API uses an event driven interface where the application isinvoked in response to certain events. An application running on topof uIP is implemented as a C function that is called by uIP inresponse to certain events. uIP calls the application when data isreceived, when data has been successfully delivered to the other endof the connection, when a new connection has been set up, or when datahas to be retransmitted. The application is also periodically polledfor new data. The application program provides only one callbackfunction; it is up to the application to deal with mapping differentnetwork services to different ports and connections. Because theapplication is able to act on incoming data and connection requests assoon as the TCP/IP stack receives the packet, low response times canbe achieved even in low-end systems.uIP is different from other TCP/IP stacks in that it requires helpfrom the application when doing retransmissions. Other TCP/IP stacksbuffer the transmitted data in memory until the data is known to besuccessfully delivered to the remote end of the connection. If thedata needs to be retransmitted, the stack takes care of theretransmission without notifying the application. With this approach,the data has to be buffered in memory while waiting for anacknowledgment even if the application might be able to quicklyregenerate the data if a retransmission has to be made.In order to reduce memory usage, uIP utilizes the fact that theapplication may be able to regenerate sent data and lets theapplication take part in retransmissions. uIP does not keep track ofpacket contents after they have been sent by the device driver, anduIP requires that the application takes an active part in performingthe retransmission. When uIP decides that a segment should beretransmitted, it calls the application with a flag set indicatingthat a retransmission is required. The application checks theretransmission flag and produces the same data that was previouslysent. From the application's standpoint, performing a retransmissionis not different from how the data originally was sent. Therefore theapplication can be written in such a way that the same code is usedboth for sending data and retransmitting data. Also, it is importantto note that even though the actual retransmission operation iscarried out by the application, it is the responsibility of the stackto know when the retransmission should be made. Thus the complexity of

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
㊣最新国产の精品bt伙计久久| 91精品国产美女浴室洗澡无遮挡| 一区二区免费在线播放| 国产性天天综合网| 国产亚洲综合色| 久久久影视传媒| 国产欧美日韩综合| 国产精品色婷婷久久58| 国产精品色噜噜| 悠悠色在线精品| 亚洲一区视频在线| 亚洲妇女屁股眼交7| 日韩电影在线一区二区| 欧美aaaaaa午夜精品| 九九久久精品视频| 国产精品羞羞答答xxdd| 波多野结衣亚洲一区| 亚洲伦在线观看| 亚洲男女毛片无遮挡| 亚洲va国产天堂va久久en| 蜜乳av一区二区三区| 国产一区二区视频在线播放| av中文字幕一区| 欧美色窝79yyyycom| 欧美一区二区三区四区五区| 精品91自产拍在线观看一区| 国产精品美女久久久久久久久| 亚洲国产精品一区二区尤物区| 美腿丝袜亚洲一区| 成人妖精视频yjsp地址| 欧美日韩午夜在线| 久久精品一区二区| 五月天一区二区三区| 国产乱码精品一品二品| 99r精品视频| 91精品国产综合久久国产大片| 久久久亚洲精品一区二区三区| 亚洲欧美一区二区三区国产精品| 日韩国产精品91| 波多野结衣亚洲| 欧美一级xxx| 一区二区在线免费| 国产精品2024| 欧美一级日韩一级| 亚洲天堂2016| 国产精品一线二线三线| 欧美日韩一级黄| 国产精品久久久久影视| 裸体健美xxxx欧美裸体表演| 99re热这里只有精品视频| 日韩丝袜美女视频| 肉肉av福利一精品导航| www.在线欧美| 久久久久国产一区二区三区四区| 一区二区三区自拍| 国产精品自拍在线| 精品欧美乱码久久久久久 | 国产精品一区二区久久精品爱涩| 91精品福利视频| 国产精品色在线| 韩国女主播成人在线| 91精品国产欧美一区二区18| 亚洲美腿欧美偷拍| 91看片淫黄大片一级| 国产欧美日韩麻豆91| 国产精品一区二区在线看| 欧美一区二区三区色| 亚洲国产精品一区二区久久| av不卡免费电影| 国产调教视频一区| 国产高清亚洲一区| 欧美国产日韩亚洲一区| 国产高清不卡一区| www一区二区| 国产乱人伦偷精品视频不卡 | 日本欧美一区二区在线观看| 欧日韩精品视频| 亚洲欧美偷拍卡通变态| 91丨九色丨尤物| 亚洲天堂av一区| 欧美性受极品xxxx喷水| 亚洲福利视频一区二区| 制服丝袜av成人在线看| 奇米888四色在线精品| 日韩亚洲欧美中文三级| 久久99最新地址| 久久精品综合网| 国产91精品一区二区麻豆网站| 日本一区二区电影| 99国产精品国产精品毛片| 亚洲一区二区欧美激情| 欧美精品v国产精品v日韩精品| 午夜精品久久久久影视| 日韩色视频在线观看| 国精品**一区二区三区在线蜜桃| 国产丝袜欧美中文另类| 91在线免费看| 午夜精品一区二区三区三上悠亚| 这里只有精品免费| 高清国产一区二区三区| 亚洲美女视频在线观看| 69久久99精品久久久久婷婷 | 午夜精品福利一区二区蜜股av| 91精品婷婷国产综合久久| 久久av老司机精品网站导航| 国产精品精品国产色婷婷| 欧美亚洲国产一区二区三区 | 日韩电影免费一区| 欧美综合天天夜夜久久| 蜜乳av一区二区| 亚洲欧美另类综合偷拍| 日韩一卡二卡三卡| 97国产精品videossex| 久久不见久久见免费视频7| 亚洲国产精品av| 欧美狂野另类xxxxoooo| 粉嫩av一区二区三区| 午夜精品一区二区三区三上悠亚| 日本一区二区视频在线观看| 欧美系列亚洲系列| 国产高清一区日本| 日本不卡123| 亚洲美腿欧美偷拍| 国产网站一区二区| 91精品国产aⅴ一区二区| aaa亚洲精品| 国产一区二三区| 日韩精品一级中文字幕精品视频免费观看| 久久一夜天堂av一区二区三区| 91久久一区二区| 成人黄色综合网站| 激情综合色综合久久| 午夜精品在线看| 亚洲自拍欧美精品| 国产精品久久久久久福利一牛影视| 91精品在线麻豆| 欧美日韩视频在线观看一区二区三区| 国产精品12区| 黄色小说综合网站| 人妖欧美一区二区| 丝瓜av网站精品一区二区 | 奇米精品一区二区三区在线观看一 | 亚洲乱码日产精品bd| 久久久久成人黄色影片| 日韩一区二区电影网| 日韩一级视频免费观看在线| 在线欧美日韩精品| 色诱亚洲精品久久久久久| 成人h动漫精品一区二区| 国产麻豆精品theporn| 激情五月播播久久久精品| 日本不卡1234视频| 日韩精品高清不卡| 日韩电影免费在线看| 天堂蜜桃91精品| 五月激情丁香一区二区三区| 亚洲精品视频自拍| 亚洲午夜电影在线| 亚洲午夜久久久久久久久电影院| 一区二区三区.www| 亚洲国产美女搞黄色| 午夜影院久久久| 日本成人中文字幕在线视频| 日韩电影免费在线看| 理论片日本一区| 国产一区二区三区四区五区美女 | 国产91清纯白嫩初高中在线观看| 国产精品99久| 91色视频在线| 欧美日韩一区小说| 日韩欧美精品在线| 国产婷婷色一区二区三区四区| 国产精品久久久久久久裸模| 亚洲欧美日韩中文播放| 一区二区三区免费| 日韩成人一级大片| 国产在线精品国自产拍免费| youjizz久久| 欧美丝袜自拍制服另类| 精品免费日韩av| 国产精品久久久久久久久搜平片| 亚洲色图欧美激情| 日本不卡的三区四区五区| 国产盗摄精品一区二区三区在线| 成人av电影在线观看| 欧美在线不卡视频| 精品国产制服丝袜高跟| 国产精品另类一区| 亚洲国产裸拍裸体视频在线观看乱了| 日本视频一区二区三区| 粉嫩嫩av羞羞动漫久久久| 91视频91自| 久久久久久久久久久久久久久99| 亚洲欧美日韩小说| 久久国产欧美日韩精品| www.日韩精品| 日韩精品在线一区| 亚洲自拍偷拍av| 国产91对白在线观看九色| 欧美日韩卡一卡二|