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

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

?? cgi.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? 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);

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

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

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;
}
/*-----------------------------------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品情趣| 天堂av在线一区| 精品嫩草影院久久| 欧美精品乱码久久久久久| 欧美视频日韩视频在线观看| 色哟哟一区二区| 91欧美一区二区| 91免费版在线看| 欧美色中文字幕| 欧美日韩成人一区| 日韩精品一区二区三区swag| 欧美成va人片在线观看| 精品人在线二区三区| 久久久久久久综合色一本| 久久久精品一品道一区| 国产精品午夜在线| 国产精品不卡视频| 依依成人精品视频| 免费视频一区二区| 国产伦精品一区二区三区视频青涩| 国产精品一区二区黑丝| 波多野结衣在线一区| 日本道色综合久久| 91精品国产欧美一区二区成人| 精品欧美一区二区在线观看| 久久九九久精品国产免费直播| 国产精品视频九色porn| 亚洲毛片av在线| 另类综合日韩欧美亚洲| 国产69精品久久久久777| 91蝌蚪国产九色| 日韩欧美亚洲国产另类| 中日韩免费视频中文字幕| 亚洲国产一区视频| 99久久国产综合色|国产精品| 日本韩国欧美在线| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲国产电影在线观看| 婷婷久久综合九色综合绿巨人| 国产在线播放一区二区三区| 日本精品一级二级| 精品国产乱码久久久久久老虎 | 欧美日韩国产一区| 久久久久久久久久美女| 亚洲一区二区高清| 成人免费毛片app| 日韩一区二区三区电影在线观看| 中文无字幕一区二区三区 | 久久婷婷国产综合精品青草| 亚洲精品写真福利| 国产高清精品久久久久| 欧美精品粉嫩高潮一区二区| 国产精品成人一区二区艾草| 久久丁香综合五月国产三级网站| 91色乱码一区二区三区| 久久综合网色—综合色88| 亚洲第一成年网| 91天堂素人约啪| 国产精品色噜噜| 国产伦精品一区二区三区在线观看| 欧美人妖巨大在线| 亚洲男同性视频| 99久久精品免费看国产免费软件| 精品日韩在线观看| 人人狠狠综合久久亚洲| 欧美视频三区在线播放| 亚洲天堂2014| 成人免费视频caoporn| 久久综合久久99| 日本不卡123| 欧美一区二区观看视频| 日韩中文字幕不卡| 欧美电影一区二区三区| 韩国三级电影一区二区| 91精品国产欧美一区二区18| 日韩在线观看一区二区| 欧美日韩日日骚| 午夜精品久久久久久久| 欧美日精品一区视频| 午夜激情综合网| 欧美精品xxxxbbbb| 日韩—二三区免费观看av| 欧美一区二区免费视频| 久久99精品国产麻豆不卡| 欧美电影免费提供在线观看| 久久爱另类一区二区小说| 久久蜜桃av一区精品变态类天堂 | 国产欧美综合色| 成人高清视频免费观看| 亚洲美女视频在线| 欧美另类videos死尸| 麻豆成人久久精品二区三区红| 日韩精品综合一本久道在线视频| 国产在线日韩欧美| 国产免费观看久久| 91蝌蚪porny九色| 日韩成人一区二区| 久久久久久免费| 色婷婷一区二区| 日韩福利视频网| 国产网站一区二区三区| 91免费看`日韩一区二区| 亚洲成人免费观看| 久久综合九色综合久久久精品综合| 国产成人精品三级麻豆| 亚洲欧美一区二区不卡| 欧美一区二区美女| av亚洲精华国产精华| 五月综合激情网| 久久精品视频网| 日本高清不卡aⅴ免费网站| 另类欧美日韩国产在线| 国产精品美女一区二区| 欧美区视频在线观看| 国产精品66部| 丝袜美腿亚洲一区二区图片| 国产日产精品一区| 欧美日韩精品二区第二页| 国产成人综合在线| 丝袜美腿亚洲色图| 国产精品成人免费在线| 欧美mv日韩mv亚洲| 欧美日韩一区二区三区视频| 国产成人av一区二区| 日韩中文欧美在线| 日韩成人午夜精品| 亚洲欧美日韩一区二区三区在线观看| 51精品视频一区二区三区| 91丨国产丨九色丨pron| 极品少妇xxxx精品少妇偷拍| 一区二区三区高清在线| 亚洲国产岛国毛片在线| 日韩三级高清在线| 欧美日韩激情一区二区| 97se狠狠狠综合亚洲狠狠| 国产精品18久久久久久久久| 日韩黄色免费电影| 亚洲福利一区二区三区| 国产精品久久久久影院色老大| 精品国产伦理网| 日韩免费高清av| 91精品国产综合久久久久久久久久 | 综合激情成人伊人| 亚洲国产高清aⅴ视频| 久久久久久久久岛国免费| 6080日韩午夜伦伦午夜伦| 欧美日韩一区二区在线观看视频| caoporn国产精品| 懂色av中文字幕一区二区三区| 国产一区二区三区蝌蚪| 久久精品久久综合| 久久99久久99精品免视看婷婷 | 欧美sm极限捆绑bd| 欧美大度的电影原声| 精品日韩99亚洲| 精品播放一区二区| 国产视频不卡一区| 国产精品你懂的在线| 中文字幕中文字幕中文字幕亚洲无线| 欧美激情一区二区在线| 国产三区在线成人av| 一区二区三区中文字幕精品精品| 久久精品一区二区三区不卡 | 成人动漫精品一区二区| 北条麻妃一区二区三区| 91丝袜国产在线播放| 欧美私模裸体表演在线观看| 欧美日本在线播放| 精品国产免费视频| 国产精品久久久久三级| 亚洲色图制服丝袜| 亚洲va欧美va人人爽午夜| 青娱乐精品在线视频| 国产精品影音先锋| 一本色道**综合亚洲精品蜜桃冫| 91久久精品日日躁夜夜躁欧美| 欧美午夜精品免费| 日韩一区二区不卡| 日本一区二区综合亚洲| 亚洲摸摸操操av| 日韩高清在线电影| 粉嫩蜜臀av国产精品网站| 色综合天天综合色综合av | 一本色道久久综合精品竹菊| 欧美精品tushy高清| 欧美不卡在线视频| 亚洲乱码国产乱码精品精98午夜| 亚洲自拍偷拍图区| 国产一区二区三区最好精华液| 成人免费黄色大片| 91麻豆精品国产91久久久使用方法 | 久久精品国产久精国产爱| 成人小视频免费在线观看| 欧美色视频在线| 国产欧美一区二区精品婷婷| 亚洲午夜在线电影| 成人高清在线视频| 一色桃子久久精品亚洲| 午夜精品久久久| 9i看片成人免费高清|