aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2024-10-31 21:20:26 +0100
committerLuca Deri <deri@ntop.org>2024-10-31 21:20:46 +0100
commit412ca8700fc53da705c6aa386c736a400279a614 (patch)
tree39ada41ae2b12ea7abf4e1243a4ae5f73d8bf3c3 /src/include
parentbcc1874e581de9d59514248a27f525cb56a0ec31 (diff)
Added HTTP credentials extraction
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h1
-rw-r--r--src/include/ndpi_typedefs.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index d304ceb5d..ae5679e71 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -109,6 +109,7 @@ extern "C" {
void * ndpi_calloc(unsigned long count, size_t size);
void * ndpi_realloc(void *ptr, size_t old_size, size_t new_size);
char * ndpi_strdup(const char *s);
+ char * ndpi_strndup(const char *s, size_t size);
void ndpi_free(void *ptr);
void * ndpi_flow_malloc(size_t size);
void ndpi_flow_free(void *ptr);
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 4dfddc5f0..dc3f110ce 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1349,12 +1349,13 @@ struct ndpi_flow_struct {
struct {
ndpi_http_method method;
u_int8_t request_version; /* 0=1.0 and 1=1.1. Create an enum for this? */
- u_int8_t websocket:1, _pad:7;
+ u_int8_t websocket:1, request_header_observed:1, first_payload_after_header_observed:1, is_form:1, _pad:4;
u_int16_t response_status_code; /* 200, 404, etc. */
char *url, *content_type /* response */, *request_content_type /* e.g. for POST */, *user_agent, *server;
char *detected_os; /* Via HTTP/QUIC User-Agent */
char *nat_ip; /* Via HTTP X-Forwarded-For */
char *filename; /* Via HTTP Content-Disposition */
+ char *username, *password;
} http;
ndpi_multimedia_flow_type flow_multimedia_type;