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

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

?? cgi.c

?? IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR
?? C
字號:
/**
 * \addtogroup httpd
 * @{
 */

/**
 * \file
 * HTTP server script language C functions file.
 * \author Adam Dunkels <adam@dunkels.com>
 *
 * This file contains functions that are called by the web server
 * scripts. The functions takes one argument, and the return value is
 * interpreted as follows. A zero means that the function did not
 * complete and should be invoked for the next packet as well. A
 * non-zero value indicates that the function has completed and that
 * the web server should move along to the next script line.
 *
 */

/*
 * Copyright (c) 2001, Adam Dunkels.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote
 *    products derived from this software without specific prior
 *    written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This file is part of the uIP TCP/IP stack.
 *
 * $Id: cgi.c,v 1.23.2.4 2003/10/07 13:22:27 adam Exp $
 *
 */

#include "uip.h"
#include "cgi.h"
#include "httpd.h"
#include "fs.h"

#include <stdio.h>
#include <string.h>

static u8_t print_stats(u8_t next);
static u8_t file_stats(u8_t next);
static u8_t tcp_stats(u8_t next);
static u8_t rtos_stats(u8_t next);

cgifunction cgitab[] = {
  print_stats,   /* CGI function "a" */
  file_stats,    /* CGI function "b" */
  tcp_stats,     /* CGI function "c" */
  rtos_stats	 /* CGI function "d" */
};

static const char closed[]      = {0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0};                              /*  "CLOSED",*/
static const char syn_rcvd[]    = {0x53, 0x59, 0x4e, 0x2d, 0x52, 0x43, 0x56,0x44,  0};                  /*  "SYN-RCVD",*/
static const char syn_sent[]    = {0x53, 0x59, 0x4e, 0x2d, 0x53, 0x45, 0x4e,0x54,  0};                  /*  "SYN-SENT",*/
static const char established[] = {0x45, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x49,0x53, 0x48, 0x45, 0x44, 0}; /*  "ESTABLISHED",*/
static const char fin_wait_1[]  = {0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49,0x54, 0x2d, 0x31, 0};       /*  "FIN-WAIT-1",*/
static const char fin_wait_2[]  = {0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49,0x54, 0x2d, 0x32, 0};       /*  "FIN-WAIT-2",*/
static const char closing[]     = {0x43, 0x4c, 0x4f, 0x53, 0x49,0x4e, 0x47, 0};                         /*  "CLOSING",*/
static const char time_wait[]   = {0x54, 0x49, 0x4d, 0x45, 0x2d, 0x57, 0x41,0x49, 0x54, 0};             /*  "TIME-WAIT,"*/
static const char last_ack[]    = {0x4c, 0x41, 0x53, 0x54, 0x2d, 0x41, 0x43,0x4b, 0};                   /*  "LAST-ACK"*/

static const char *states[] = { closed,syn_rcvd,syn_sent,established,fin_wait_1,fin_wait_2,closing,time_wait,last_ack};

/*-----------------------------------------------------------------------------------*/
/* print_stats:
 *
 * Prints out a part of the uIP statistics. The statistics data is
 * written into the uip_appdata buffer. It overwrites any incoming
 * packet.
 */
