Have a clear distinction between public and private/internal API (#2137)
1) Public API/headers in `src/include/` [as it has always been] 2) Private API/headers in `src/lib/` Try to keep the "ndpi_" prefix only for the public functions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "ndpi_api.h"
|
||||
#include "ndpi_private.h"
|
||||
#include "fuzz_common_code.h"
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -7,20 +8,6 @@
|
||||
struct ndpi_detection_module_struct *ndpi_info_mod = NULL;
|
||||
struct ndpi_flow_struct *flow = NULL;
|
||||
|
||||
extern 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);
|
||||
extern 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,
|
||||
uint32_t version);
|
||||
extern 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);
|
||||
extern int is_version_with_tls(uint32_t version);
|
||||
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
const u_int8_t *crypto_data;
|
||||
uint64_t crypto_data_len;
|
||||
@@ -56,7 +43,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
if(!is_version_with_tls(version)) {
|
||||
process_chlo(ndpi_info_mod, flow, crypto_data, crypto_data_len);
|
||||
} else {
|
||||
process_tls(ndpi_info_mod, flow, crypto_data, crypto_data_len, version);
|
||||
process_tls(ndpi_info_mod, flow, crypto_data, crypto_data_len);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user