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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? uip-doc.txt

?? c8051f020_uip1.0.rar
?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷综合久久久久中文| 日韩欧美自拍偷拍| 国产欧美久久久精品影院| 奇米四色…亚洲| 欧美成人在线直播| 国产酒店精品激情| 日本一区二区电影| 91浏览器入口在线观看| 亚洲成在人线免费| 欧美一区二区黄色| 成人性生交大片| 亚洲综合丁香婷婷六月香| 欧美电影在哪看比较好| 国产一区二区三区在线看麻豆| 久久久久久久久久久久久女国产乱| 成人sese在线| 午夜亚洲福利老司机| 欧美mv日韩mv国产网站| 成人av高清在线| 亚洲电影一区二区| 26uuu另类欧美亚洲曰本| av成人免费在线观看| 性做久久久久久免费观看欧美| 精品少妇一区二区三区视频免付费 | 69堂亚洲精品首页| 国产精品一级在线| 一区二区欧美在线观看| 日韩一区二区三区观看| 国产·精品毛片| 亚洲伊人伊色伊影伊综合网| 精品国产精品一区二区夜夜嗨| 成人中文字幕合集| 亚洲午夜久久久久中文字幕久| 日韩精品在线网站| 91免费观看国产| 久99久精品视频免费观看| 综合久久久久久| 亚洲欧美一区二区三区国产精品| 欧美日韩一级视频| 成人在线综合网站| 免费观看在线综合| 亚洲欧美电影一区二区| 日韩一区二区三区视频在线| 91免费看片在线观看| 激情五月播播久久久精品| 亚洲另类在线一区| 欧美国产亚洲另类动漫| 欧美一区二区三区视频在线| 色综合中文综合网| 中文字幕一区二区三区乱码在线| 91精品一区二区三区在线观看| 成人激情av网| 久久精品国产亚洲高清剧情介绍| 亚洲精品视频观看| 欧美经典三级视频一区二区三区| 欧美一区二区三区成人| 欧洲另类一二三四区| 成人午夜免费电影| 国产精品99久| 久久国内精品自在自线400部| 亚洲国产成人高清精品| 亚洲欧美激情插| 亚洲欧洲日产国码二区| 日本一区二区视频在线| 久久婷婷色综合| 91精品国产色综合久久不卡电影| 在线日韩av片| 色婷婷亚洲综合| 色综合久久久久| 99精品黄色片免费大全| 成人一级片在线观看| 国产一区二区三区蝌蚪| 国产揄拍国内精品对白| 久久99精品久久久| 美女免费视频一区| 免费欧美在线视频| 久久精品国产99国产精品| 久久国产福利国产秒拍| 麻豆freexxxx性91精品| 日本亚洲免费观看| 免费在线欧美视频| 久久国产婷婷国产香蕉| 久久精品国产77777蜜臀| 蜜桃久久精品一区二区| 免费欧美高清视频| 国产麻豆成人传媒免费观看| 国产成人午夜电影网| 国产成人啪午夜精品网站男同| 国产毛片一区二区| 懂色av噜噜一区二区三区av| 成人激情小说网站| 99国产精品国产精品久久| 在线精品视频一区二区三四| 欧美日韩中文一区| 日韩欧美激情在线| 国产欧美中文在线| 亚洲免费资源在线播放| 午夜精品在线视频一区| 老司机免费视频一区二区三区| 国产精品影视天天线| 99久久综合狠狠综合久久| 欧美性受极品xxxx喷水| 精品国产免费人成电影在线观看四季| 欧美tickle裸体挠脚心vk| 中文字幕av一区二区三区高| 亚洲色图视频免费播放| 日韩国产欧美视频| 国产精品18久久久久久久久| 色婷婷久久久综合中文字幕| 91精品国产综合久久香蕉的特点| 精品精品国产高清a毛片牛牛| 国产精品久久久久久亚洲毛片 | 亚洲色图20p| 首页国产欧美久久| 国产高清成人在线| 在线观看一区不卡| 精品成人私密视频| 一区二区三区欧美在线观看| 男人的j进女人的j一区| 91免费版在线看| 欧美成人video| 亚洲女同一区二区| 黄网站免费久久| 91农村精品一区二区在线| 欧美www视频| 一区二区三区日韩在线观看| 国产在线精品免费| 在线观看一区二区视频| 国产三级欧美三级| 日韩精品免费视频人成| 99精品黄色片免费大全| 欧美精品一区二区三区一线天视频 | 国产精品亚洲第一区在线暖暖韩国 | 丁香天五香天堂综合| 7777精品伊人久久久大香线蕉经典版下载 | 免费三级欧美电影| 色婷婷精品大在线视频| 久久久国产精华| 免费观看成人av| 在线观看免费视频综合| 国产精品蜜臀在线观看| 九九九精品视频| 欧美日韩高清一区| 尤物在线观看一区| 成人a级免费电影| 久久尤物电影视频在线观看| 婷婷夜色潮精品综合在线| 一本色道久久加勒比精品| 国产亚洲欧洲997久久综合| 日本最新不卡在线| 欧美日韩极品在线观看一区| 1000部国产精品成人观看| 国产999精品久久| www精品美女久久久tv| 日本不卡中文字幕| 欧美日韩精品高清| 亚洲一级电影视频| 91国偷自产一区二区三区成为亚洲经典 | 欧美精品久久天天躁| 一片黄亚洲嫩模| 日本韩国欧美三级| 亚洲日本va在线观看| 色综合中文字幕国产| 国产精品久久一卡二卡| 成人性生交大片| 国产精品国产三级国产| 懂色av噜噜一区二区三区av| 日本一区二区三级电影在线观看 | 丁香婷婷综合网| 国产日韩欧美高清| 国产黄色精品网站| 久久久久久麻豆| 成人美女视频在线观看18| 欧美国产一区二区在线观看| 成人黄色在线看| 亚洲日本va午夜在线影院| 91亚洲资源网| 一区二区三区四区蜜桃| 欧美无砖砖区免费| 日本亚洲一区二区| 欧美videossexotv100| 国产精品99久久久久久宅男| 中文在线免费一区三区高中清不卡| 大桥未久av一区二区三区中文| 国产精品青草综合久久久久99| kk眼镜猥琐国模调教系列一区二区| 亚洲欧洲无码一区二区三区| 色老汉av一区二区三区| 午夜免费欧美电影| 精品国产网站在线观看| 丁香婷婷深情五月亚洲| 一区二区三区欧美亚洲| 日韩欧美一区二区久久婷婷| 成人视屏免费看| 亚洲国产欧美在线| 精品国产一二三| 91免费看片在线观看| 日韩激情av在线| 国产清纯美女被跳蛋高潮一区二区久久w | 日韩亚洲国产中文字幕欧美|