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

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

?? ftstat.c

?? netflow,抓包
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * Copyright (c) 2002 Mark Fullmer and The Ohio State University * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. * *      $Id: ftstat.c,v 1.36 2003/04/04 02:26:20 maf Exp $ */#include "ftconfig.h"#include "ftlib.h"#include <sys/time.h>#include <sys/types.h>#include <sys/wait.h>#include <sys/uio.h>#include <sys/socket.h>#include <sys/resource.h>#include <netinet/in.h>#include <arpa/inet.h>#include <sys/stat.h>#include <ctype.h>#include <stddef.h>#include <syslog.h>#include <dirent.h>#include <limits.h>#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <time.h>#include <fcntl.h>#include <zlib.h>#if HAVE_STRINGS_H #include <strings.h>#endif#if HAVE_STRING_H  #include <string.h>#endif#if !HAVE_STRSEP  char    *strsep (char **, const char *);#endif#if HAVE_LL_STRTOUL  #define strtoull strtoul#endif /* HAVE_LL_STRTOULL */#define FMT_SYM_LEN 64/* * ****  Datastructures and other implementation notes  *** * * Each report requires * *   struct ftstat_rpt_n which is allocated dynamically at run time. *   *   ftstat_rpt_n_new() -   allocated ftstat_rpt_n *   ftstat_rpt_n_accum() - called for each flow *   ftstat_rpt_n_calc()  - final calculations after all flows *   ftstat_rpt_n_dump()  - report to file *   ftstat_rpt_n_free()  - free storage allocated by ftstat_rpt_n_new() *     and others during the report run. * * The reports are grouped by a definition.  Typically the caller will * invoke all reports in a group by calling ftstat_def_new(), * ftstat_def_accum(), ftstat_def_calc(), ftstat_def_dump(), and * ftstat_def_free(). * * The reports in the configuration file are stored in a linked * list of ftstat_rpt with the head in struct ftstat. * * The definitions in the configuration file are stored in a linked * list of ftstat_def with the head in struct ftstat. * * Each definition contains a linked list of ftstat_rpt_item * which points to a report (struct ftstat_rpt). * * Definitions reference reports.  Initially the report name is stored * in the definition and then when EOF is reached resolve_reports() * is called to fill in the pointers. * * The config file can reference a filter file and a tag file.  These * are loaded when the first tag or filter is specified. * * Each report can have a filter and a definition can have a filter * for all the reports.  Configuration of both is allowed. * * Each definition can invoke a tag definition. (add tags) * * Each definition can invoke a mask definition. (replace masks) * * Each report type is defined by the enum ftstat_rpt_type * and then the struct typelookup (tlookup) is used to configure * all the other report specific data items such as its ASCII * name, fields required, function pointers to the report specific * functions, options supported, etc. * * Special note for the *ps (ie min_pps, max_pps, avg_pps, min_bps, *  max_bps, avg_bps) calculations.  A memory optimization exists that *  removes the sizeof struct ftps bytes from the end of all the hash *  and bucket allocations (for bucket, they're not allocated).  This *  means that struct _must_ exist or the subtraction bytes will end *  up trashing real data.  An example is ftchash_rec_int where the *  ftps would never be used, yet it's there so the code that subtracts *  it off works properly. * */static struct fts3rec_offsets nfo;static u_int64 *sort_i64;static double *sort_idouble;#define DUMP_STD_OUT()\if (rpt->out->fields & FT_STAT_FIELD_INDEX) {\  len += fmt_uint64(fmt_buf, rpt->idx++, FMT_JUST_LEFT);\  comma = 1;\}\if (rpt->out->fields & FT_STAT_FIELD_FIRST) {\  if (comma) fmt_buf[len++] = ',';\  len += fmt_uint32(fmt_buf+len, rpt->time_start, FMT_JUST_LEFT);\  comma = 1;\}\if (rpt->out->fields & FT_STAT_FIELD_LAST) {\  if (comma) fmt_buf[len++] = ',';\  len += fmt_uint32(fmt_buf+len, rpt->time_end, FMT_JUST_LEFT);\  comma = 1;\}\#define CHASH_DUMP_INIT(A,B)\  struct A *B;\  struct tally tally;\  char fmt_buf1[32], fmt_buf[1024];\  int len, fmt, sort_flags, sort_offset, comma;\  fmt = FMT_JUST_LEFT;\  fmt_buf1[0] = fmt_buf[0] = 0;\  bzero(&tally, sizeof tally);\  tally.t_recs = ftch->entries;\  if (rpt->out->options & FT_STAT_OPT_NAMES)\    fmt |= FMT_SYM;\#define CHASH_DUMP_STD_SORT(A) \    if (rpt->out->sort_field == FT_STAT_FIELD_FLOWS) {\      sort_offset = offsetof(struct A, nflows);\      sort_flags |= FT_CHASH_SORT_64;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_OCTETS) {\      sort_offset = offsetof(struct A, noctets);\      sort_flags |= FT_CHASH_SORT_64;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_PACKETS) {\      sort_offset = offsetof(struct A, npackets);\      sort_flags |= FT_CHASH_SORT_64;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_DURATION) {\      sort_offset = offsetof(struct A, etime);\      sort_flags |= FT_CHASH_SORT_64;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_AVG_PPS) {\      sort_offset = offsetof(struct A, ps.avg_pps);\      sort_flags |= FT_CHASH_SORT_DOUBLE;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_MIN_PPS) {\      sort_offset = offsetof(struct A, ps.min_pps);\      sort_flags |= FT_CHASH_SORT_DOUBLE;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_MAX_PPS) {\      sort_offset = offsetof(struct A, ps.max_pps);\      sort_flags |= FT_CHASH_SORT_DOUBLE;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_AVG_BPS) {\      sort_offset = offsetof(struct A, ps.avg_bps);\      sort_flags |= FT_CHASH_SORT_DOUBLE;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_MIN_BPS) {\      sort_offset = offsetof(struct A, ps.min_bps);\      sort_flags |= FT_CHASH_SORT_DOUBLE;\    } else if (rpt->out->sort_field == FT_STAT_FIELD_MAX_BPS) {\      sort_offset = offsetof(struct A, ps.max_bps);\      sort_flags |= FT_CHASH_SORT_DOUBLE;\    } else {\      fterr_errx(1,"chash_xxx_dump(): internal error");\    }#define CHASH_STD_OUT(A,B)\      if ((rpt->out->options & FT_STAT_OPT_TALLY) && tally.rt_recs &&\        (!(tally.rt_recs % rpt->out->tally))) {\        if (rpt->all_fields & FT_STAT_FIELD_PS)\          fprintf(fp, "#TALLY %%recs=%3.3f %%flows=%3.3f %%octets=%3.3f %%packets=%3.3f %%avg-bps=%3.3f %%avg-pps=%3.3f\n",\            ((double)tally.rt_recs/(double)tally.t_recs)*100,\            ((double)tally.rt_flows/(double)rpt->t_flows)*100,\            ((double)tally.rt_octets/(double)rpt->t_octets)*100,\            ((double)tally.rt_packets/(double)rpt->t_packets)*100,\            (((double)tally.ravg_bps/(double)tally.rt_frecs)/\              (double)rpt->avg_bps)*100,\            (((double)tally.ravg_pps/(double)tally.rt_frecs)/\              (double)rpt->avg_pps)*100);\         else\          fprintf(fp, "#TALLY %%recs=%3.3f %%flows=%3.3f %%octets=%3.3f %%packets=%3.3f\n",\            ((double)tally.rt_recs/(double)tally.t_recs)*100,\            ((double)tally.rt_flows/(double)rpt->t_flows)*100,\            ((double)tally.rt_octets/(double)rpt->t_octets)*100,\            ((double)tally.rt_packets/(double)rpt->t_packets)*100);\\      } /* tally */\      tally.rt_flows += A->nflows;\      tally.rt_octets += A->noctets;\      tally.rt_packets += A->npackets;\      tally.rt_recs ++;\      tally.rt_frecs += A->nrecs;\      if (rpt->all_fields & FT_STAT_FIELD_PS) {\        tally.ravg_bps += A->ps.avg_bps * A->nrecs;\        tally.ravg_pps += A->ps.avg_pps * A->nrecs;\      }\\    if (rpt->out->fields & FT_STAT_FIELD_FLOWS) {\      if (B) fmt_buf[len++] = ',';\      len += fmt_uint64(fmt_buf+len, A->nflows, FMT_JUST_LEFT);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_OCTETS) {\      if (comma) fmt_buf[len++] = ',';\      len += fmt_uint64(fmt_buf+len, A->noctets, FMT_JUST_LEFT);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_PACKETS) {\      if (comma) fmt_buf[len++] = ',';\      len += fmt_uint64(fmt_buf+len, A->npackets, FMT_JUST_LEFT);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_DURATION) {\      if (comma) fmt_buf[len++] = ',';\      len += fmt_uint64(fmt_buf+len, A->etime, FMT_JUST_LEFT);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_AVG_BPS) {\      if (comma) fmt_buf[len++] = ',';\      len += sprintf(fmt_buf+len, "%f", A->ps.avg_bps);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_MIN_BPS) {\      if (comma) fmt_buf[len++] = ',';\      len += sprintf(fmt_buf+len, "%f", A->ps.min_bps);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_MAX_BPS) {\      if (comma) fmt_buf[len++] = ',';\      len += sprintf(fmt_buf+len, "%f", A->ps.max_bps);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_AVG_PPS) {\      if (comma) fmt_buf[len++] = ',';\      len += sprintf(fmt_buf+len, "%f", A->ps.avg_pps);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_MIN_PPS) {\      if (comma) fmt_buf[len++] = ',';\      len += sprintf(fmt_buf+len, "%f", A->ps.min_pps);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_MAX_PPS) {\      if (comma) fmt_buf[len++] = ',';\      len += sprintf(fmt_buf+len, "%f", A->ps.max_pps);\      comma = 1;\    }\    if (rpt->out->fields & FT_STAT_FIELD_FRECS) {\      if (comma) fmt_buf[len++] = ',';\      len += fmt_uint64(fmt_buf+len, A->nrecs, FMT_JUST_LEFT);\      comma = 1;\    }\    fmt_buf[len++] = '\n';\    fmt_buf[len] = 0;\    fputs(fmt_buf, fp);\    if (rpt->out->records && (tally.rt_recs == rpt->out->records)) {\      fprintf(fp, "# stop, hit record limit.\n");\      break;\    }#define CHASH_STDP_OUT(A,B)\      if ((rpt->out->options & FT_STAT_OPT_TALLY) && tally.rt_recs &&\        (!(tally.rt_recs % rpt->out->tally))) {\        if (rpt->all_fields & FT_STAT_FIELD_PS)\          fprintf(fp, "#TALLY %%recs=%3.3f %%flows=%3.3f %%octets=%3.3f %%packets=%3.3f %%avg-bps=%3.3f %%avg-pps=%3.3f\n",\            ((double)tally.rt_recs/(double)tally.t_recs)*100,\            ((double)tally.rt_flows/(double)rpt->t_flows)*100,\            ((double)tally.rt_octets/(double)rpt->t_octets)*100,\            ((double)tally.rt_packets/(double)rpt->t_packets)*100,\            (((double)tally.ravg_bps/(double)tally.rt_frecs)/\              (double)rpt->avg_bps)*100,\            (((double)tally.ravg_pps/(double)tally.rt_frecs)/\              (double)rpt->avg_pps)*100);\         else\          fprintf(fp, "#TALLY %%recs=%3.3f %%flows=%3.3f %%octets=%3.3f %%packets=%3.3f\n",\            ((double)tally.rt_recs/(double)tally.t_recs)*100,\            ((double)tally.rt_flows/(double)rpt->t_flows)*100,\            ((double)tally.rt_octets/(double)rpt->t_octets)*100,\            ((double)tally.rt_packets/(double)rpt->t_packets)*100);\\      } /* tally */\      tally.rt_flows += A->nflows;\      tally.rt_octets += A->noctets;\      tally.rt_packets += A->npackets;\      tally.ravg_bps += A->ps.avg_bps * A->nrecs;\      tally.ravg_pps += A->ps.avg_pps * A->nrecs;\      tally.rt_recs ++;\      tally.rt_frecs += A->nrecs;\\  if (rpt->out->fields & FT_STAT_FIELD_FLOWS) {\    if (B) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->nflows / (double)rpt->t_flows)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_OCTETS) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->noctets / (double)rpt->t_octets)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_PACKETS) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->npackets / (double)rpt->t_packets)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_DURATION) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->etime / (double)rpt->t_duration)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_AVG_BPS) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->ps.avg_bps / (double)rpt->avg_bps)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_MIN_BPS) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->ps.min_bps / (double)rpt->min_bps)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_MAX_BPS) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->ps.max_bps / (double)rpt->max_bps)*100.0);\    comma = 1;\  }\  if (rpt->out->fields & FT_STAT_FIELD_AVG_PPS) {\    if (comma) fmt_buf[len++] = ',';\    len += sprintf(fmt_buf+len, "%f",\     ((double)A->ps.avg_pps / (double)rpt->avg_pps)*100.0);\    comma = 1;\  }\

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美精品午睡沙发| 国产黄人亚洲片| 欧美一级高清片| 久久蜜桃av一区精品变态类天堂| 亚洲成人黄色小说| 欧美电影影音先锋| 日本高清免费不卡视频| 色菇凉天天综合网| 中文无字幕一区二区三区| 国产精品一区二区久激情瑜伽 | 亚洲与欧洲av电影| 欧美巨大另类极品videosbest | 欧美草草影院在线视频| 精久久久久久久久久久| 亚洲欧洲99久久| 欧美人与禽zozo性伦| 高清不卡一区二区| 日韩高清一区在线| 自拍偷自拍亚洲精品播放| 日韩视频免费观看高清完整版 | 日产国产高清一区二区三区| 亚洲国产精品二十页| 欧美日韩国产a| 99久久精品免费精品国产| 久久99久久精品| 日韩成人午夜精品| 亚洲午夜久久久久| 亚洲日本一区二区| 国产精品无圣光一区二区| 欧美精品乱人伦久久久久久| 在线看不卡av| 色菇凉天天综合网| 在线视频中文字幕一区二区| 国产99久久久久久免费看农村| 日韩黄色小视频| 蜜桃视频在线观看一区| 日本亚洲视频在线| 青娱乐精品视频在线| 久久疯狂做爰流白浆xx| 韩国理伦片一区二区三区在线播放 | 亚洲欧洲成人自拍| 一区二区中文字幕在线| 中文字幕日韩欧美一区二区三区| 亚洲欧洲精品天堂一级| 一区二区三区国产精华| 亚洲一二三四区| 日本免费新一区视频| 韩国精品主播一区二区在线观看| 国产高清亚洲一区| 一本一道久久a久久精品| 精品视频免费看| 欧美一区二区播放| 欧美老肥妇做.爰bbww视频| 日韩一卡二卡三卡国产欧美| 国产欧美一区二区三区在线看蜜臀| 国产精品丝袜在线| 人人狠狠综合久久亚洲| 色婷婷精品大在线视频 | 欧美日韩久久久一区| 久久99深爱久久99精品| 国产一区二区三区精品视频| 在线观看网站黄不卡| 久久一留热品黄| 一区二区三区不卡在线观看 | 欧美一区二区三区在线观看| 久久久久久久久免费| 亚洲成人一二三| 91视频www| 国产蜜臀97一区二区三区| 日本免费在线视频不卡一不卡二| 色综合天天天天做夜夜夜夜做| 欧美xxx久久| 免费不卡在线视频| 欧美精品一级二级| 亚洲第一福利视频在线| 在线观看成人小视频| 亚洲天堂2016| 91在线观看高清| 亚洲日本乱码在线观看| 99re6这里只有精品视频在线观看| 久久青草欧美一区二区三区| 国产精品影视在线| 国产精品午夜在线观看| av爱爱亚洲一区| 一区二区三区四区中文字幕| 91麻豆精品视频| 亚洲精品国产品国语在线app| 欧美在线观看一二区| 日韩国产欧美一区二区三区| 91精品国产美女浴室洗澡无遮挡| 另类调教123区| 国产日本欧美一区二区| 色偷偷一区二区三区| 日韩主播视频在线| 国产精品嫩草久久久久| 欧美性生活影院| 国产一区二区不卡在线| 亚洲天堂免费看| 日韩一级完整毛片| 国产在线国偷精品产拍免费yy| 亚洲欧洲国产日韩| 欧美不卡在线视频| 欧美高清视频一二三区 | 欧美日韩一区二区电影| 激情国产一区二区| 婷婷综合五月天| 国产精品美女久久久久久2018 | 欧美日韩精品二区第二页| 国产一区二区三区免费观看| 午夜激情一区二区三区| 亚洲视频图片小说| 中文字幕一区二区三区在线观看 | 国产欧美日韩不卡免费| 91精品国产色综合久久久蜜香臀| 在线观看日韩毛片| 99精品视频在线观看免费| 高清国产一区二区| 成人国产精品免费观看动漫 | 国产成人av影院| 成人高清免费观看| 国产乱人伦偷精品视频免下载| 视频精品一区二区| 天天亚洲美女在线视频| 爽好久久久欧美精品| 日本成人在线网站| 国产一区二区三区免费看| 亚洲国产成人av网| 精品国产一区久久| 日韩一级成人av| 久久夜色精品国产噜噜av | 在线影视一区二区三区| 色噜噜久久综合| 91超碰这里只有精品国产| 日韩精品一区二区三区视频在线观看| 欧美日韩五月天| 国产欧美日韩麻豆91| 亚洲欧美日韩国产中文在线| 亚洲美女免费在线| 免费看日韩a级影片| 国产成人综合网站| 欧美日本免费一区二区三区| 久久亚洲精品国产精品紫薇| 亚洲乱码中文字幕| 国产91丝袜在线播放0| 在线视频欧美精品| 国产女主播在线一区二区| 亚洲国产精品一区二区久久| 国产一区在线视频| 日韩欧美资源站| 一区二区三区四区精品在线视频| 国产酒店精品激情| 欧美一区二区视频在线观看2022| 136国产福利精品导航| 韩国成人精品a∨在线观看| 欧美一区二区三区影视| 亚洲国产精品久久人人爱| av在线一区二区| 日本一区二区视频在线观看| 国产精品影视在线| 国产欧美精品国产国产专区| 岛国一区二区三区| 国产精品免费aⅴ片在线观看| 韩国女主播一区| 中文字幕不卡一区| 99在线精品观看| 亚洲人成网站色在线观看| 99精品国产一区二区三区不卡| 欧美激情一区二区| www.亚洲色图| 亚洲一区二区三区中文字幕| 91精品啪在线观看国产60岁| 亚洲图片欧美一区| 欧美电影免费观看高清完整版在线观看 | 日韩欧美国产麻豆| 粉嫩久久99精品久久久久久夜| 国产精品成人免费| 精品视频一区三区九区| 秋霞影院一区二区| 国产精品久久久久久久浪潮网站| 色哟哟一区二区在线观看 | 亚洲综合免费观看高清完整版在线| 日本丰满少妇一区二区三区| 日本一不卡视频| 亚洲欧洲国产日韩| 久久综合久色欧美综合狠狠| 成人黄色777网| 免费看黄色91| 亚洲一区二区精品视频| 《视频一区视频二区| 日韩一区国产二区欧美三区| 国产·精品毛片| 久久爱www久久做| 男女性色大片免费观看一区二区 | 色94色欧美sute亚洲13| 精品亚洲porn| 国产精品一级在线| 精品一区二区三区日韩| 裸体一区二区三区| 午夜精品爽啪视频| 日韩电影在线免费看|