static u8_t print_stats(u8_t next)
{
#if UIP_STATISTICS
    u16_t i, j;
    u8_t *buf;
    u16_t *databytes;

  if(next) {
            /* If our last data has been acknowledged, we move on the next
                chunk of statistics. */
             hs->count = hs->count + 4;
             if(hs->count >= sizeof(struct uip_stats)/sizeof(u16_t)) {
                                      /* We have printed out all statistics, so we return 1 to
                                	 indicate that we are done. */
                                          return 1;
            }
  }

  /* Write part of the statistics into the uip_appdata buffer. */
  databytes = (u16_t *)&uip_stat + hs->count;
  buf       = (u8_t *)uip_appdata;
  j = 4 + 1;
  i = hs->count;
  while (i < sizeof(struct uip_stats)/sizeof(u16_t) && --j > 0) {
                        sprintf((char *)buf, "%5u\r\n", *databytes);
                        ++databytes;
                        buf += 6;
                        ++i;
  }
  /* Send the data. */
  uip_send(uip_appdata, buf - uip_appdata);
  return 0;
#else
  return 1;
#endif /* UIP_STATISTICS */
}
/*-----------------------------------------------------------------------------------*/
static u8_t file_stats(u8_t next)
{
  /* We use sprintf() to print the number of file accesses to a
     particular file (given as an argument to the function in the
     script). We then use uip_send() to actually send the data. */
  if(next) {
    return 1;
  }
  uip_send(uip_appdata, sprintf((char *)uip_appdata, "%5u", fs_count(&hs->script[4])));
  return 0;
}
/*-----------------------------------------------------------------------------------*/
static u8_t tcp_stats(u8_t next)
{
  struct uip_conn *conn;
  if(next) {
          /* If the previously sent data has been acknowledged, we move
           forward one connection. */
          if(++hs->count == UIP_CONNS) {
                    /* If all connections has been printed out, we are done and
                       return 1. */
          return 1;
          }
  }

  conn = &uip_conns[hs->count];
  if((conn->tcpstateflags & TS_MASK) == CLOSED) {
    uip_send(uip_appdata, sprintf((char *)uip_appdata,
				  "<tr align=\"center\"><td>-</td><td>-</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
				  conn->nrtx,
				  conn->timer,
				  (uip_outstanding(conn))? '*':' ',
    				  (uip_stopped(conn))? '!':' '));
  } else {
    uip_send(uip_appdata, sprintf((char *)uip_appdata,
				  "<tr align=\"center\"><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
				  htons(conn->ripaddr[0]) >> 8,
				  htons(conn->ripaddr[0]) & 0xff,
				  htons(conn->ripaddr[1]) >> 8,
				  htons(conn->ripaddr[1]) & 0xff,
				  htons(conn->rport),
				  states[conn->tcpstateflags & TS_MASK],
				  conn->nrtx,
				  conn->timer,
				  (uip_outstanding(conn))? '*':' ',
    				  (uip_stopped(conn))? '!':' '));
  }
  return 0;
}
/*-----------------------------------------------------------------------------------*/

static u8_t rtos_stats(u8_t next)
{
  static char cTraceBuffer[ 1024 ];
  extern void ( vTaskList )( char * );
  
  vTaskList( cTraceBuffer );
  uip_send( ( void * ) cTraceBuffer, strlen( cTraceBuffer ) );
  return 1;
}
/*-----------------------------------------------------------------------------------*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美欧美欧美欧美首页| 99精品1区2区| 欧美一区二区三区视频在线观看| 亚洲一区日韩精品中文字幕| 一本大道av伊人久久综合| 亚洲女同一区二区| 欧美日韩视频不卡| 日韩电影在线免费观看| 欧美一区二区三区白人| 国产一区二区美女| 国产精品网站在线播放| 91丨九色丨黑人外教| 香蕉乱码成人久久天堂爱免费| 666欧美在线视频| 国产真实精品久久二三区| 久久精品在这里| 99久精品国产| 亚洲成人综合在线| 精品捆绑美女sm三区| 高清不卡一二三区| 亚洲小说春色综合另类电影| 日韩欧美一区二区免费| 国产成人午夜片在线观看高清观看| 国产精品护士白丝一区av| 欧美日韩免费观看一区二区三区| 毛片av一区二区| 国产精品国产三级国产专播品爱网 | 国产欧美一区二区精品婷婷| 91亚洲国产成人精品一区二三 | 欧美午夜片在线观看| 日韩电影免费在线看| 亚洲国产精品成人综合| 欧美日韩国产系列| 国产精品自在欧美一区| 亚洲精品乱码久久久久久| 日韩一级免费一区| 色综合天天综合网国产成人综合天| 午夜精品免费在线| 欧美国产丝袜视频| 91精品国产欧美一区二区18| 波多野结衣视频一区| 奇米色777欧美一区二区| 最近中文字幕一区二区三区| 欧美一级久久久| 色综合亚洲欧洲| 成熟亚洲日本毛茸茸凸凹| 青青青爽久久午夜综合久久午夜| 亚洲欧美在线观看| 久久新电视剧免费观看| 欧美一区国产二区| 色综合久久久网| 国产99久久精品| 韩国中文字幕2020精品| 日韩电影在线一区| 亚洲国产精品视频| 亚洲蜜臀av乱码久久精品| 欧美国产精品中文字幕| 日韩免费电影网站| 欧美高清视频一二三区 | 国产精品家庭影院| 精品福利av导航| 欧美一区二区三区系列电影| 欧美色网站导航| 日本高清免费不卡视频| 99re热视频精品| 91一区在线观看| 成人免费毛片app| 成人一区二区三区中文字幕| 韩国精品主播一区二区在线观看 | 2022国产精品视频| 欧美一区二区免费观在线| 欧美日韩一级片在线观看| 欧美性做爰猛烈叫床潮| 在线观看一区日韩| 欧美视频在线观看一区| 欧美自拍偷拍一区| 91福利小视频| 一本一道久久a久久精品综合蜜臀| 成人99免费视频| 91啪在线观看| 91麻豆免费看| 欧洲精品一区二区| 欧美性一级生活| 欧美日韩视频在线第一区| 欧美日韩电影在线播放| 欧美日韩国产综合一区二区三区| 欧美亚洲动漫精品| 欧美老肥妇做.爰bbww| 欧美老人xxxx18| 欧美成人乱码一区二区三区| 欧美一区二区私人影院日本| 欧美一级一区二区| 久久久久久9999| **欧美大码日韩| 亚洲图片一区二区| 日韩av高清在线观看| 国内偷窥港台综合视频在线播放| 国产一区二三区好的| 成人性色生活片| 91成人国产精品| 欧美一区二区三区啪啪| 国产亚洲午夜高清国产拍精品| 国产精品美女久久久久高潮| 亚洲一区二区精品视频| 麻豆专区一区二区三区四区五区| 国产精品一区二区免费不卡| 99久久99久久精品免费看蜜桃| 欧美日韩三级在线| 国产喷白浆一区二区三区| 亚洲欧美另类在线| 免费在线观看不卡| 成人午夜碰碰视频| 欧美人xxxx| 中文字幕日韩欧美一区二区三区| 亚洲国产日韩精品| 国产91在线看| 3d成人动漫网站| 国产精品乱码一区二区三区软件 | 亚洲色欲色欲www| 日韩二区在线观看| 不卡一区二区三区四区| 91精品国产色综合久久久蜜香臀| 欧美高清一级片在线观看| 肉丝袜脚交视频一区二区| 成人精品在线视频观看| 日韩一区二区精品在线观看| 综合色中文字幕| 国产一区二区视频在线播放| 欧美日韩情趣电影| 成人免费一区二区三区在线观看 | 亚洲欧美日韩国产综合| 精品一区二区免费看| 欧美性高清videossexo| 国产无人区一区二区三区| 亚洲www啪成人一区二区麻豆| 不卡av在线免费观看| 精品精品国产高清一毛片一天堂| 亚洲高清免费一级二级三级| 国产99久久久国产精品潘金网站| 欧美一级二级三级乱码| 一区二区三区免费观看| 国产成人在线看| 久久综合色天天久久综合图片| 丝袜国产日韩另类美女| 色哟哟日韩精品| 最新中文字幕一区二区三区 | 亚洲国产精品久久久男人的天堂| 成人一区二区在线观看| 久久综合精品国产一区二区三区 | 国产欧美日韩精品一区| 久草这里只有精品视频| 666欧美在线视频| 五月天一区二区三区| 在线国产电影不卡| 亚洲精品国产视频| 99在线视频精品| 国产精品美女久久福利网站| 国产高清久久久久| 国产欧美一二三区| 国产乱码字幕精品高清av| 日韩欧美一二三四区| 免费av网站大全久久| 在线不卡中文字幕播放| 婷婷久久综合九色综合绿巨人| 91久久久免费一区二区| 亚洲激情av在线| 色婷婷亚洲婷婷| 亚洲国产中文字幕在线视频综合| 在线观看亚洲专区| 亚洲精品va在线观看| 在线观看日韩精品| 一二三区精品福利视频| 欧美三级资源在线| 亚洲国产日韩综合久久精品| 欧美丰满少妇xxxxx高潮对白| 五月天精品一区二区三区| 欧美日韩一区在线| 日韩成人午夜电影| 精品黑人一区二区三区久久| 国产精品亚洲专一区二区三区| 国产欧美日韩久久| 99vv1com这只有精品| 亚洲精品美腿丝袜| 欧美一区二区三区色| 国产在线视频精品一区| 国产精品伦一区二区三级视频| 91啦中文在线观看| 亚洲h在线观看| 精品裸体舞一区二区三区| 丁香另类激情小说| 亚洲精品综合在线| 欧美日韩激情一区| 国产一区二区91| 亚洲免费观看高清完整版在线观看熊| 在线看国产日韩| 久久99九九99精品| 亚洲免费看黄网站| 日韩欧美在线1卡| 99国产精品国产精品久久| 日韩成人免费在线|