diff options
author | Luca Deri <deri@ntop.org> | 2018-11-14 15:24:15 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2018-11-14 15:24:15 +0100 |
commit | 977751efdbe61374bbe54f709b3fd6c1b971a9d6 (patch) | |
tree | 129f3eb955b343b94b56db0310f729cc4ee2da33 /src/lib/ndpi_main.c | |
parent | 771a6e9aab9b75d75ed8a7b7713a84baccbaf541 (diff) |
Added ndpi_flowv4_flow_hash and ndpi_flowv6_flow_hash skeletons for
implementing https://github.com/corelight/community-id-spec
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 8e9bb53fc..3a6cd84ef 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6063,3 +6063,27 @@ u_int ndpi_get_ndpi_detection_module_size() { void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l) { ndpi_mod->ndpi_log_level = l; } + +/* ******************************************************************** */ + +/* + NOTE: + - Leave fields empty/zero when information is missing (e.g. with ICMP ports are zero) + - The hash_buf most be 30+1 bits or longer + - Return code: 0 = OK, -1 otherwise + */ + +int ndpi_flowv4_flow_hash(u_int8_t l4_proto, u_int32_t src_ip, + u_int32_t dst_ip, u_int16_t src_port, u_int16_t dst_port, + u_int8_t icmp_type, u_int8_t icmp_code, + u_char *hash_buf, u_int8_t hash_buf_len) { + + return(0); /* OK */ +} + +int ndpi_flowv6_flow_hash(u_int8_t l4_proto, struct ndpi_in6_addr *src_ip, struct ndpi_in6_addr *dst_ip, + u_int16_t src_port, u_int16_t dst_port, u_int8_t icmp_type, u_int8_t icmp_code, + u_char *hash_buf, u_int8_t hash_buf_len) { + + return(0); /* OK */ +} |