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

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

?? 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:
                      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美天堂一区二区三区| 99国产一区二区三精品乱码| 亚洲激情图片一区| 亚洲在线观看免费| 日韩va欧美va亚洲va久久| 亚洲超碰精品一区二区| 日韩精品高清不卡| 久久精品999| 国产在线看一区| 成人免费视频caoporn| 91婷婷韩国欧美一区二区| 欧美亚洲动漫制服丝袜| 91精品婷婷国产综合久久性色 | 久久午夜羞羞影院免费观看| 久久久久久日产精品| 一区二区成人在线| 国产麻豆精品视频| 欧美日本韩国一区| 国产精品乱人伦一区二区| 亚洲不卡在线观看| 丁香婷婷综合色啪| 8v天堂国产在线一区二区| 国产性做久久久久久| 麻豆国产精品一区二区三区| 国产一区二区美女| 人人超碰91尤物精品国产| 日韩高清不卡一区二区三区| 日韩欧美成人激情| 一区二区中文视频| 精品国产一区二区国模嫣然| 成人h动漫精品一区二区| 日日夜夜一区二区| 中文字幕一区二区三区蜜月| 国产精品全国免费观看高清| 26uuu欧美| 久久精品国产**网站演员| 国产精品久久久一本精品| 精品少妇一区二区三区视频免付费| 国产成人综合亚洲91猫咪| 亚洲第一精品在线| 综合中文字幕亚洲| 久久久久久久电影| 日韩欧美亚洲另类制服综合在线| 91视频com| 成人小视频免费观看| 韩国理伦片一区二区三区在线播放| 日韩毛片一二三区| 国产精品美女久久久久aⅴ国产馆| 91精品午夜视频| 欧美喷水一区二区| 欧美精品九九99久久| 91蜜桃传媒精品久久久一区二区| 成人性视频网站| 成人一区二区三区在线观看| 国产真实乱偷精品视频免| 美女一区二区久久| 国产一区二区三区观看| 激情综合色播激情啊| 国模少妇一区二区三区| 国产福利一区在线| 成人av手机在线观看| 成人精品免费视频| av在线播放不卡| 欧美日韩在线一区二区| 777a∨成人精品桃花网| 日韩美女一区二区三区四区| 91精品综合久久久久久| 久久精品国产在热久久| 国产剧情av麻豆香蕉精品| 国产成人精品亚洲日本在线桃色| 国产成人在线网站| 欧美日韩在线三级| 久久久久久久久久久久久夜| 中文字幕在线不卡视频| 偷拍与自拍一区| 成人激情小说网站| 欧美老女人第四色| 国产精品视频九色porn| 日韩高清在线电影| 国产suv精品一区二区三区| 色婷婷精品久久二区二区蜜臀av| 欧美系列在线观看| 国产精品毛片无遮挡高清| 亚洲成在人线在线播放| 国产成人av电影| 91精品国产入口| 一区二区成人在线| 成人性色生活片免费看爆迷你毛片| 欧美日韩高清影院| 亚洲精品国产视频| www.色精品| 国产精品国产三级国产aⅴ中文| 日韩中文字幕1| 欧美日韩高清一区二区不卡| 亚洲特黄一级片| 97aⅴ精品视频一二三区| 日韩欧美在线综合网| 天天av天天翘天天综合网 | 91小视频在线| 国产亚洲一区二区在线观看| 免费av成人在线| 8x福利精品第一导航| 免费三级欧美电影| 3d动漫精品啪啪1区2区免费| 夜夜嗨av一区二区三区| 日本高清免费不卡视频| 亚洲国产乱码最新视频| 在线观看亚洲专区| 三级欧美韩日大片在线看| 欧美一区国产二区| 国内久久精品视频| 国产精品久久久久一区| 91久久精品一区二区| 欧美aaaaa成人免费观看视频| 8v天堂国产在线一区二区| 国产综合色视频| 亚洲人成在线播放网站岛国 | 欧美日韩一级片在线观看| 欧美二区在线观看| 免费成人深夜小野草| 久久久99免费| 欧美色涩在线第一页| 美国精品在线观看| 国产精品成人免费| 欧美一a一片一级一片| 国产精品综合二区| 亚洲高清一区二区三区| 精品国产凹凸成av人网站| 91黄色激情网站| 国产精品一区二区91| 亚洲国产wwwccc36天堂| 国产午夜三级一区二区三| 欧美日韩一级黄| 91在线你懂得| 成人黄色小视频在线观看| 午夜电影久久久| 夜夜爽夜夜爽精品视频| 国产精品卡一卡二| 国产亚洲精久久久久久| 日韩精品一区二区三区在线观看| 欧美午夜一区二区| 日本精品一区二区三区四区的功能| 国产东北露脸精品视频| 蜜臀av亚洲一区中文字幕| 免费不卡在线视频| 亚洲韩国一区二区三区| 亚洲精品视频在线观看网站| 中文一区在线播放| 国产农村妇女毛片精品久久麻豆 | zzijzzij亚洲日本少妇熟睡| 国产一区在线不卡| 国产精品99久| 豆国产96在线|亚洲| 成人动漫视频在线| 91在线porny国产在线看| 丁香天五香天堂综合| 波多野结衣中文字幕一区二区三区| 韩国成人在线视频| 丁香婷婷综合激情五月色| 国产.欧美.日韩| aaa亚洲精品| 欧美最猛性xxxxx直播| 欧美精品久久99久久在免费线| 3d动漫精品啪啪| 久久蜜臀精品av| 日韩毛片高清在线播放| 亚洲午夜久久久久久久久电影院 | 亚洲精品写真福利| 日韩电影在线观看网站| 天堂资源在线中文精品| 狠狠色狠狠色综合| 色综合中文综合网| 秋霞午夜鲁丝一区二区老狼| 国产一区二区视频在线| 色猫猫国产区一区二在线视频| 777色狠狠一区二区三区| 国产精品九色蝌蚪自拍| 美女诱惑一区二区| 在线精品国精品国产尤物884a| 欧美岛国在线观看| 亚洲高清三级视频| 9i在线看片成人免费| 欧美成人一区二区| 亚洲mv在线观看| 不卡一区二区三区四区| 日韩三级视频在线观看| 亚洲人一二三区| 成人精品国产福利| 精品国产乱码久久久久久免费| 亚洲精选在线视频| 丁香婷婷综合色啪| 久久久久久久国产精品影院| 奇米在线7777在线精品| 欧美日韩一级二级| 一区av在线播放| 色欧美88888久久久久久影院| 日本一区二区视频在线| 激情五月婷婷综合网| 欧美mv日韩mv国产网站| 韩国一区二区三区|