aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/wlantest.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-11-26 22:10:53 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-26 22:10:53 (GMT)
commite929eb39d6d874f694cb66b7aea7d112880993c7 (patch)
tree7db3333e15d24a7f5810aacf6f2789ec6ae47c19 /wlantest/wlantest.c
parentb25f04d44a9482681afa48959ba9c9caf1cb1f7b (diff)
downloadhostap-e929eb39d6d874f694cb66b7aea7d112880993c7.zip
hostap-e929eb39d6d874f694cb66b7aea7d112880993c7.tar.gz
hostap-e929eb39d6d874f694cb66b7aea7d112880993c7.tar.bz2
wlantest: Add -N command line argument to remove write buffering
This makes it easier to do live parsing of captured pcap files from wlantest without having to rename and restart the capture file. Packet writes are flushed to disk after each packet if -N is included in the command line. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wlantest/wlantest.c')
-rw-r--r--wlantest/wlantest.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/wlantest/wlantest.c b/wlantest/wlantest.c
index ab3b2fc..abe97d1 100644
--- a/wlantest/wlantest.c
+++ b/wlantest/wlantest.c
@@ -21,7 +21,7 @@ static void wlantest_terminate(int sig, void *signal_ctx)
static void usage(void)
{
- printf("wlantest [-cddhqqFt] [-i<ifname>] [-r<pcap file>] "
+ printf("wlantest [-cddhqqFNt] [-i<ifname>] [-r<pcap file>] "
"[-p<passphrase>]\n"
" [-I<wired ifname>] [-R<wired pcap file>] "
"[-P<RADIUS shared secret>]\n"
@@ -350,7 +350,7 @@ int main(int argc, char *argv[])
wlantest_init(&wt);
for (;;) {
- c = getopt(argc, argv, "cdf:Fhi:I:L:n:p:P:qr:R:tT:w:W:");
+ c = getopt(argc, argv, "cdf:Fhi:I:L:n:Np:P:qr:R:tT:w:W:");
if (c < 0)
break;
switch (c) {
@@ -383,6 +383,9 @@ int main(int argc, char *argv[])
case 'n':
wt.pcapng_file = optarg;
break;
+ case 'N':
+ wt.pcap_no_buffer = 1;
+ break;
case 'p':
add_passphrase(&wt, optarg);
break;