aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.h
diff options
context:
space:
mode:
authorFábio Depin <fabio@seti.com.br>2025-07-02 02:41:55 -0300
committerGitHub <noreply@github.com>2025-07-02 07:41:55 +0200
commit4eff2cdb9991eed51e7e00e4dcc2f5fa1955cf17 (patch)
tree33cb5d858bfae49cae07c7e8f004bcc8460e1c7d /example/reader_util.h
parent17e1ed00c597f2493ef5ad9587e341a8aea5c6e6 (diff)
Refactor: make src_name/dst_name dynamically allocated to reduce RAM usage (#2908)
- Changed ndpi_flow_info: replaced fixed-size char arrays (always INET6_ADDRSTRLEN) for src_name and dst_name with char* pointers. - Now IPv4 flows use only INET_ADDRSTRLEN when needed, instead of always reserving IPv6 size.
Diffstat (limited to 'example/reader_util.h')
-rw-r--r--example/reader_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/reader_util.h b/example/reader_util.h
index 56195a2e0..c49237b9f 100644
--- a/example/reader_util.h
+++ b/example/reader_util.h
@@ -195,7 +195,7 @@ typedef struct ndpi_flow_info {
u_int16_t vlan_id;
ndpi_packet_tunnel tunnel_type;
struct ndpi_flow_struct *ndpi_flow;
- char src_name[INET6_ADDRSTRLEN], dst_name[INET6_ADDRSTRLEN];
+ char *src_name, *dst_name;
u_int8_t ip_version;
u_int32_t cwr_count, src2dst_cwr_count, dst2src_cwr_count;
u_int32_t ece_count, src2dst_ece_count, dst2src_ece_count;