Created
June 19, 2019 17:49
-
-
Save ivelin/25ec18b74e01e3683ce502c938863102 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataset = pcap_io.PcapDataset(url_filenames, batch=1) | |
packets_total = 0 | |
for v in dataset: | |
(packet_timestamp, packet_data) = v | |
if packets_total == 0: | |
assert packet_timestamp.numpy()[0] == 1084443427.311224 # we know this is the correct value in the test pcap file | |
assert len(packet_data.numpy()[0]) == 62 # we know this is the correct packet data buffer length in the test pcap file | |
packets_total += 1 | |
assert packets_total == 43 # we know this is the correct number of packets in the test pcap file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment