aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/monitor.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-05-26 16:39:48 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-26 17:58:42 (GMT)
commitba2beacc974c2ab9576e86707a0d3ccfb5f93c1b (patch)
treeae67dcd4d96be224105241cf15f08c987f559b85 /wlantest/monitor.c
parenteb4737f6df53079ded33825323fb3217bd625f57 (diff)
downloadhostap-ba2beacc974c2ab9576e86707a0d3ccfb5f93c1b.zip
hostap-ba2beacc974c2ab9576e86707a0d3ccfb5f93c1b.tar.gz
hostap-ba2beacc974c2ab9576e86707a0d3ccfb5f93c1b.tar.bz2
wlantest: Add support for writing pcapng files
The new -n<file> command line argument can be used to request wlantest to write all read or captured frames into a pcapng file. This is similar to the -w argument, but with pcapng allowing per-frame comments to be embedded in the file. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wlantest/monitor.c')
-rw-r--r--wlantest/monitor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wlantest/monitor.c b/wlantest/monitor.c
index 902e6d9..afcc380 100644
--- a/wlantest/monitor.c
+++ b/wlantest/monitor.c
@@ -27,8 +27,12 @@ static void monitor_read(int sock, void *eloop_ctx, void *sock_ctx)
return;
}
+ clear_notes(wt);
+ os_free(wt->decrypted);
+ wt->decrypted = NULL;
write_pcap_captured(wt, buf, len);
wlantest_process(wt, buf, len);
+ write_pcapng_captured(wt, buf, len);
}