Add support to wiretap for reading Sun "snoop" capture files.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 15 Nov 1998 05:29:17 +0000 (05:29 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 15 Nov 1998 05:29:17 +0000 (05:29 +0000)
commitcc4849031df00fd7e5b7c697aa2d7beedbf44734
tree46a497072e194a9ed5f20733549362347c4d6eef
parent9498d4375f396ce6c302565268be66d6a8128a12
Add support to wiretap for reading Sun "snoop" capture files.

That requires that, in the packet-reading loop, we pass to the callback
routine the offset in the file of a packet's data, because we can no
longer compute that offset by subtracting the size of the captured
packet data from the offset in the file after the data was read -
"snoop" may stick padding in after the packet data to align packet
headers on 4-byte boundaries.

Doing that required that we arrange that we do that for "libpcap"
capture files as well; the cleanest way to do that was to write our own
code for reading "libpcap" capture files, rather than using the
"libpcap" code to do it.

Make "wtap_dispatch_cb()" and "pcap_dispatch_cb()" static to "file.c",
as they're not used elsewhere.

If we're using wiretap, don't define in "file.h" stuff used only when
we're not using wiretap.

Update the wiretap README to reflect Gilbert's and my recent changes.

Clean up some memory leaks in "wiretap/lanalyzer.c" and
"wiretap/ngsniffer.c", where the capture-file-format-specific data
wasn't freed if the open failed.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@91 f5534014-38df-0310-8fa8-9805f1628bb7
24 files changed:
Makefile.in
acconfig.h
aclocal.m4
capture.c
config.h.in
configure
configure.in
file.c
file.h
wiretap/Makefile
wiretap/Makefile.am
wiretap/Makefile.in
wiretap/README
wiretap/configure
wiretap/configure.in
wiretap/file.c
wiretap/lanalyzer.c
wiretap/libpcap.c [new file with mode: 0644]
wiretap/libpcap.h [new file with mode: 0644]
wiretap/ngsniffer.c
wiretap/snoop.c [new file with mode: 0644]
wiretap/snoop.h [new file with mode: 0644]
wiretap/wtap.c
wiretap/wtap.h