Compare commits

...
6 Commits
Author SHA1 Message Date
Toni bb59f2e371 Removed Makefile references to legacy code. (#1591)
- feature removed with f5545a80f9

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-08 13:37:44 +02:00
Luca Deri 5f05054c8a Added priv_data
Cherry pick of https://github.com/ntop/nDPI/commit/2560260a41172a07b6b272027f441ccda01622a5
2022-05-20 11:56:22 +02:00
Vitaliy Ivanov 51b4f5502f ndpireader: add json output back. (#1508)
- partial revert of:
    commit 51cfdfb0d8
    Author: Luca Deri <deri@ntop.org>
    Date: Sun Nov 17 17:51:45 2019 +0100
      Removed unused JSON-C code

- Json option is changed from 'j' to 'k' as it's used in the new codebase.
- use HAVE_LIBJSON_C instead of HAVE_JSON_C.
- tabs vs spaces clean ups.

Signed-off-by: Vitaliy Ivanov <vitaliyi@interfacemasters.com>
2022-04-01 11:46:15 +02:00
Luca Deri 258fedbca0 Fixed invalid ndpi_serialize_risk() prototype 2022-02-10 20:22:17 +01:00
Luca Deri 3b1c2d8793 Fixes skype (mis)detection 2022-02-09 11:41:10 +01:00
Luca 8b5c6af71b Updated release to 4.2 2022-02-01 09:14:05 +01:00
8 changed files with 1785 additions and 778 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
AC_INIT([libndpi], [4.1.0])
AC_INIT([libndpi], [4.2.0])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
+1 -1
View File
@@ -17,7 +17,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
APP = ndpiReader.dpdk
LIBNDPI = $(PWD)/../src/lib/libndpi.a
SRCS-y := reader_util.c intrusion_detection.c ndpiReader.c
SRCS-y := reader_util.c ndpiReader.c
CFLAGS += -g
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
+1 -2
View File
@@ -8,9 +8,8 @@ CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@
LDFLAGS=@LDFLAGS@
LIBNDPI=$(SRCHOME)/lib/libndpi.a
LIBS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@
HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \
HEADERS=reader_util.h $(SRCHOME)/include/ndpi_api.h \
$(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
OBJS=ndpiReader.o reader_util.o intrusion_detection.o
PREFIX?=@prefix@
ifneq ($(BUILD_MINGW),)
+1769 -770
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1551,7 +1551,7 @@ extern "C" {
u_int8_t ndpi_is_protocol_detected(struct ndpi_detection_module_struct *ndpi_str,
ndpi_protocol proto);
void ndpi_serialize_risk(ndpi_serializer *serializer, ndpi_risk_enum risk);
void ndpi_serialize_risk(ndpi_serializer *serializer, ndpi_risk risk);
void ndpi_serialize_proto(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_serializer *serializer, ndpi_risk_enum risk,
ndpi_protocol l7_protocol);
+7
View File
@@ -1352,6 +1352,13 @@ struct ndpi_flow_struct {
/* NDPI_PROTOCOL_TINC */
u_int8_t tinc_state;
struct tinc_cache_entry tinc_cache_entry;
/*
Leave this field below at the end
The field below can be used by third
party dissectors for storing private data
*/
u_int8_t priv_data[16];
};
#define NDPI_PROTOCOL_DEFAULT_LEVEL 0
+1 -1
View File
@@ -1106,7 +1106,7 @@ char* ndpi_base64_encode(unsigned char const* bytes_to_encode, size_t in_len) {
/* ********************************** */
void ndpi_serialize_risk(ndpi_serializer *serializer,
ndpi_risk_enum risk)
ndpi_risk risk)
{
u_int32_t i;
+4 -2
View File
@@ -71,8 +71,10 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s
// const u_int8_t *packet_payload = packet->payload;
u_int32_t payload_len = packet->payload_packet_len;
/* No need to do ntohl() with 0xFFFFFFFF */
if(packet->iph && (packet->iph->daddr == 0xFFFFFFFF /* 255.255.255.255 */)) {
if(packet->iph
&& ((packet->iph->daddr == 0xFFFFFFFF /* 255.255.255.255 */)
|| ((ntohl(packet->iph->daddr) & 0xFFFFFF00) == 0xE0000000 /* multicast */)
)) {
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}