diff options
author | Jouni Malinen <j@w1.fi> | 2015-11-26 22:10:53 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2015-11-26 22:10:53 (GMT) |
commit | e929eb39d6d874f694cb66b7aea7d112880993c7 (patch) | |
tree | 7db3333e15d24a7f5810aacf6f2789ec6ae47c19 /wlantest/readpcap.c | |
parent | b25f04d44a9482681afa48959ba9c9caf1cb1f7b (diff) | |
download | hostap-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/readpcap.c')
-rw-r--r-- | wlantest/readpcap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wlantest/readpcap.c b/wlantest/readpcap.c index 7c3ce18..6c3853b 100644 --- a/wlantest/readpcap.c +++ b/wlantest/readpcap.c @@ -102,6 +102,8 @@ int read_cap_file(struct wlantest *wt, const char *fname) write_pcap_with_radiotap(wt, data, hdr->caplen); else pcap_dump(wt->write_pcap_dumper, hdr, data); + if (wt->pcap_no_buffer) + pcap_dump_flush(wt->write_pcap_dumper); } if (hdr->caplen < hdr->len) { add_note(wt, MSG_DEBUG, "pcap: Dropped incomplete " |