aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--src/lib/protocols/amqp.c6
-rw-r--r--src/lib/protocols/crossfire.c2
-rw-r--r--src/lib/protocols/qq.c3
-rw-r--r--src/lib/protocols/world_of_warcraft.c3
-rw-r--r--src/lib/protocols/zabbix.c3
6 files changed, 8 insertions, 12 deletions
diff --git a/README.md b/README.md
index c98e1f482..b7c289a83 100644
--- a/README.md
+++ b/README.md
@@ -79,11 +79,12 @@ The entire procedure of adding new protocols in detail:
4. Add a new entry for the search function for the new protocol in: `src/include/ndpi_protocols.h`
5. Choose (do not change anything) a selection bitmask from: `src/include/ndpi_define.h`
6. Set protocol default ports in `ndpi_init_protocol_defaults` in: `src/lib/ndpi_main.c`
-7. Be sure to have nBPF support, cloning `PF_RING` in the same directory where you cloned `nDPI`: `git clone https://github.com/ntop/PF_RING/ && cd PF_RING/userland/nbpf && ./configure && make`
+7. Be sure to have nBPF support, cloning `PF_RING` in the same directory where you cloned `nDPI`: `git clone https://github.com/ntop/PF_RING/ && cd PF_RING/userland/nbpf && ./configure && make`. You can ignore the `/bin/sh: 1: ../lib/pfring_config: not found` error
8. From the `nDPI` root directory, `./autogen.sh --with-pcre2` (nBPF and PCRE2 are usually optional, but they are needed to run/update *all* the unit tests)
9. `make`
10. `make check`
11. Update the documentation, adding this new protocol to `doc/protocols.rst`
+12. Update the Windows Visual Studio configuration, adding the new c file in `windows/nDPI.vcxproj`
### How to use nDPI to Block Selected Traffic
diff --git a/src/lib/protocols/amqp.c b/src/lib/protocols/amqp.c
index 61c8f02a9..ce0397e70 100644
--- a/src/lib/protocols/amqp.c
+++ b/src/lib/protocols/amqp.c
@@ -35,8 +35,7 @@ struct amqp_header {
} PACK_OFF;
static void ndpi_int_amqp_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
- struct ndpi_flow_struct *flow/* , */
- /* ndpi_protocol_type_t protocol_type */) {
+ struct ndpi_flow_struct *flow) {
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_AMQP, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
}
@@ -45,7 +44,6 @@ static void ndpi_search_amqp(struct ndpi_detection_module_struct *ndpi_struct, s
NDPI_LOG_DBG(ndpi_struct, "search amqp\n");
- if (packet->tcp != NULL) {
if(packet->payload_packet_len > sizeof(struct amqp_header)) {
struct amqp_header *h = (struct amqp_header*)packet->payload;
@@ -69,7 +67,7 @@ static void ndpi_search_amqp(struct ndpi_detection_module_struct *ndpi_struct, s
}
}
}
- }
+
if(flow->packet_counter > 5)
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
}
diff --git a/src/lib/protocols/crossfire.c b/src/lib/protocols/crossfire.c
index 547db2e8b..e0f462f86 100644
--- a/src/lib/protocols/crossfire.c
+++ b/src/lib/protocols/crossfire.c
@@ -30,7 +30,7 @@
static void ndpi_int_crossfire_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
- struct ndpi_flow_struct *flow/* , ndpi_protocol_type_t protocol_type */)
+ struct ndpi_flow_struct *flow)
{
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_CROSSFIRE, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
diff --git a/src/lib/protocols/qq.c b/src/lib/protocols/qq.c
index 3a9039874..efe35e8e5 100644
--- a/src/lib/protocols/qq.c
+++ b/src/lib/protocols/qq.c
@@ -31,8 +31,7 @@
static void ndpi_int_qq_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
- struct ndpi_flow_struct *flow/* , */
- /* ndpi_protocol_type_t protocol_type */)
+ struct ndpi_flow_struct *flow)
{
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_QQ, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
}
diff --git a/src/lib/protocols/world_of_warcraft.c b/src/lib/protocols/world_of_warcraft.c
index 6c0ab8ee4..e0e8dba08 100644
--- a/src/lib/protocols/world_of_warcraft.c
+++ b/src/lib/protocols/world_of_warcraft.c
@@ -29,8 +29,7 @@
#include "ndpi_private.h"
static void ndpi_int_worldofwarcraft_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
- struct ndpi_flow_struct *flow/* , */
- /* ndpi_protocol_type_t protocol_type */)
+ struct ndpi_flow_struct *flow)
{
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_WORLDOFWARCRAFT, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
}
diff --git a/src/lib/protocols/zabbix.c b/src/lib/protocols/zabbix.c
index 0eb776307..84e466de5 100644
--- a/src/lib/protocols/zabbix.c
+++ b/src/lib/protocols/zabbix.c
@@ -28,8 +28,7 @@
/* *************************************************** */
static void ndpi_int_zabbix_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
- struct ndpi_flow_struct *flow/* , */
- /* ndpi_protocol_type_t protocol_type */) {
+ struct ndpi_flow_struct *flow) {
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_ZABBIX, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
}