From 86ae0fe980d8d4dee5eb8ebff620c37b628e9527 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 16 Aug 2024 15:16:29 +0800 Subject: [PATCH] XMap 2.0.2 Minor Release XMap 2.0.1 Minor Release. Fix Bugs #23 and #24 Co-Authored-By: xiota <8353098+xiota@users.noreply.github.com> --- CMakeLists.txt | 2 +- lib/includes.h | 1 + src/state.c | 46 +++++++++++++++++++++++----------------------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43d6f63..c14f5a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) project(XMAP C) set(XMAP_VERSION DEVELOPMENT) # Change DEVELOPMENT to version number for release diff --git a/lib/includes.h b/lib/includes.h index 7ce1e89..6c9b92a 100644 --- a/lib/includes.h +++ b/lib/includes.h @@ -20,6 +20,7 @@ #include #include #include +#include #ifndef __APPLE__ #include diff --git a/src/state.c b/src/state.c index 341727f..8e6c3e3 100644 --- a/src/state.c +++ b/src/state.c @@ -30,13 +30,13 @@ struct state_conf xconf = { .max_probe_port_index_len = 32, .source_port_first = 32768, // (these are the default .source_port_last = 61000, // ephemeral range on Linux) - .iface = NULL, + .iface = 0, .gw_mac = {0x00}, .hw_mac = {0x00}, .gw_ip = {0x00}, .gw_mac_set = 0, .hw_mac_set = 0, - .source_ip_addresses = NULL, + .source_ip_addresses = 0, .number_source_ips = 0, .send_ip_pkts = 0, .rate = -1, @@ -52,33 +52,33 @@ struct state_conf xconf = { .senders = 1, .seed_provided = 0, .seed = 0, - .probe_module = NULL, - .probe_args = NULL, + .probe_module = 0, + .probe_args = 0, .probe_ttl = MAXTTL, - .output_module = NULL, - .output_args = NULL, - .iid_module = NULL, - .iid_args = NULL, + .output_module = 0, + .output_args = 0, + .iid_module = 0, + .iid_args = 0, .iid_num = 1, - .output_filename = NULL, - .blocklist_filename = NULL, - .allowlist_filename = NULL, - .list_of_ips_filename = NULL, + .output_filename = 0, + .blocklist_filename = 0, + .allowlist_filename = 0, + .list_of_ips_filename = 0, .list_of_ip_port_count = 0, .list_of_ip_port_index_count = 0, - .metadata_filename = NULL, - .metadata_file = NULL, - .notes = NULL, - .custom_metadata_str = NULL, - .raw_output_fields = NULL, - .output_fields = NULL, - .output_filter_str = NULL, + .metadata_filename = 0, + .metadata_file = 0, + .notes = 0, + .custom_metadata_str = 0, + .raw_output_fields = 0, + .output_fields = 0, + .output_filter_str = 0, .output_fields_len = 0, .log_level = XLOG_INFO, .syslog = 0, - .log_file = NULL, - .log_directory = NULL, - .status_updates_file = NULL, + .log_file = 0, + .log_directory = 0, + .status_updates_file = 0, .dryrun = 0, .quiet = 0, .filter_duplicates = 0, @@ -87,7 +87,7 @@ struct state_conf xconf = { .recv_ready = 0, .min_hitrate = (float) 0.0, .data_link_size = 0, - .config_filename = NULL, + .config_filename = 0, }; // global sender stats and defaults