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

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

?? cgi.c

?? 最新版FreeRTOS, 包擴多種開發平臺的移植
?? 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[] =   /*  "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;
}
/*-----------------------------------------------------------------------------------*/

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线看| 成人深夜在线观看| 成人一二三区视频| 欧美日韩日本视频| 日本一区二区三区视频视频| 午夜久久久久久| 一本色道久久综合亚洲aⅴ蜜桃 | 国产综合久久久久久鬼色| 99久久精品一区| 久久久亚洲精品一区二区三区| 亚洲成a人片在线不卡一二三区 | 国产日韩v精品一区二区| 天堂午夜影视日韩欧美一区二区| 成人看片黄a免费看在线| 精品国产髙清在线看国产毛片| 一区二区三区在线观看国产| 国产夫妻精品视频| 欧美xxx久久| 日韩电影免费在线看| 欧美三级三级三级爽爽爽| 综合久久给合久久狠狠狠97色| 国产福利一区二区三区视频 | 一区二区三区欧美| 99国产欧美久久久精品| 中文字幕免费不卡| 国产超碰在线一区| 国产亚洲视频系列| 国产成人综合视频| 久久精品无码一区二区三区| 国产一区二区精品久久91| 日韩视频免费观看高清完整版在线观看 | 日本高清不卡视频| 亚洲精品免费播放| 99久久精品费精品国产一区二区| 国产精品久久三区| 99国产精品99久久久久久| 国产精品另类一区| 99久久免费精品高清特色大片| 国产精品伦理在线| 91精彩视频在线观看| 亚洲一区二区在线免费观看视频| jizz一区二区| 一区二区三区精品| 欧美日本不卡视频| 九色|91porny| 久久久久国产精品人| 成人丝袜视频网| 亚洲乱码中文字幕| 欧美片在线播放| 日本欧美一区二区| 久久精品视频免费观看| www.日韩av| 一区二区理论电影在线观看| 欧美二区三区91| 国产一区激情在线| 亚洲视频在线一区| 欧美精品一卡两卡| 激情五月婷婷综合| 亚洲视频综合在线| 欧美一卡二卡三卡| 成人爱爱电影网址| 亚洲h精品动漫在线观看| 精品国产不卡一区二区三区| 成人app软件下载大全免费| 亚洲一区免费观看| 久久久久久久久久电影| 91丨porny丨户外露出| 午夜精品久久久久久久| 精品对白一区国产伦| 99re这里都是精品| 美国三级日本三级久久99| 欧美激情在线免费观看| 欧美日韩成人高清| 成人av网站在线观看| 午夜欧美电影在线观看| 国产日产欧产精品推荐色| 欧美军同video69gay| 国产成人综合网站| 日韩电影在线观看网站| 中文字幕一区二区在线播放| 日韩区在线观看| 91久久精品一区二区二区| 精品亚洲成a人| 亚洲成av人片在线观看| 中文字幕一区二区三区不卡在线| 日韩欧美中文字幕精品| 日本高清不卡在线观看| 成人免费黄色大片| 国模套图日韩精品一区二区| 亚洲一区在线播放| 亚洲人成小说网站色在线 | |精品福利一区二区三区| 337p日本欧洲亚洲大胆精品| 欧美巨大另类极品videosbest | 亚洲美腿欧美偷拍| 国产精品欧美一级免费| 久久精品人人做人人综合| 欧美一区二区三区在线电影 | 三级在线观看一区二区| 伊人一区二区三区| 国产精品色在线观看| 久久夜色精品一区| 精品国产不卡一区二区三区| 欧美一区二区三区日韩视频| 欧美日韩一级片在线观看| 91色在线porny| 丁香一区二区三区| 国产精品99久久久久久久女警| 男女视频一区二区| 天天综合天天综合色| 午夜精品久久久久久久99水蜜桃| 亚洲一区在线视频观看| 亚洲主播在线播放| 亚洲a一区二区| 日韩精品一二三| 日本不卡免费在线视频| 日产精品久久久久久久性色| 三级精品在线观看| 日韩精品1区2区3区| 热久久一区二区| 免费观看30秒视频久久| 国内成人自拍视频| 国产精品一级二级三级| 粉嫩一区二区三区性色av| 成人精品免费看| 99久久er热在这里只有精品15| 日本韩国精品在线| 7777精品伊人久久久大香线蕉的 | 欧美在线观看视频一区二区三区| 色噜噜狠狠一区二区三区果冻| 91国内精品野花午夜精品| 欧美美女bb生活片| 337p粉嫩大胆噜噜噜噜噜91av| 欧美精彩视频一区二区三区| 最新国产成人在线观看| 亚洲bt欧美bt精品| 国产综合久久久久久鬼色| 成人99免费视频| 欧美性大战xxxxx久久久| 日韩精品专区在线| 国产精品欧美一区喷水| 亚洲一本大道在线| 久久精品国产77777蜜臀| 不卡在线观看av| 欧美日韩精品欧美日韩精品| 精品国产一区二区三区av性色| 中文字幕第一页久久| 午夜精品成人在线| 国产精品资源网| 欧美日韩精品免费| 久久久久久久综合| 亚洲电影欧美电影有声小说| 韩国三级电影一区二区| 色综合久久综合中文综合网| 欧美一区二区三区精品| 国产精品久久福利| 免费观看30秒视频久久| 成人app下载| 精品日本一线二线三线不卡| 亚洲另类春色国产| 狠狠色丁香九九婷婷综合五月| 91视频国产观看| 2024国产精品视频| 天堂影院一区二区| av高清久久久| 欧美精品一区二区在线播放| 一区二区三区 在线观看视频| 国产福利精品一区| 欧美一区二区播放| 亚洲欧美另类综合偷拍| 国产精品综合在线视频| 制服.丝袜.亚洲.另类.中文| 伊人一区二区三区| 不卡一卡二卡三乱码免费网站| 日韩欧美一区在线观看| 亚洲亚洲人成综合网络| 91丨porny丨中文| 国产欧美日韩在线观看| 六月丁香综合在线视频| 在线亚洲一区二区| 日韩一区欧美小说| 风间由美性色一区二区三区| 欧美tk丨vk视频| 美女视频黄 久久| 欧美色综合网站| 亚洲天堂2014| 色综合天天综合网国产成人综合天 | 狠狠色丁香九九婷婷综合五月| 欧美老女人在线| 亚洲自拍偷拍综合| 在线观看国产日韩| 亚洲人妖av一区二区| 成人一二三区视频| 欧美国产禁国产网站cc| 国产精品一区免费视频| 久久精品视频免费| 国产成人av电影免费在线观看| 久久精品免视看| 国产一区二区看久久| 国产亚洲一区字幕|