aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h.in
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-01-30 19:18:12 +0100
committerGitHub <noreply@github.com>2022-01-30 19:18:12 +0100
commit5bb5bec477e1a10a404fd9228ddc0f5041b51123 (patch)
tree923e8b698416595cf18e853215394fe6c66c8e02 /src/include/ndpi_api.h.in
parent1fdcddb33d105a45061da1ceaefcb6a00542322f (diff)
Remove `struct ndpi_id_struct` (#1427)
Remove the last uses of `struct ndpi_id_struct`. That code is not really used and it has not been updated for a very long time: see #1279 for details. Correlation among flows is achieved via LRU caches. This change allows to further reduce memory consumption (see also 91bb77a8). At nDPI 4.0 (more precisly, at a6b10cf, because memory stats were wrong until that commit): ``` nDPI Memory statistics: nDPI Memory (once): 221.15 KB Flow Memory (per flow): 2.94 KB ``` Now: ``` nDPI Memory statistics: nDPI Memory (once): 235.27 KB Flow Memory (per flow): 688 B <-------- ``` i.e. memory usage per flow has been reduced by 77%. Close #1279
Diffstat (limited to 'src/include/ndpi_api.h.in')
-rw-r--r--src/include/ndpi_api.h.in22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in
index e0b813597..ed468f6d8 100644
--- a/src/include/ndpi_api.h.in
+++ b/src/include/ndpi_api.h.in
@@ -36,7 +36,6 @@ extern "C" {
*/
#define NDPI_API_VERSION @NDPI_API_VERSION@
-#define SIZEOF_ID_STRUCT ( sizeof(struct ndpi_id_struct) )
#define SIZEOF_FLOW_STRUCT ( sizeof(struct ndpi_flow_struct) )
#define NDPI_DETECTION_ONLY_IPV4 ( 1 << 0 )
@@ -76,15 +75,6 @@ extern "C" {
/**
- * Get the size of the id struct
- *
- * @return the size of the id struct
- *
- */
- u_int32_t ndpi_detection_get_sizeof_ndpi_id_struct(void);
-
-
- /**
* Get the size of the flow tcp struct
*
* @return the size of the flow tcp struct
@@ -303,8 +293,6 @@ extern "C" {
* @par packet = unsigned char pointer to the Layer 3 (IP header)
* @par packetlen = the length of the packet
* @par packet_time_ms = the current timestamp for the packet (expressed in msec)
- * @par src = pointer to the source subscriber state machine
- * @par dst = pointer to the destination subscriber state machine
* @return void
*
*/
@@ -312,9 +300,7 @@ extern "C" {
struct ndpi_flow_struct *flow,
const unsigned char *packet,
const unsigned short packetlen,
- const u_int64_t packet_time_ms,
- struct ndpi_id_struct *src,
- struct ndpi_id_struct *dst);
+ const u_int64_t packet_time_ms);
/**
* Processes one packet and returns the ID of the detected protocol.
@@ -325,8 +311,6 @@ extern "C" {
* @par packet = unsigned char pointer to the Layer 3 (IP header)
* @par packetlen = the length of the packet
* @par packet_time_ms = the current timestamp for the packet (expressed in msec)
- * @par src = pointer to the source subscriber state machine
- * @par dst = pointer to the destination subscriber state machine
* @return the detected ID of the protocol
*
*/
@@ -334,9 +318,7 @@ extern "C" {
struct ndpi_flow_struct *flow,
const unsigned char *packet,
const unsigned short packetlen,
- const u_int64_t packet_time_ms,
- struct ndpi_id_struct *src,
- struct ndpi_id_struct *dst);
+ const u_int64_t packet_time_ms);
/**
* Get the main protocol of the passed flows for the detected module
*