aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorIvan Nardi <nardi.ivan@gmail.com>2024-11-12 10:01:57 +0100
committerIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-11-12 13:34:25 +0100
commit1bda2bf414b22ce2e983e9c9a849698ccdbb1bf1 (patch)
tree2df250b2808f43030ecb5ba7971e5afd8be46e2d /src/include
parent6ff71aa6be12361cd012290980d05dc2659db0bb (diff)
SIP: extract some basic metadata
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h2
-rw-r--r--src/include/ndpi_private.h5
-rw-r--r--src/include/ndpi_typedefs.h7
3 files changed, 14 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index ae5679e71..612f66662 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -115,6 +115,8 @@ extern "C" {
void ndpi_flow_free(void *ptr);
u_int32_t ndpi_get_tot_allocated_memory(void);
+ char *ndpi_strip_leading_trailing_spaces(char *ptr, int *ptr_len) ;
+
/**
* Finds the first occurrence of the substring 'needle' in the string 'haystack'.
*
diff --git a/src/include/ndpi_private.h b/src/include/ndpi_private.h
index 4e8932687..3082d5112 100644
--- a/src/include/ndpi_private.h
+++ b/src/include/ndpi_private.h
@@ -257,6 +257,11 @@ struct ndpi_detection_module_config_struct {
int ftp_opportunistic_tls_enabled;
+ int sip_attribute_from_enabled;
+ int sip_attribute_from_imsi_enabled;
+ int sip_attribute_to_enabled;
+ int sip_attribute_to_imsi_enabled;
+
int stun_opportunistic_tls_enabled;
int stun_max_packets_extra_dissection;
int stun_mapped_address_enabled;
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index b720bbe00..7610da9eb 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1525,6 +1525,13 @@ struct ndpi_flow_struct {
u_int8_t url_count;
char url[4][48];
} slp;
+
+ struct {
+ char *from;
+ char from_imsi[16]; /* IMSI is 15 digit long, at most; + 1 for NULL terminator */
+ char *to;
+ char to_imsi[16];
+ } sip;
} protos;
/* **Packet** metadata for flows where monitoring is enabled. It is reset after each packet! */