?? ftstat.c
字號:
};struct ftstat_rpt_52 { struct ftchash *ftch;};struct ftstat_rpt_53 { struct ftchash *ftch;};struct ftstat_rpt_54 { struct ftchash *ftch;};struct ftstat_rpt_55 { struct ftchash *ftch;};struct ftstat_rpt_56 { struct ftchash *ftch;};struct ftstat_rpt_57 { struct ftchash *ftch;};struct ftstat_rpt_58 { struct ftchash *ftch;};struct ftstat_rpt_59 { struct ftchash *ftch;};struct ftstat_rpt_60 { struct ftchash *ftch;};struct ftstat_rpt_61 { struct ftchash *ftch;};struct ftstat_rpt_62 { struct ftchash *ftch;};struct ftstat_rpt_63 { struct ftchash *ftch;};struct ftstat_rpt_64 { struct ftchash *ftch;};struct ftstat_rpt_65 { struct flow_bucket bucket;};struct ftstat_rpt_66 { struct ftchash *ftch;};struct ftstat_rpt_67 { struct ftchash *ftch;};struct ftstat_rpt_68 { struct ftchash *ftch;};struct ftstat_rpt_69 { struct ftchash *ftch;};struct ftstat_rpt_70 { struct ftchash *ftch;};struct ftstat_rpt_71 { struct ftchash *ftch;};struct ftstat_rpt_72 { struct ftchash *ftch;};struct ftstat_rpt_73 { struct ftchash *ftch;};struct ftstat_rpt_74 { struct ftchash *ftch;};struct ftstat_rpt_75 { struct ftchash *ftch;};struct ftstat_rpt_76 { struct ftchash *ftch;};struct ftstat_rpt_77 { struct ftchash *ftch;};struct ftstat_rpt_78 { struct ftchash *ftch;};int parse_rpt(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_type(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_filter(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_scale(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_tag_mask(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_ip_src_addr_fmt(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_ip_dst_addr_fmt(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_output(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_options(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_sort(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_fields(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_format(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_path(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_records(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_tally(struct line_parser *lp, struct ftstat *ftstat);int parse_rpt_out_time(struct line_parser *lp, struct ftstat *ftstat);int parse_def(struct line_parser *lp, struct ftstat *ftstat);int parse_def_mask(struct line_parser *lp, struct ftstat *ftstat);int parse_def_tag(struct line_parser *lp, struct ftstat *ftstat);int parse_def_filter(struct line_parser *lp, struct ftstat *ftstat);int parse_def_report(struct line_parser *lp, struct ftstat *ftstat);int parse_def_time_series(struct line_parser *lp, struct ftstat *ftstat);int parse_include_tag(struct line_parser *lp, struct ftstat *ftstat);int parse_include_filter(struct line_parser *lp, struct ftstat *ftstat);int parse_include_mask(struct line_parser *lp, struct ftstat *ftstat);void ftstat_free(struct ftstat *ftstat);static int load_masks(struct ftstat *ftstat);static int load_filters(struct ftstat *ftstat);static int load_tags(struct ftstat *ftstat);static int resolve_reports(struct ftstat *ftstat);static int dump_ascii_header(FILE *fp, struct ftio *ftio, struct ftstat_def *active_def, struct ftstat_rpt *rpt);static int recn_dump(FILE *fp, int fields, char *key, char *key1, char *key2, char *key3, char *key4, char *key5, char *key6);static int sort_cmp64(const void *a, const void *b);static int sort_cmp_double(const void *a, const void *b);void bucket_free(struct flow_bucket *b);int bucket_alloc(struct flow_bucket *b, u_int32 n, struct ftstat_rpt *rpt);static int bucket_dump1(FILE *fp, struct ftstat_rpt *rpt, struct flow_bucket *b, u_int32 nindex, char *symfile);static int chash_c64_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch);static int chash_c32_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1);static int chash_c322_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2);static int chash_c162_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2);static int chash_c163_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2, char *sym3);static int chash_c164_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2, char *sym3, char *sym4);static int chash_ip_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch);static int chash_prefix_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, int f1);static int chash_prefix2_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch);static int chash_prefix16_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, int f1);static int chash_prefix162_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2, int f1 );static int chash_prefix216_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1);static int chash_prefix2162_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2);static int chash_flow1_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, char *sym2);static int chash_flow12_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1);static int chash_prefixh_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, int f1);static int chash_prefix_tag_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1, int f1);static int chash_prefix2tag2_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch, char *sym1);static int chash_int_dump(FILE *fp, struct ftstat_rpt *rpt, struct ftchash *ftch);struct ftstat_rpt_1 *ftstat_rpt_1_new(struct ftstat_rpt *rpt);int ftstat_rpt_1_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_1_calc(struct ftstat_rpt *rpt);int ftstat_rpt_1_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_1_free(struct ftstat_rpt_1 *rpt);struct ftstat_rpt_2 *ftstat_rpt_2_new(struct ftstat_rpt *rpt);int ftstat_rpt_2_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_2_calc(struct ftstat_rpt *rpt);int ftstat_rpt_2_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_2_free(struct ftstat_rpt_2 *rpt);struct ftstat_rpt_3 *ftstat_rpt_3_new(struct ftstat_rpt *rpt);int ftstat_rpt_3_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_3_calc(struct ftstat_rpt *rpt);int ftstat_rpt_3_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_3_free(struct ftstat_rpt_3 *rpt);struct ftstat_rpt_4 *ftstat_rpt_4_new(struct ftstat_rpt *rpt);int ftstat_rpt_4_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_4_calc(struct ftstat_rpt *rpt);int ftstat_rpt_4_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_4_free(struct ftstat_rpt_4 *rpt);struct ftstat_rpt_5 *ftstat_rpt_5_new(struct ftstat_rpt *rpt);int ftstat_rpt_5_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_5_calc(struct ftstat_rpt *rpt);int ftstat_rpt_5_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_5_free(struct ftstat_rpt_5 *rpt);struct ftstat_rpt_6 *ftstat_rpt_6_new(struct ftstat_rpt *rpt);int ftstat_rpt_6_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_6_calc(struct ftstat_rpt *rpt);int ftstat_rpt_6_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_6_free(struct ftstat_rpt_6 *rpt);struct ftstat_rpt_7 *ftstat_rpt_7_new(struct ftstat_rpt *rpt);int ftstat_rpt_7_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_7_calc(struct ftstat_rpt *rpt);int ftstat_rpt_7_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_7_free(struct ftstat_rpt_7 *rpt);struct ftstat_rpt_8 *ftstat_rpt_8_new(struct ftstat_rpt *rpt);int ftstat_rpt_8_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_8_calc(struct ftstat_rpt *rpt);int ftstat_rpt_8_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_8_free(struct ftstat_rpt_8 *rpt);struct ftstat_rpt_9 *ftstat_rpt_9_new(struct ftstat_rpt *rpt);int ftstat_rpt_9_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_9_calc(struct ftstat_rpt *rpt);int ftstat_rpt_9_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_9_free(struct ftstat_rpt_9 *rpt);struct ftstat_rpt_10 *ftstat_rpt_10_new(struct ftstat_rpt *rpt);int ftstat_rpt_10_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_10_calc(struct ftstat_rpt *rpt);int ftstat_rpt_10_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_10_free(struct ftstat_rpt_10 *rpt);struct ftstat_rpt_11 *ftstat_rpt_11_new(struct ftstat_rpt *rpt);int ftstat_rpt_11_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_11_calc(struct ftstat_rpt *rpt);int ftstat_rpt_11_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_11_free(struct ftstat_rpt_11 *rpt);struct ftstat_rpt_12 *ftstat_rpt_12_new(struct ftstat_rpt *rpt);int ftstat_rpt_12_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_12_calc(struct ftstat_rpt *rpt);int ftstat_rpt_12_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_12_free(struct ftstat_rpt_12 *rpt);struct ftstat_rpt_13 *ftstat_rpt_13_new(struct ftstat_rpt *rpt);int ftstat_rpt_13_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_13_calc(struct ftstat_rpt *rpt);int ftstat_rpt_13_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_13_free(struct ftstat_rpt_13 *rpt);struct ftstat_rpt_14 *ftstat_rpt_14_new(struct ftstat_rpt *rpt);int ftstat_rpt_14_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_14_calc(struct ftstat_rpt *rpt);int ftstat_rpt_14_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_14_free(struct ftstat_rpt_14 *rpt);struct ftstat_rpt_15 *ftstat_rpt_15_new(struct ftstat_rpt *rpt);int ftstat_rpt_15_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_15_calc(struct ftstat_rpt *rpt);int ftstat_rpt_15_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_15_free(struct ftstat_rpt_15 *rpt);struct ftstat_rpt_16 *ftstat_rpt_16_new(struct ftstat_rpt *rpt);int ftstat_rpt_16_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_16_calc(struct ftstat_rpt *rpt);int ftstat_rpt_16_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_16_free(struct ftstat_rpt_16 *rpt);struct ftstat_rpt_17 *ftstat_rpt_17_new(struct ftstat_rpt *rpt);int ftstat_rpt_17_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_17_calc(struct ftstat_rpt *rpt);int ftstat_rpt_17_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_17_free(struct ftstat_rpt_17 *rpt);struct ftstat_rpt_18 *ftstat_rpt_18_new(struct ftstat_rpt *rpt);int ftstat_rpt_18_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_18_calc(struct ftstat_rpt *rpt);int ftstat_rpt_18_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_18_free(struct ftstat_rpt_18 *rpt);struct ftstat_rpt_19 *ftstat_rpt_19_new(struct ftstat_rpt *rpt);int ftstat_rpt_19_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_19_calc(struct ftstat_rpt *rpt);int ftstat_rpt_19_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_19_free(struct ftstat_rpt_19 *rpt);struct ftstat_rpt_20 *ftstat_rpt_20_new(struct ftstat_rpt *rpt);int ftstat_rpt_20_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_20_calc(struct ftstat_rpt *rpt);int ftstat_rpt_20_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_20_free(struct ftstat_rpt_20 *rpt);struct ftstat_rpt_21 *ftstat_rpt_21_new(struct ftstat_rpt *rpt);int ftstat_rpt_21_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_21_calc(struct ftstat_rpt *rpt);int ftstat_rpt_21_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_21_free(struct ftstat_rpt_21 *rpt);struct ftstat_rpt_22 *ftstat_rpt_22_new(struct ftstat_rpt *rpt);int ftstat_rpt_22_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_22_calc(struct ftstat_rpt *rpt);int ftstat_rpt_22_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_22_free(struct ftstat_rpt_22 *rpt);struct ftstat_rpt_23 *ftstat_rpt_23_new(struct ftstat_rpt *rpt);int ftstat_rpt_23_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_23_calc(struct ftstat_rpt *rpt);int ftstat_rpt_23_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_23_free(struct ftstat_rpt_23 *rpt);struct ftstat_rpt_24 *ftstat_rpt_24_new(struct ftstat_rpt *rpt);int ftstat_rpt_24_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_24_calc(struct ftstat_rpt *rpt);int ftstat_rpt_24_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_24_free(struct ftstat_rpt_24 *rpt);struct ftstat_rpt_25 *ftstat_rpt_25_new(struct ftstat_rpt *rpt);int ftstat_rpt_25_accum(struct ftstat_rpt *rpt, char *rec, struct fts3rec_offsets *fo);int ftstat_rpt_25_calc(struct ftstat_rpt *rpt);int ftstat_rpt_25_dump(FILE *fp, struct ftio *ftio, struct ftstat_rpt *rpt);void ftstat_rpt_25_free(struct ftstat_rpt_25 *rpt);struct ftstat_rpt_26 *ftstat_rpt_26_new(struct ftstat_rpt *rpt);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -