From f0d9f0c2dcc2029a907deee7981e7e5230b6d77c Mon Sep 17 00:00:00 2001 From: Mosder Date: Sat, 13 Jun 2026 20:14:51 +0200 Subject: feat: added the simple capturing packets mode --- main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index aa43e57..456b590 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,7 @@ #include #include +#include "analyzer/capture.h" #include "analyzer/utils/fs.h" // prints help @@ -21,12 +22,6 @@ void start_live_analyzer() { printf("Not implemented\n"); } -// starts the only capturing packets mode -void start_capturing_packets() { - // TODO: implement - printf("Not implemented\n"); -} - // analyzes the specified file // params: // - file_path - path to the .pcap file to be analyzed @@ -48,7 +43,7 @@ int main(int argc, char *argv[]) { start_live_analyzer(); } else if (strcmp("c", argv[1]) == 0 || strcmp("capture", argv[1]) == 0) { - start_capturing_packets(); + capturing_mode(argc >= 3 ? argv[2] : NULL); } else if (strcmp("h", argv[1]) == 0 || strcmp("help", argv[1]) == 0) { print_help(); -- cgit v1.2.3