New issue 46 by stuart.john.m: PCAP Nano Support
http://code.google.com/p/dpkt/issues/detail?id=46
What steps will reproduce the problem?
First off, if you run this code from the tutorial with the added print
statement.
#!/usr/bin/env python
import dpkt
f = open('test.pcap')
pcap = dpkt.pcap.Reader(f)
for ts, buf in pcap:
eth = dpkt.ethernet.Ethernet(buf)
ip = eth.data
tcp = ip.data
if tcp.dport == 80 and len(tcp.data) > 0:
http = dpkt.http.Request(tcp.data)
print http.uri
print ts
f.close()
You will see a number similar to this
1234567890.12
Where is the microsecond resolution?
What is the expected output? What do you see instead?
1234567890.123456789 would be the expected output (like wireshark when it
opens the same file)
What version of the product are you using? On what operating system?
Version 1.7
Linux Fedora Core 11
Please provide any additional information below.
In addition to this I would like to modify the code so it works with the
nano extensions to pcap, which gives the time format 3 extra digits after
the 0 for the time stamp. Any suggestions on where to start to parse this
data differently ??