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

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

?? uip.lst

?? 運行環境是keil。這是一個實現嵌入式TCP/IP的程序
?? LST
?? 第 1 頁 / 共 4 頁
字號:
C51 COMPILER V7.06   UIP                                                                   04/05/2006 12:13:01 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE UIP
OBJECT MODULE PLACED IN .\DEBUG\uip.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE uip\uip.c LARGE OPTIMIZE(6,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\DEBUG\u
                    -ip.lst) OBJECT(.\DEBUG\uip.obj)

stmt level    source

   1          
   2          /*
   3          This is a small implementation of the IP and TCP protocols (as well as
   4          some basic ICMP stuff). The implementation couples the IP, TCP and the
   5          application layers very tightly. To keep the size of the compiled code
   6          down, this code also features heavy usage of the goto statement.
   7          
   8          The principle is that we have a small buffer, called the uip_buf, in which
   9          the device driver puts an incoming packet. The TCP/IP stack parses the
  10          headers in the packet, and calls upon the application. If the remote
  11          host has sent data to the application, this data is present in the uip_buf
  12          and the application read the data from there. It is up to the
  13          application to put this data into a byte stream if needed. The
  14          application will not be fed with data that is out of sequence.
  15          
  16          If the application whishes to send data to the peer, it should put its
  17          data into the uip_buf, 40 bytes from the start of the buffer. The TCP/IP
  18          stack will calculate the checksums, and fill in the necessary header
  19          fields and finally send the packet back to the peer. */
  20          
  21          #include "uip.h"
  22          #include "uipopt.h"
  23          #include "uip_arch.h"
  24          
  25          #include <LCD\LCD.h>
  26          /*-----------------------------------------------------------------------------------*/
  27          /* Variable definitions. */
  28          
  29          u8_t uip_buf[UIP_BUFSIZE];   /* The packet buffer that contains
  30                                          incoming packets. */
  31          volatile u8_t *uip_appdata;  /* The uip_appdata pointer points to
  32                                          application data. */
  33          
  34          #if UIP_BUFSIZE > 255
              volatile u16_t uip_len;      /* The uip_len is either 8 or 16 bits,
                                              depending on the maximum packet
                                              size. */
              #else
  39          volatile u8_t uip_len;
  40          #endif /* UIP_BUFSIZE > 255 */
  41          
  42          volatile u8_t uip_flags;     /* The uip_flags variable is used for
  43                                          communication between the TCP/IP stack
  44                                          and the application program. */
  45          struct uip_conn *uip_conn;   /* uip_conn always points to the current
  46                                          connection. */
  47          
  48          struct uip_conn uip_conns[UIP_CONNS];
  49                                       /* The uip_conns array holds all TCP
  50                                          connections. */
  51          u16_t uip_listenports[UIP_LISTENPORTS];
  52                                       /* The uip_listenports list all currently
  53                                          listning ports. */
  54          
C51 COMPILER V7.06   UIP                                                                   04/05/2006 12:13:01 PAGE 2   

  55          
  56          static u16_t ipid;           /* Ths ipid variable is an increasing
  57                                          number that is used for the IP ID
  58                                          field. */
  59          
  60          static u8_t iss[4];          /* The iss variable is used for the TCP
  61                                          initial sequence number. */
  62          
  63          #if UIP_ACTIVE_OPEN
              static u16_t lastport;       /* Keeps track of the last port used for
                                              a new connection. */
              #endif /* UIP_ACTIVE_OPEN */
  67          
  68          /* Temporary variables. */
  69          static u8_t c, opt;
  70          static u16_t tmpport;
  71          
  72          /* Structures and definitions. */
  73          typedef struct {
  74            /* IP header. */
  75            u8_t vhl,
  76              tos,          
  77              len[2],       
  78              ipid[2],        
  79              ipoffset[2],  
  80              ttl,          
  81              proto;     
  82            u16_t ipchksum;
  83            u16_t srcipaddr[2], 
  84              destipaddr[2];
  85            /* ICMP (echo) header. */
  86            u8_t type, icode;
  87            u16_t icmpchksum;
  88            u16_t id, seqno;  
  89          } ipicmphdr;
  90          
  91          #define TCP_FIN 0x01
  92          #define TCP_SYN 0x02
  93          #define TCP_RST 0x04
  94          #define TCP_PSH 0x08
  95          #define TCP_ACK 0x10
  96          #define TCP_URG 0x20
  97          
  98          #define IP_PROTO_ICMP   1
  99          #define IP_PROTO_TCP    6
 100          
 101          #define ICMP_ECHO_REPLY 0
 102          #define ICMP_ECHO       8     
 103          
 104          /* Macros. */
 105          #define BUF ((uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])
 106          #define ICMPBUF ((ipicmphdr *)&uip_buf[UIP_LLH_LEN])
 107          
 108          #if UIP_STATISTICS == 1
 109          //struct uip_stats uip_stat;  LEON;
 110          struct uip_stats uip_stat={
 111                                     {0,0,0,0,0,0,0,0,0},
 112                                     {0,0,0,0}, 
 113                                     {0,0,0,0,0,0,0,0,0}, 
 114                                    };
 115          #define UIP_STAT(s) s
 116          #else
C51 COMPILER V7.06   UIP                                                                   04/05/2006 12:13:01 PAGE 3   

              #define UIP_STAT(s)
              #endif /* UIP_STATISTICS == 1 */
 119          
 120          #if UIP_LOGGING == 1
              #define UIP_LOG(m) printf("%s\n", m)
              #else
 123          #define UIP_LOG(m) //LCD_log(m)  //leon;
 124          #endif /* UIP_LOGGING == 1 */
 125          
 126          /*-----------------------------------------------------------------------------------*/
 127          void
 128          uip_init(void)
 129          {
 130   1        for(c = 0; c < UIP_LISTENPORTS; ++c) {
 131   2          uip_listenports[c] = 0;
 132   2        }
 133   1        for(c = 0; c < UIP_CONNS; ++c) {
 134   2          uip_conns[c].tcpstateflags = CLOSED;
 135   2        }
 136   1      #if UIP_ACTIVE_OPEN
                lastport = 1024;
              #endif /* UIP_ACTIVE_OPEN */
 139   1      }
 140          /*-----------------------------------------------------------------------------------*/
 141          #if UIP_ACTIVE_OPEN
              struct uip_conn *
              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:
              
                conn = &uip_conns[c];
                
                conn->tcpstateflags = SYN_SENT | UIP_OUTSTANDING;
              
                conn->snd_nxt[0] = conn->ack_nxt[0] = iss[0];
