From 9e874301350a70a1ba40b5508878d559f68f8f4a Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 28 Jul 2026 16:38:04 +0200 Subject: refactor: generalized dynamic arrays with structures/array.h --- analyzer/capture.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'analyzer/capture.c') diff --git a/analyzer/capture.c b/analyzer/capture.c index 0a75e09..9c27850 100644 --- a/analyzer/capture.c +++ b/analyzer/capture.c @@ -1,5 +1,6 @@ #include "capture.h" +#include #include #include @@ -10,7 +11,7 @@ void capture_to_file(char *path) { char command[128]; - sprintf(command, "tshark -i %s -f \"src host %s\" -w %s", INTERFACE, SERVER_IP, path); + sprintf(command, "tshark -i %s -f \"host %s\" -w %s", INTERFACE, SERVER_IP, path); system(command); } @@ -20,7 +21,7 @@ void capturing_mode(char *path) { return; } - char capture_dir[256], new_path[256], date_time[128]; + char capture_dir[PATH_MAX], new_path[PATH_MAX], date_time[128]; get_capture_dir(capture_dir); get_date_time_string(date_time); sprintf(new_path, "%s/capture-%s.pcap", capture_dir, date_time); -- cgit v1.2.3