aboutsummaryrefslogtreecommitdiffstats
path: root/gg_sniff/gg_sniff.c
diff options
context:
space:
mode:
Diffstat (limited to 'gg_sniff/gg_sniff.c')
-rw-r--r--gg_sniff/gg_sniff.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gg_sniff/gg_sniff.c b/gg_sniff/gg_sniff.c
index 0714fdd..656c38c 100644
--- a/gg_sniff/gg_sniff.c
+++ b/gg_sniff/gg_sniff.c
@@ -63,14 +63,18 @@ main(int argc, char **argv)
int ggserv_port = GLOUGLOU_PROBE_DEFAULT_PORT;
int pcap_init = 0;
int loglevel = 0;
+ int active = 0;
int retval = -1;
int op;
if (geteuid() != 0)
errx(1, "must be root");
- while ((op = getopt(argc, argv, "hi:v")) != -1) {
+ while ((op = getopt(argc, argv, "ahi:v")) != -1) {
switch (op) {
+ case 'a':
+ active = 1;
+ break;
case 'h':
usage();
/* NOTREACHED */
@@ -106,7 +110,7 @@ main(int argc, char **argv)
ggcli = gg_client_connect(_ev_base, ggserv_ip, ggserv_port, NULL, NULL, NULL);
if (!ggcli)
goto quit;
- pcap_init = ggsniff_pcap_init(_ev_base, ggcli, net, iface);
+ pcap_init = ggsniff_pcap_init(_ev_base, ggcli, net, iface, active);
if (!pcap_init)
goto quit;