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

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

?? uip.lst

?? c51版本的uip(一個超小型的TCPIP棧,支持tcpudparpicmp.
?? LST
?? 第 1 頁 / 共 5 頁
字號:
C51 COMPILER V7.08   UIP                                                                   12/26/2003 07:27:14 PAGE 1   


C51 COMPILER V7.08, COMPILATION OF MODULE UIP
OBJECT MODULE PLACED IN uip.OBJ
COMPILER INVOKED BY: C:\Keil708\C51\BIN\C51.EXE uip.c LARGE BROWSE DEBUG OBJECTEXTEND

line level    source

   1          /*
   2          * Copyright (c) 2001-2002, Adam Dunkels.
   3          * All rights reserved. 
   4          *
   5          * Redistribution and use in source and binary forms, with or without 
   6          * modification, are permitted provided that the following conditions 
   7          * are met: 
   8          * 1. Redistributions of source code must retain the above copyright 
   9          *    notice, this list of conditions and the following disclaimer. 
  10          * 2. Redistributions in binary form must reproduce the above copyright 
  11          *    notice, this list of conditions and the following disclaimer in the 
  12          *    documentation and/or other materials provided with the distribution. 
  13          * 3. All advertising materials mentioning features or use of this software
  14          *    must display the following acknowledgement:
  15          *      This product includes software developed by Adam Dunkels.
  16          * 4. The name of the author may not be used to endorse or promote
  17          *    products derived from this software without specific prior
  18          *    written permission.  
  19          *
  20          * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  21          * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  22          * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23          * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  24          * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25          * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  26          * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  27          * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  28          * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  29          * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  30          * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
  31          *
  32          * This file is part of the uIP TCP/IP stack.
  33          *
  34          * $Id: uip.c,v 1.2 2003/04/15 04:52:38 qs Exp $
  35          *
  36          */
  37          
  38          /*
  39          This is a small implementation of the IP and TCP protocols (as well as
  40          some basic ICMP stuff). The implementation couples the IP, TCP and the
  41          application layers very tightly. To keep the size of the compiled code
  42          down, this code also features heavy usage of the goto statement.
  43          
  44            The principle is that we have a small buffer, called the uip_buf, in which
  45            the device driver puts an incoming packet. The TCP/IP stack parses the
  46            headers in the packet, and calls upon the application. If the remote
  47            host has sent data to the application, this data is present in the uip_buf
  48            and the application read the data from there. It is up to the
  49            application to put this data into a byte stream if needed. The
  50            application will not be fed with data that is out of sequence.
  51            
  52                  If the application whishes to send data to the peer, it should put its
  53                  data into the uip_buf, 40 bytes from the start of the buffer. The TCP/IP
  54                  stack will calculate the checksums, and fill in the necessary header
  55          fields and finally send the packet back to the peer. */
C51 COMPILER V7.08   UIP                                                                   12/26/2003 07:27:14 PAGE 2   

  56          
  57          #include "uipopt.h"
  58          #include "uip.h"
  59          #include "uip_arch.h"
  60          
  61          /*-----------------------------------------------------------------------------------*/
  62          /* Variable definitions. */
  63          
  64          u8_t uip_buf[UIP_BUFSIZE];   /* The packet buffer that contains
  65          incoming packets. */
  66          volatile u8_t *uip_appdata;  /* The uip_appdata pointer points to
  67          application data. */
  68          
  69          #if UIP_BUFSIZE > 255
  70          volatile u16_t uip_len;      /* The uip_len is either 8 or 16 bits,
  71                                                                   depending on the maximum packet
  72          size. */
  73          #else
              volatile u8_t uip_len;
              #endif /* UIP_BUFSIZE > 255 */
  76          
  77          volatile u8_t uip_flags;     /* The uip_flags variable is used for
  78                                                                   communication between the TCP/IP stack
  79          and the application program. */
  80          struct uip_conn *uip_conn;   /* uip_conn always points to the current
  81          connection. */
  82          
  83          struct uip_conn uip_conns[UIP_CONNS];
  84          /* The uip_conns array holds all TCP
  85          connections. */
  86          u16_t uip_listenports[UIP_LISTENPORTS];
  87          /* The uip_listenports list all currently
  88          listning ports. */
  89          
  90          
  91          static u16_t ipid;           /* Ths ipid variable is an increasing
  92                                                                   number that is used for the IP ID
  93          field. */
  94          
  95          static u8_t iss[4];          /* The iss variable is used for the TCP
  96          initial sequence number. */
  97          
  98          #if UIP_ACTIVE_OPEN
              static u16_t lastport;       /* Keeps track of the last port used for
              a new connection. */
              #endif /* UIP_ACTIVE_OPEN */
 102          
 103          /* Temporary variables. */
 104          static u8_t c, opt;
 105          static u16_t tmpport;
 106          
 107          /* Structures and definitions. */
 108          typedef struct {
 109                  /* IP header. */
 110                  u8_t vhl,
 111                          tos,          
 112                          len[2],       
 113                          ipid[2],        
 114                          ipoffset[2],  
 115                          ttl,          
 116                          proto;     
 117                  u16_t ipchksum;
C51 COMPILER V7.08   UIP                                                                   12/26/2003 07:27:14 PAGE 3   

 118                  u16_t srcipaddr[2], 
 119                          destipaddr[2];
 120                  /* ICMP (echo) header. */
 121                  u8_t type, icode;
 122                  u16_t icmpchksum;
 123                  u16_t id, seqno;  
 124          } ipicmphdr;
 125          
 126          #define TCP_FIN 0x01
 127          #define TCP_SYN 0x02
 128          #define TCP_RST 0x04
 129          #define TCP_PSH 0x08
 130          #define TCP_ACK 0x10
 131          #define TCP_URG 0x20
 132          
 133          #define IP_PROTO_ICMP   1
 134          #define IP_PROTO_TCP    6
 135          
 136          #define ICMP_ECHO_REPLY 0
 137          #define ICMP_ECHO       8     
 138          
 139          /* Macros. */
 140          #define BUF ((uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])
 141          #define ICMPBUF ((ipicmphdr *)&uip_buf[UIP_LLH_LEN])
 142          
 143          #if UIP_STATISTICS == 1
 144          struct uip_stats uip_stat;
 145          #define UIP_STAT(s) s
 146          #else
              #define UIP_STAT(s)
              #endif /* UIP_STATISTICS == 1 */
 149          
 150          
 151          
 152          #if UIP_LOGGING == 1
              #ifdef DEBUG_TO_FILE
              extern FILE *dbgFile;
              #define UIP_LOG(m) fprintf(dbgFile,"%s\n", m)
              #else
              #define UIP_LOG(m) printf("%s\n", m) 
              #endif
              #else
 160          #define UIP_LOG(m)
 161          #endif /* UIP_LOGGING == 1 */
 162          
 163          /*-----------------------------------------------------------------------------------*/
 164          void
 165          uip_init(void)
 166          {
 167   1              for(c = 0; c < UIP_LISTENPORTS; ++c) {
 168   2                      uip_listenports[c] = 0;
 169   2              }
 170   1              for(c = 0; c < UIP_CONNS; ++c) {
 171   2                      uip_conns[c].tcpstateflags = CLOSED;
 172   2              }
 173   1      #if UIP_ACTIVE_OPEN
                      lastport = 1024;
              #endif /* UIP_ACTIVE_OPEN */
 176   1      }
 177          /*-----------------------------------------------------------------------------------*/
 178          #if UIP_ACTIVE_OPEN
              struct uip_conn *
C51 COMPILER V7.08   UIP                                                                   12/26/2003 07:27:14 PAGE 4   

              uip_connect(u16_t *ripaddr, u16_t rport)
              {
                      struct uip_conn *conn;
                      
                      /* Find an unused local port. */
              again:
                      ++lastport;
                      
                      if(lastport >= 32000) {
                              lastport = 4096;
                      }
                      
                      for(c = 0; c < UIP_CONNS; ++c) {
                              if(uip_conns[c].tcpstateflags != CLOSED &&
                                      uip_conns[c].lport == lastport)
                                      goto again;
                      }
                      
                      
                      for(c = 0; c < UIP_CONNS; ++c) {
                              if(uip_conns[c].tcpstateflags == CLOSED) 
                                      goto found_unused;
                      }
                      for(c = 0; c < UIP_CONNS; ++c) {
                              if(uip_conns[c].tcpstateflags == TIME_WAIT) 
                                      goto found_unused;
                      }
                      return (void *)0;
                      
              found_unused:
                      

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品国产99久久久久久白柏| 在线不卡中文字幕| 亚洲图片一区二区| 精品福利一区二区三区免费视频| 粉嫩av一区二区三区粉嫩 | 一区二区三区在线视频免费| 日韩欧美精品在线视频| 欧美亚洲一区二区三区四区| 国产+成+人+亚洲欧洲自线| 蜜桃一区二区三区在线| 亚洲第一福利视频在线| 国产精品国产三级国产专播品爱网| 日韩精品最新网址| 欧美久久婷婷综合色| 91在线视频免费观看| 国产不卡视频一区| 韩国三级在线一区| 免费在线一区观看| 亚洲成人资源网| 亚洲精品ww久久久久久p站| 国产精品区一区二区三区| 精品国产1区2区3区| 日韩三区在线观看| 日韩一二在线观看| 3d动漫精品啪啪| 欧美日本精品一区二区三区| 色噜噜久久综合| www.色综合.com| 成人污污视频在线观看| 国产精品亚洲综合一区在线观看| 精品一区二区三区免费播放| 日本美女视频一区二区| 天天综合日日夜夜精品| 亚洲国产精品欧美一二99| 亚洲精品国产精品乱码不99| 亚洲色图.com| 专区另类欧美日韩| 亚洲少妇最新在线视频| 国产精品久久99| 最新国产の精品合集bt伙计| 亚洲视频在线一区二区| 亚洲人成7777| 亚洲一二三四区不卡| 亚洲国产精品精华液网站| 亚洲国产精品视频| 免费成人av资源网| 国模少妇一区二区三区| 国产精品1024| www.亚洲色图.com| 色哟哟精品一区| 欧美精品日韩一本| 精品国产电影一区二区| 国产亚洲欧美一区在线观看| 国产精品日产欧美久久久久| 亚洲精品国产精华液| 日日欢夜夜爽一区| 久久99热狠狠色一区二区| 国产一区二区三区最好精华液| 国产91清纯白嫩初高中在线观看| 99视频超级精品| 在线不卡一区二区| 久久这里只有精品首页| 丝袜亚洲另类丝袜在线| 美日韩黄色大片| 粉嫩嫩av羞羞动漫久久久 | 555夜色666亚洲国产免| 精品精品欲导航| 国产精品视频观看| 亚洲一区二区在线播放相泽 | 99久久精品免费看国产免费软件| 在线影视一区二区三区| 日韩欧美一级二级三级| 国产精品视频观看| 午夜精品福利一区二区三区蜜桃| 国产又粗又猛又爽又黄91精品| 99视频国产精品| 日韩欧美中文字幕公布| 国产精品久久久久一区二区三区 | 亚洲综合视频在线观看| 奇米777欧美一区二区| 成人一区二区三区| 欧美日韩第一区日日骚| 国产欧美日韩麻豆91| 亚洲午夜激情网站| 国产精品亚洲综合一区在线观看| 91福利在线免费观看| 久久综合色8888| 亚洲国产综合91精品麻豆| 国产在线国偷精品免费看| 欧美伊人精品成人久久综合97| 久久久精品综合| 亚洲成人久久影院| 99精品视频中文字幕| 欧美mv日韩mv| 亚洲国产视频一区二区| 风间由美一区二区三区在线观看 | 欧美午夜精品久久久久久超碰| 欧美白人最猛性xxxxx69交| 亚洲欧美一区二区视频| 蜜桃一区二区三区在线观看| 91网页版在线| 日本一区二区综合亚洲| 日本一区中文字幕| 欧美曰成人黄网| 国产精品色婷婷久久58| 国产麻豆午夜三级精品| 欧美理论片在线| 亚洲乱码国产乱码精品精的特点| 国产精选一区二区三区| 欧美一区三区二区| 亚洲一区二区三区视频在线播放 | 亚洲黄色录像片| 国产成人aaa| 精品国产污污免费网站入口 | 欧美大片拔萝卜| 日韩精品91亚洲二区在线观看 | 欧美激情一区二区| 国产综合久久久久久久久久久久| 制服丝袜成人动漫| 亚洲一区av在线| 日本精品免费观看高清观看| 中文字幕一区二区不卡| 成人手机电影网| 国产欧美精品一区二区三区四区| 国产在线精品一区二区不卡了 | 亚洲一区二区成人在线观看| 色呦呦国产精品| 亚洲欧美日韩一区| 99精品久久久久久| 亚洲色图制服诱惑| 91美女片黄在线观看| 亚洲欧洲日本在线| 91老师片黄在线观看| 亚洲情趣在线观看| 色婷婷久久久亚洲一区二区三区| 亚洲人123区| 久久综合中文字幕| 奇米精品一区二区三区四区 | 欧美大片国产精品| 日韩国产欧美在线视频| 亚洲午夜私人影院| 91麻豆免费看| 国产亚洲欧洲997久久综合| 国产精品一区在线观看乱码 | 国产剧情在线观看一区二区| 国产精品电影一区二区三区| 欧美日韩成人在线| 国产一区二区三区在线观看精品| 亚洲男女一区二区三区| 日韩写真欧美这视频| 波多野结衣一区二区三区| 日韩高清中文字幕一区| 中文文精品字幕一区二区| 欧美性大战久久久久久久| 国产自产v一区二区三区c| 一区二区三区蜜桃| 久久久久久久久一| 欧美日韩在线三级| 国产激情偷乱视频一区二区三区| 亚洲尤物视频在线| 久久精品欧美一区二区三区不卡| 在线观看网站黄不卡| 国产精品自拍在线| 秋霞影院一区二区| 亚洲欧洲综合另类在线| 国产亚洲成av人在线观看导航 | 一区二区三区在线看| xf在线a精品一区二区视频网站| 在线观看日韩高清av| 国产成人亚洲综合a∨婷婷 | 成年人国产精品| 黄网站免费久久| 偷拍一区二区三区四区| 国产精品久久久久久久久久免费看| 日韩欧美一区二区免费| 欧美在线观看18| 99久久精品免费看| 国产99久久久精品| 国产在线播精品第三| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲另类中文字| 国产精品久99| 国产精品人人做人人爽人人添| 久久久三级国产网站| 日韩一区二区三区观看| 欧美日精品一区视频| 日本精品视频一区二区| 91年精品国产| 91精品久久久久久久久99蜜臂| 91国产免费看| 色综合色综合色综合色综合色综合 | 久久精品72免费观看| 亚洲1区2区3区4区| 亚洲一区二区三区四区在线观看| 亚洲人123区| 一区二区三区四区在线| 亚洲欧美国产三级| 中文字幕亚洲一区二区av在线 | 国产在线看一区| 久88久久88久久久|