-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinclude.h
123 lines (109 loc) · 2.65 KB
/
include.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
*
* (C) 2021-24 - ntop.org
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <time.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
#include <signal.h>
#ifdef __linux__
#include <linux/types.h>
#endif
#include <net/ethernet.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>
#include <getopt.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#ifdef __linux__
#include <linux/netfilter.h> /* for NF_ACCEPT */
#include <libnfnetlink/libnfnetlink.h>
#include <libnetfilter_queue/libnetfilter_queue.h>
#endif
#ifdef __linux__
#include <jsoncpp/json/json.h>
#else
#include <json/json.h>
#endif
#include <curl/curl.h>
#include <maxminddb.h>
#include <ndpi_api.h>
#include <curl/curl.h>
#include <assert.h>
#include <inttypes.h>
#include <netinet/ip6.h>
#ifndef __linux__
#include <pcap/pcap.h>
#endif
#ifdef HAVE_ZMQ
#include <zmq.h>
#endif
#ifdef HAVE_NTOP_CLOUD
extern "C" {
#include "ntop_cloud.h"
};
#endif
/* ***** C++ ***** */
#include <unordered_map>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <functional>
#include <thread>
#include <list>
#include <set>
#include <vector>
#include <mutex>
#include <queue>
/* ********************************************** */
//#if !defined(__mips__)
#define HAVE_NFQ_SET_VERDICT2 1
//#endif
#define NF_BUFFER_SIZE (32768*16384)
#define NF_MAX_QUEUE_LEN (8192)
#define ZMQ_TOPIC_NAME "ban"
/* ********************************************** */
#include "Trace.h"
#include "Utils.h"
#include "Lists.h"
#include "Marker.h"
#include "Configuration.h"
#include "ZMQ.h"
#include "GeoIP.h"
#include "WatchMatches.h"
#include "Firewall.h"
#include "LinuxFirewall.h"
#include "FreeBSDFirewall.h"
#include "NtopCloud.h"
#include "NwInterface.h"