資源簡介
centos7,官方網站下載的ndpi,Git clone https://github.com/ntop/nDPI
代碼片段和文件信息
/*
?*?ndpiReader.c
?*
?*?Copyright?(C)?2011-19?-?ntop.org
?*
?*?nDPI?is?free?software:?you?can?redistribute?it?and/or?modify
?*?it?under?the?terms?of?the?GNU?Lesser?General?Public?License?as?published?by
?*?the?Free?Software?Foundation?either?version?3?of?the?License?or
?*?(at?your?option)?any?later?version.
?*
?*?nDPI?is?distributed?in?the?hope?that?it?will?be?useful
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*?GNU?Lesser?General?Public?License?for?more?details.
?*
?*?You?should?have?received?a?copy?of?the?GNU?Lesser?General?Public?License
?*?along?with?nDPI.??If?not?see? .
?*
?*/
#ifdef?HAVE_CONFIG_H
#include?“ndpi_config.h“
#endif
#ifdef?linux
#define?_GNU_SOURCE
#include?
#endif
#include?
#include?
#include?
#ifdef?WIN32
#include??/*?winsock.h?is?included?automatically?*/
#include?
#include?
#define?getopt?getopt____
#else
#include?
#include?
#endif
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“ndpi_api.h“
#include?“uthash.h“
#include?
#include?
#include?
#include?
#ifdef?HAVE_JSON_C
#include?
#endif
#include?“ndpi_util.h“
/**?Client?parameters?**/
static?char?*_pcap_file[MAX_NUM_READER_THREADS];?/**static?FILE?*playlist_fp[MAX_NUM_READER_THREADS]?=?{?NULL?};?/**static?FILE?*results_file???????????=?NULL;
static?char?*results_path???????????=?NULL;
static?char?*?bpfFilter?????????????=?NULL;?/**static?char?*_protoFilePath?????????=?NULL;?/**static?char?*_customCategoryFilePath=?NULL;?/**#ifdef?HAVE_JSON_C
static?char?*_statsFilePath?????????=?NULL;?/**static?char?*_diagnoseFilePath??????=?NULL;?/**static?char?*_jsonFilePath??????????=?NULL;?/**static?FILE?*stats_fp???????????????=?NULL;?/**#endif
#ifdef?HAVE_JSON_C
static?json_object?*jArray_known_flows?*jArray_unknown_flows;
static?json_object?*jArray_topStats;
#endif
static?u_int8_t?live_capture?=?0;
static?u_int8_t?undetected_flows_deleted?=?0;
/**?User?preferences?**/
u_int8_t?enable_protocol_guess?=?1;
static?u_int8_t?verbose?=?0?json_flag?=?0;
int?nDPI_LogLevel?=?0;
char?*_debug_protocols?=?NULL;
static?u_int8_t?stats_flag?=?0?bpf_filter_flag?=?0;
#ifdef?HAVE_JSON_C
static?u_int8_t?file_first_time?=?1;
#endif
static?u_int32_t?pcap_analysis_duration?=?(u_int32_t)-1;
static?u_int16_t?decode_tunnels?=?0;
static?u_int16_t?num_loops?=?1;
static?u_int8_t?shutdown_app?=?0?quiet_mode?=?0;
static?u_int8_t?num_threads?=?1;
static?struct?timeval?startup_time?
- 上一篇:智慧工地綜合解決方案
- 下一篇:員工管理系統
評論
共有 條評論