New issue 51 by keisuke.nishimoto: Snoop file parser
http://code.google.com/p/dpkt/issues/detail?id=51
I needed to parse packet capture files created by Solaris snoop command and
I wrote a snoop file parser, which works mostly in the same way as the
existing pcap.py. Currently it supports only the Ethernet format. I took
the constants from snoop.h in OpenSolaris.
The snoop file format is described in RF1761.
Attachments:
snoop.py 2.9 KB
Thanks - committed, and added you to AUTHORS :-)
Comment #2 on issue 51 by dugsong: Snoop file parser
http://code.google.com/p/dpkt/issues/detail?id=51
(No comment was entered for this change.)
The lasted build doesn't include the snoop.py file. I downloaded it from
svn. But I don't know how to use it? Could you give me some examples?
Yeah. It works on snoop file.
I noticed __init__.py does not include a line "import snoop". Suppose it
is added, you can read packets from a snoop file in the same way as pcap:
from dpkt import ethernet, snoop
f = file("packet.snoop", "rb")
for ts, buf in snoop.Reader(f):
eth = ethernet.Ethernet(buf)