-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have a clear distinction between public and private/internal API
- Loading branch information
Showing
9 changed files
with
77 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#ifndef __NDPI_PRIVATE_H__ | ||
#define __NDPI_PRIVATE_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Generic */ | ||
|
||
char *strptime(const char *s, const char *format, struct tm *tm); | ||
|
||
|
||
/* TLS */ | ||
int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow, uint32_t quic_version); | ||
void processCertificateElements(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow, | ||
u_int16_t p_offset, u_int16_t certificate_len); | ||
|
||
/* HTTP */ | ||
void http_process_user_agent(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow, | ||
const u_int8_t *ua_ptr, u_int16_t ua_ptr_len); | ||
|
||
/* OOKLA */ | ||
int ookla_search_into_cache(struct ndpi_detection_module_struct* ndpi_struct, | ||
struct ndpi_flow_struct* flow); | ||
void ookla_add_to_cache(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow); | ||
|
||
/* QUIC */ | ||
int quic_len(const uint8_t *buf, uint64_t *value); | ||
int quic_len_buffer_still_required(uint8_t value); | ||
int is_version_with_var_int_transport_params(uint32_t version); | ||
int is_version_with_tls(uint32_t version); | ||
void process_chlo(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow, | ||
const u_int8_t *crypto_data, uint32_t crypto_data_len); | ||
void process_tls(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow, | ||
const u_int8_t *crypto_data, uint32_t crypto_data_len); | ||
const uint8_t *get_crypto_data(struct ndpi_detection_module_struct *ndpi_struct, | ||
struct ndpi_flow_struct *flow, | ||
u_int8_t *clear_payload, uint32_t clear_payload_len, | ||
uint64_t *crypto_data_len); | ||
|
||
/* RTP */ | ||
int is_valid_rtp_payload_type(uint8_t type); | ||
|
||
/* Bittorrent */ | ||
u_int32_t make_bittorrent_host_key(struct ndpi_flow_struct *flow, int client, int offset); | ||
u_int32_t make_bittorrent_peers_key(struct ndpi_flow_struct *flow); | ||
|
||
/* Mining */ | ||
u_int32_t make_mining_key(struct ndpi_flow_struct *flow); | ||
|
||
/* Stun */ | ||
int stun_search_into_zoom_cache(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow); | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters