亚洲欧美第一页_禁久久精品乱码_粉嫩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;\  }\

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美国产高清| 欧美日韩午夜影院| 狠狠v欧美v日韩v亚洲ⅴ| 午夜久久久久久久久| 亚洲品质自拍视频网站| 久久久久97国产精华液好用吗| 91麻豆精品国产自产在线| 欧美日韩电影在线播放| 欧美无乱码久久久免费午夜一区| 欧美综合一区二区三区| 日韩电影在线免费观看| 三级精品在线观看| 日韩电影在线看| 理论片日本一区| 黑人巨大精品欧美一区| 国产aⅴ精品一区二区三区色成熟| 黑人精品欧美一区二区蜜桃| 国产一区二区网址| 成人美女在线观看| 91免费视频网| 欧美日韩精品欧美日韩精品| 国产一区二区三区免费播放| 国产精品自拍三区| av一区二区三区四区| 91蜜桃在线免费视频| 精品视频在线免费| 欧美一区三区四区| 久久综合久久综合亚洲| 中文字幕乱码久久午夜不卡 | 国产精品美女久久久久av爽李琼| 久久久综合九色合综国产精品| 国产女人aaa级久久久级| 中文字幕一区视频| 亚洲第一在线综合网站| 蜜臀av一区二区| 国产成人精品免费一区二区| 91老师片黄在线观看| 欧美人妇做爰xxxⅹ性高电影| 精品国产污污免费网站入口 | 亚洲一区二区三区免费视频| 日韩精品一级二级| 国产ts人妖一区二区| 91久久人澡人人添人人爽欧美| 91 com成人网| 亚洲国产成人私人影院tom| 亚洲视频你懂的| 香蕉乱码成人久久天堂爱免费| 精品一区精品二区高清| 99视频热这里只有精品免费| 8x福利精品第一导航| 国产精品久久毛片| 日本免费在线视频不卡一不卡二| 国产福利91精品| 精品视频全国免费看| 日韩免费高清av| 亚洲三级在线免费观看| 久久se精品一区精品二区| 91麻豆自制传媒国产之光| 国产激情视频一区二区三区欧美| 欧美在线免费观看亚洲| 国产喂奶挤奶一区二区三区| 亚洲国产成人av好男人在线观看| 亚洲色图欧洲色图婷婷| 老鸭窝一区二区久久精品| 色哟哟精品一区| www久久精品| 亚洲成人先锋电影| 不卡电影免费在线播放一区| 欧美不卡激情三级在线观看| 一区2区3区在线看| 国产suv精品一区二区6| 国产成人精品影视| 日韩一区二区三区四区五区六区| 国产精品传媒入口麻豆| 捆绑紧缚一区二区三区视频| 欧美怡红院视频| 国产精品久久看| 国产不卡高清在线观看视频| 日韩欧美在线综合网| 亚洲激情在线播放| 成人精品电影在线观看| 日韩视频一区二区在线观看| 樱花草国产18久久久久| 亚洲一区二区成人在线观看| av中文字幕在线不卡| 精品精品国产高清一毛片一天堂| 亚洲国产一区二区视频| 成人综合激情网| 精品成人一区二区| 麻豆成人免费电影| 欧美肥胖老妇做爰| 亚洲一区二区三区爽爽爽爽爽| 国产精品888| 久久久午夜精品| 黄色小说综合网站| 91精品国产aⅴ一区二区| 亚洲午夜久久久久久久久电影院| 91浏览器打开| 一区二区欧美国产| 日本久久精品电影| 亚洲欧美日韩中文字幕一区二区三区| 粉嫩久久99精品久久久久久夜 | 曰韩精品一区二区| 色综合天天综合色综合av| 欧美激情在线看| 成人自拍视频在线| 国产女同性恋一区二区| 成人精品小蝌蚪| 中文字幕乱码久久午夜不卡| 不卡一区中文字幕| 国产精品久久久久影院色老大| 风间由美性色一区二区三区| 国产精品婷婷午夜在线观看| 成人黄页在线观看| 亚洲天天做日日做天天谢日日欢 | 国产精品亚洲视频| 国产亚洲人成网站| 成人久久18免费网站麻豆| 中文字幕av一区 二区| a美女胸又www黄视频久久| 亚洲视频在线观看一区| 欧美日精品一区视频| 日韩经典一区二区| 日韩欧美一级二级| 韩国欧美国产一区| 中文字幕第一页久久| 色哟哟欧美精品| 午夜精品爽啪视频| 国产suv精品一区二区6| 亚洲美女屁股眼交3| 色94色欧美sute亚洲线路一ni| 亚洲成人综合视频| 91精品福利在线一区二区三区 | 亚洲欧洲综合另类| 色94色欧美sute亚洲线路二| 日本不卡视频一二三区| 精品嫩草影院久久| www.激情成人| 亚洲国产裸拍裸体视频在线观看乱了 | 日韩电影在线一区二区三区| 欧美不卡123| 成人免费视频caoporn| 亚洲欧洲综合另类| 欧美电视剧在线观看完整版| 国产精品综合一区二区三区| 亚洲精品伦理在线| 欧美xxxx在线观看| 成人黄色电影在线| 视频一区视频二区中文字幕| 国产亚洲精品7777| 欧美中文字幕久久| 国产精品一区久久久久| 亚洲精品欧美综合四区| 欧美一区二区三区喷汁尤物| 成人毛片老司机大片| 日韩成人dvd| 中文字幕一区在线| 欧美tk丨vk视频| 91蝌蚪porny成人天涯| 蜜臀av性久久久久av蜜臀妖精| 国产精品丝袜一区| 91精品免费在线| 99久久久国产精品| 极品美女销魂一区二区三区| 一区二区三区四区av| 亚洲精品在线观看网站| 欧亚洲嫩模精品一区三区| 国产精品乡下勾搭老头1| 亚洲国产成人91porn| 国产精品欧美一级免费| 日韩欧美一二区| 欧美写真视频网站| 亚洲成人动漫在线免费观看| 欧美伦理视频网站| 不卡影院免费观看| 国产夫妻精品视频| 九一久久久久久| 五月激情六月综合| 一区二区中文字幕在线| 久久久久久免费| 日韩视频123| 欧美日韩国产中文| 日本精品免费观看高清观看| 国产成人免费av在线| 精品在线播放免费| 蜜臀a∨国产成人精品| 天堂在线一区二区| 伊人一区二区三区| 亚洲日本护士毛茸茸| 北条麻妃一区二区三区| 综合色中文字幕| 日本一区二区三区电影| 久久蜜桃av一区二区天堂| 欧美一区二区三区视频免费播放 | 欧美一级理论片| 精品视频一区二区三区免费| 欧美亚洲自拍偷拍| 欧美老女人在线| 视频一区视频二区在线观看| 亚洲精品免费在线|