int want_macs = 1;
static void cb_no_macs(const char *arg _unused_) { want_macs = 0; }
+int want_lastseen = 1;
+static void cb_no_lastseen(const char *arg _unused_) { want_lastseen = 0; }
+
unsigned short bindport = 667;
static void cb_port(const char *arg) { bindport = parsenum(arg, 65536); }
static void cb_highest_port(const char *arg)
{ highest_port = parsenum(arg, 65535); }
+int want_hexdump = 0;
+static void cb_hexdump(const char *arg _unused_) { want_hexdump = 1; }
+
/* --- */
struct cmdline_arg {
{"--no-promisc", NULL, cb_no_promisc, 0},
{"--no-dns", NULL, cb_no_dns, 0},
{"--no-macs", NULL, cb_no_macs, 0},
+ {"--no-lastseen", NULL, cb_no_lastseen, 0},
{"-p", "port", cb_port, 0},
{"-b", "bindaddr", cb_bindaddr, 0},
{"-f", "filter", cb_filter, 0},
{"--ports-max", "count", cb_ports_max, 0},
{"--ports-keep", "count", cb_ports_keep, 0},
{"--highest-port", "port", cb_highest_port, 0},
+ {"--hexdump", NULL, cb_hexdump, 0},
{NULL, NULL, NULL, 0}
};
}
verbosef("max %u ports per host, cutting down to %u when exceeded",
ports_max, ports_keep);
+
+ if (want_hexdump && !want_verbose) {
+ want_verbose = 1;
+ verbosef("--hexdump implies --verbose");
+ }
+
+ if (want_hexdump && want_daemonize) {
+ want_daemonize = 0;
+ verbosef("--hexdump implies --no-daemon");
+ }
}
static void