aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-21 01:27:07 +0200
committerLuca Deri <deri@ntop.org>2019-10-21 01:27:07 +0200
commit960aa77b6da9bd70081621ae8e975e548ce7cc13 (patch)
tree88479d5b26613387aeedb5b6977ec28e4b980e25 /src/include
parent58daa5ed7d2c4fe26a5b4bdc77f117ad3b027a71 (diff)
Reworked email metaata extraction
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h3
-rw-r--r--src/include/ndpi_typedefs.h16
2 files changed, 7 insertions, 12 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index ad7f96fbd..372eddf72 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -837,8 +837,9 @@ extern "C" {
char *outbuf, u_int outbuf_len);
char* ndpi_ssl_version2str(u_int16_t version, u_int8_t *unknown_tls_version);
void ndpi_patchIPv6Address(char *str);
- void ndpi_user_pwd_payload_copy(u_int8_t *dest, u_int dest_len,
+ void ndpi_user_pwd_payload_copy(u_int8_t *dest, u_int dest_len, u_int offset,
const u_int8_t *src, u_int src_len);
+ u_char* ndpi_base64_decode(const u_char *src, size_t len, size_t *out_len);
int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 8eeb025e1..64644d76f 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1130,7 +1130,8 @@ struct ndpi_flow_struct {
/* init parameter, internal used to set up timestamp,... */
u_int16_t guessed_protocol_id, guessed_host_protocol_id, guessed_category, guessed_header_category;
- u_int8_t l4_proto, protocol_id_already_guessed:1, host_already_guessed:1, init_finished:1, setup_packet_direction:1, packet_direction:1, check_extra_packets:1;
+ u_int8_t l4_proto, protocol_id_already_guessed:1, host_already_guessed:1,
+ init_finished:1, setup_packet_direction:1, packet_direction:1, check_extra_packets:1;
/*
if ndpi_struct->direction_detect_disable == 1
@@ -1235,17 +1236,10 @@ struct ndpi_flow_struct {
} http;
struct {
+ u_int8_t auth_found;
char username[16], password[16];
- } ftp;
-
- struct {
- char username[16], password[16];
- } imap;
-
- struct {
- char username[16], password[16];
- } pop;
-
+ } ftp_imap_pop_smtp;
+
struct {
/* Bittorrent hash */
u_char hash[20];