Skip to content

Commit

Permalink
Major code cleanup
Browse files Browse the repository at this point in the history
Converted some not popular protocols to NDPI_PROTOCOL_GENERIC with category detection
  • Loading branch information
lucaderi committed Jul 21, 2018
1 parent a499f36 commit 667e77c
Show file tree
Hide file tree
Showing 166 changed files with 793 additions and 1,615 deletions.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NDPI_MAJOR="2"
NDPI_MINOR="3"
NDPI_PATCH="0"
NDPI_PATCH="1"
NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"

rm -f configure config.h config.h.in src/lib/Makefile.in
Expand Down
2 changes: 1 addition & 1 deletion configure.seed
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ AC_ARG_ENABLE([debug-messages],

AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))

AC_CONFIG_FILES([Makefile src/lib/Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h])
AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h])
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
AC_SUBST(GIT_RELEASE)
AC_SUBST(NDPI_MAJOR)
Expand Down
4 changes: 2 additions & 2 deletions example/ndpi_util.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ndpi_util.h
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-18 - 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
Expand All @@ -24,7 +24,7 @@
* If you concern about performance or have to integrate nDPI in your
* application, you could need to reimplement them yourself.
*
* WARNING: this API is unstable! Use it at your own risk!
* WARNING: this API is just a demo od nDPI usage: Use it at your own risk!
*/
#ifndef __NDPI_UTIL_H__
#define __NDPI_UTIL_H__
Expand Down
6 changes: 2 additions & 4 deletions src/include/ndpi_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ extern "C" {
void ndpi_set_automa(struct ndpi_detection_module_struct *ndpi_struct,
void* automa);

#ifdef NDPI_PROTOCOL_HTTP
/* NDPI_PROTOCOL_HTTP */
/**
* Retrieve information for HTTP flows
*
Expand Down Expand Up @@ -639,9 +639,8 @@ extern "C" {
*/
char* ndpi_get_http_content_type(struct ndpi_detection_module_struct *ndpi_mod,
struct ndpi_flow_struct *flow);
#endif

#ifdef NDPI_PROTOCOL_TOR
/* NDPI_PROTOCOL_TOR */
/**
* Check if the flow could be detected as TOR protocol
*
Expand All @@ -654,7 +653,6 @@ extern "C" {
*/
int ndpi_is_ssl_tor(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow, char *certificate);
#endif

/* Wrappers functions */
/**
Expand Down
5 changes: 2 additions & 3 deletions src/include/ndpi_main.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ndpi_main.h
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-18 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
Expand Down Expand Up @@ -105,9 +105,8 @@ extern "C" {
extern int ndpi_get_protocol_id_master_proto(struct ndpi_detection_module_struct *ndpi_struct, u_int16_t protocol_id,
u_int16_t** tcp_master_proto,
u_int16_t** udp_master_proto);
#ifdef NDPI_PROTOCOL_NETBIOS
#/* NDPI_PROTOCOL_NETBIOS */
int ndpi_netbios_name_interpret(char *in, char *out, u_int out_len);
#endif

#ifdef NDPI_ENABLE_DEBUG_MESSAGES
void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_struct,
Expand Down
520 changes: 259 additions & 261 deletions src/include/ndpi_protocol_ids.h

Large diffs are not rendered by default.

Loading

0 comments on commit 667e77c

Please sign in to comment.