C51 COMPILER V7.06   UIP                                                                   04/05/2006 12:13:01 PAGE 4   

                conn->snd_nxt[1] = conn->ack_nxt[1] = iss[1];
                conn->snd_nxt[2] = conn->ack_nxt[2] = iss[2];
                conn->snd_nxt[3] = conn->ack_nxt[3] = iss[3];
              
                if(++conn->ack_nxt[3] == 0) {
                  if(++conn->ack_nxt[2] == 0) {
                    if(++conn->ack_nxt[1] == 0) {
                      ++conn->ack_nxt[0];
                    }
                  }
                }
                
                conn->nrtx = 0;
                conn->timer = 1; /* Send the SYN next time around. */
                conn->lport = htons(lastport);
                conn->rport = htons(rport);
                conn->ripaddr[0] = ripaddr[0];
                conn->ripaddr[1] = ripaddr[1];
                
                return conn;
              }
              #endif /* UIP_ACTIVE_OPEN */
 201          /*-----------------------------------------------------------------------------------*/
 202          void
 203          uip_listen(u16_t port)
 204          {
 205   1        for(c = 0; c < UIP_LISTENPORTS; ++c) {
 206   2          if(uip_listenports[c] == 0) {
 207   3            uip_listenports[c] = htons(port);
 208   3            break;
 209   3          }
 210   2        }
 211   1      }
 212          /*-----------------------------------------------------------------------------------*/
 213          void
 214          uip_process(u8_t flag) 
 215          {
 216   1        uip_appdata = &uip_buf[40 + UIP_LLH_LEN];
 217   1          
 218   1        /* Check if we were invoked because of the perodic timer fireing. */
 219   1        if(flag == UIP_TIMER) {
 220   2          /* Increase the initial sequence number. */
 221   2          if(++iss[3] == 0) {
 222   3            if(++iss[2] == 0) {
 223   4              if(++iss[1] == 0) {
 224   5                ++iss[0];
 225   5              }
 226   4            }
 227   3          }    
 228   2          uip_len = 0;
 229   2          if(uip_conn->tcpstateflags == TIME_WAIT ||
 230   2             uip_conn->tcpstateflags == FIN_WAIT_2) {
 231   3            ++(uip_conn->timer);
 232   3            if(uip_conn->timer == UIP_TIME_WAIT_TIMEOUT) {
 233   4              uip_conn->tcpstateflags = CLOSED;
 234   4            }
 235   3          } else if(uip_conn->tcpstateflags != CLOSED) {
 236   3            /* If the connection has outstanding data, we increase the
 237   3               connection's timer and see if it has reached the RTO value
 238   3               in which case we retransmit. */
 239   3            if(uip_conn->tcpstateflags & UIP_OUTSTANDING) {
 240   4              --(uip_conn->timer);
C51 COMPILER V7.06   UIP                                                                   04/05/2006 12:13:01 PAGE 5   

 241   4              if(uip_conn->timer == 0) {
 242   5      
 243   5                if(uip_conn->nrtx == UIP_MAXRTX) {
 244   6                  uip_conn->tcpstateflags = CLOSED;
 245   6      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品费精品国产一区二区| 中文字幕一区二区三| 午夜国产精品影院在线观看| 在线视频国产一区| 亚洲图片有声小说| 91精品国产免费久久综合| 日本aⅴ精品一区二区三区| 日韩一区二区精品葵司在线| 韩国精品主播一区二区在线观看| 久久综合色之久久综合| 成人丝袜高跟foot| 亚洲精品伦理在线| 91精品国产入口在线| 国产麻豆精品视频| 亚洲欧美韩国综合色| 欧美午夜一区二区| 国产一区二区三区在线观看免费视频 | 国产婷婷精品av在线| 成人午夜看片网址| 亚洲高清免费观看| 久久久精品国产免费观看同学| 成人sese在线| 日韩va亚洲va欧美va久久| 久久久亚洲综合| 欧美在线不卡视频| 九九**精品视频免费播放| 日本一区免费视频| 欧美精品久久天天躁| 国产老妇另类xxxxx| 亚洲影视在线观看| 欧美国产日产图区| 3atv一区二区三区| 99精品一区二区三区| 免费亚洲电影在线| 亚洲狠狠丁香婷婷综合久久久| 日韩精品在线一区二区| 色综合久久九月婷婷色综合| 另类人妖一区二区av| 亚洲女厕所小便bbb| 精品国产一区a| 欧美亚洲尤物久久| www.亚洲人| 国产一区在线观看视频| 亚洲与欧洲av电影| 中文字幕在线一区| 日韩欧美一区二区视频| 在线视频欧美精品| www.欧美.com| 国产精品一区久久久久| 男人的j进女人的j一区| 一区二区三区四区五区视频在线观看 | 国产一区美女在线| 日韩国产高清在线| 亚洲精品视频免费看| 亚洲国产精品高清| 久久午夜羞羞影院免费观看| 欧美久久久久久久久久| 色一情一伦一子一伦一区| 国产福利一区在线| 国内成人免费视频| 蜜臂av日日欢夜夜爽一区| 亚洲成精国产精品女| 亚洲欧美一区二区三区久本道91 | 日本麻豆一区二区三区视频| 亚洲精品中文在线影院| 亚洲欧洲成人av每日更新| 国产欧美日产一区| 久久网这里都是精品| 日韩一区二区在线看片| 欧美一卡2卡3卡4卡| 欧美日韩国产成人在线免费| 在线精品视频免费播放| 色婷婷综合久久| 日本电影欧美片| 色婷婷综合在线| 91国产福利在线| 欧美日韩一二三区| 6080国产精品一区二区| 欧美精品三级日韩久久| 日韩一区国产二区欧美三区| 日韩视频免费直播| 欧美一级淫片007| 精品噜噜噜噜久久久久久久久试看 | 久久精品在线免费观看| www久久久久| 国产片一区二区| 中文字幕中文乱码欧美一区二区| 国产精品免费视频观看| 成人免费一区二区三区在线观看| 综合激情网...| 一区av在线播放| 日本中文字幕一区| 狠狠色综合播放一区二区| 国产成人精品网址| 97精品超碰一区二区三区| 欧美性极品少妇| 91精品欧美福利在线观看| 欧美成人精品高清在线播放| 精品99一区二区三区| 亚洲国产成人自拍| 亚洲美女屁股眼交3| 天天综合日日夜夜精品| 久久成人精品无人区| 夫妻av一区二区| 欧美性猛交xxxxxx富婆| 亚洲精品一线二线三线 | 亚洲欧洲综合另类| 日韩1区2区3区| 国产福利不卡视频| 欧洲一区二区三区在线| 7777精品伊人久久久大香线蕉超级流畅 | 欧美一区三区四区| 国产视频亚洲色图| 亚洲一区二区三区在线看| 久久精品国产99国产精品| eeuss影院一区二区三区| 欧美美女直播网站| 中文字幕乱码日本亚洲一区二区| 亚洲精品大片www| 国产美女精品人人做人人爽| 色94色欧美sute亚洲线路一ni | 成人免费高清在线观看| 欧美色中文字幕| 国产欧美一区二区精品婷婷 | 日韩av中文字幕一区二区三区| 国产综合成人久久大片91| 91福利视频久久久久| 精品久久免费看| 亚洲一区二区高清| 盗摄精品av一区二区三区| 91精品国产综合久久精品图片| 欧美国产欧美综合| 免费观看日韩电影| 色88888久久久久久影院按摩| 26uuu精品一区二区| 亚洲国产一区二区三区| 丁香婷婷综合五月| 欧美成人精品高清在线播放| 亚洲午夜免费视频| 91在线精品一区二区| 精品久久久久久无| 日韩精品一二区| 欧美私模裸体表演在线观看| 国产精品福利av| 国产91在线观看丝袜| 欧美大肚乱孕交hd孕妇| 午夜伦理一区二区| 欧美吻胸吃奶大尺度电影 | 91国偷自产一区二区三区观看| 久久久久国产免费免费| 日本欧美一区二区三区| 91成人免费在线| 亚洲欧洲日韩一区二区三区| 国产99精品国产| 久久久久久电影| 国产乱国产乱300精品| 欧美tickling网站挠脚心| 日韩av中文字幕一区二区| 欧美日韩成人高清| 亚洲高清不卡在线| 欧美视频三区在线播放| 亚洲一区二区三区在线| 欧美性一级生活| 天堂资源在线中文精品| 欧美三区在线视频| 亚洲成人午夜电影| 欧美视频精品在线| 七七婷婷婷婷精品国产| 91精品一区二区三区在线观看| 日本亚洲最大的色成网站www| 欧美日韩不卡一区二区| 日本不卡免费在线视频| 日韩一级免费观看| 精品一区二区三区视频| 久久综合视频网| 成人av网站在线观看免费| 国产精品麻豆99久久久久久| 色哟哟国产精品| 午夜精品一区二区三区免费视频 | 国产亚洲精品bt天堂精选| 国产老女人精品毛片久久| 中文字幕精品—区二区四季| 成人免费高清在线观看| 亚洲伦理在线精品| 欧美日韩免费高清一区色橹橹 | 成人免费看黄yyy456| 亚洲精选视频在线| 欧美精品免费视频| 精品一区二区三区久久| 国产亚洲欧美在线| 99久久免费精品| 午夜国产不卡在线观看视频| 日韩精品一区二区三区在线 | 高清在线观看日韩| 亚洲精品中文字幕乱码三区 | 精品欧美一区二区在线观看| 国产精品123| 亚洲精选视频免费看| 51精品秘密在线观看| 国产麻豆精品95视频|