Compare commits
5
Commits
4.2
...
4.2-stable
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb59f2e371 | ||
|
|
5f05054c8a | ||
|
|
51b4f5502f | ||
|
|
258fedbca0 | ||
|
|
3b1c2d8793 |
@@ -17,7 +17,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
|
|||||||
APP = ndpiReader.dpdk
|
APP = ndpiReader.dpdk
|
||||||
LIBNDPI = $(PWD)/../src/lib/libndpi.a
|
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 += -g
|
||||||
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
|
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
|
||||||
|
|||||||
+1
-2
@@ -8,9 +8,8 @@ CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@
|
|||||||
LDFLAGS=@LDFLAGS@
|
LDFLAGS=@LDFLAGS@
|
||||||
LIBNDPI=$(SRCHOME)/lib/libndpi.a
|
LIBNDPI=$(SRCHOME)/lib/libndpi.a
|
||||||
LIBS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@
|
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
|
$(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
|
||||||
OBJS=ndpiReader.o reader_util.o intrusion_detection.o
|
|
||||||
PREFIX?=@prefix@
|
PREFIX?=@prefix@
|
||||||
|
|
||||||
ifneq ($(BUILD_MINGW),)
|
ifneq ($(BUILD_MINGW),)
|
||||||
|
|||||||
+1769
-770
File diff suppressed because it is too large
Load Diff
@@ -1551,7 +1551,7 @@ extern "C" {
|
|||||||
|
|
||||||
u_int8_t ndpi_is_protocol_detected(struct ndpi_detection_module_struct *ndpi_str,
|
u_int8_t ndpi_is_protocol_detected(struct ndpi_detection_module_struct *ndpi_str,
|
||||||
ndpi_protocol proto);
|
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,
|
void ndpi_serialize_proto(struct ndpi_detection_module_struct *ndpi_struct,
|
||||||
ndpi_serializer *serializer, ndpi_risk_enum risk,
|
ndpi_serializer *serializer, ndpi_risk_enum risk,
|
||||||
ndpi_protocol l7_protocol);
|
ndpi_protocol l7_protocol);
|
||||||
|
|||||||
@@ -1352,6 +1352,13 @@ struct ndpi_flow_struct {
|
|||||||
/* NDPI_PROTOCOL_TINC */
|
/* NDPI_PROTOCOL_TINC */
|
||||||
u_int8_t tinc_state;
|
u_int8_t tinc_state;
|
||||||
struct tinc_cache_entry tinc_cache_entry;
|
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
|
#define NDPI_PROTOCOL_DEFAULT_LEVEL 0
|
||||||
|
|||||||
@@ -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,
|
void ndpi_serialize_risk(ndpi_serializer *serializer,
|
||||||
ndpi_risk_enum risk)
|
ndpi_risk risk)
|
||||||
{
|
{
|
||||||
u_int32_t i;
|
u_int32_t i;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
// const u_int8_t *packet_payload = packet->payload;
|
||||||
u_int32_t payload_len = packet->payload_packet_len;
|
u_int32_t payload_len = packet->payload_packet_len;
|
||||||
|
|
||||||
/* No need to do ntohl() with 0xFFFFFFFF */
|
if(packet->iph
|
||||||
if(packet->iph && (packet->iph->daddr == 0xFFFFFFFF /* 255.255.255.255 */)) {
|
&& ((packet->iph->daddr == 0xFFFFFFFF /* 255.255.255.255 */)
|
||||||
|
|| ((ntohl(packet->iph->daddr) & 0xFFFFFF00) == 0xE0000000 /* multicast */)
|
||||||
|
)) {
|
||||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user