Commit Graph

569 Commits

Author SHA1 Message Date
Guy Harris 3f0e5dad19 Add support for writing Frame Relay files in NetXRay format 2.x.
svn path=/trunk/; revision=7048
2003-01-30 22:38:47 +00:00
Jörg Mayer 758685ca0d AC_ARG_ENABLE takes 4 argument: The 3rd specifies what to do in case a
configure option is given on the command line. The value of the arguement
is passwd in the enableval variable. The 4th argument tells what to do in
case no command line argument was given.
This causes --disable-gtk2 (which is the default) to behave differently
from the case when no option is given.
I do not really understand where the difference in the behaviour of the
generated codes comes from, but I definitely see a difference.

Fixed all occurrences where the 3rd arguement was empty.

svn path=/trunk/; revision=7044
2003-01-30 10:20:47 +00:00
Guy Harris 8e6518ea60 In the BSDs, ARCNET packets don't have an offset field between the
addresses and the protocol type, as supplied by BPF; on Linux, they *do*
have an offset field, as supplied by PF_PACKET sockets.  Add a new
WTAP_ENCAP_ARCNET_LINUX, with packets that include the offset field, and
don't dissect an offset in WTAP_ENCAP_ARCNET packets.

Map a libpcap link-layer type of 129 to WTAP_ENCAP_ARCNET_LINUX; that
value was recently assigned to Linux-style ARCNET.

Add some more ARCNET protocol IDs.

For most protocol IDs, dissect an ATA 878.2 fragmentation header; don't
do it for RFC 1051 IP and ARP, and Diagnose packets.  Set the length of
the ARCNET protocol tree item appropriately.

Dissect both the RFC 1051 and RFC 1201 styles of IP and ARP over ARCNET,
and dissect the RFC 1201 style of RARP as well.

svn path=/trunk/; revision=6981
2003-01-23 04:04:01 +00:00
Jörg Mayer 8adf7a08fd Check for pcap in before /usr/local and stop on first hit
svn path=/trunk/; revision=6962
2003-01-21 20:38:32 +00:00
Guy Harris eeb05c3b1c From Marc Milgram: e-mail address update.
svn path=/trunk/; revision=6936
2003-01-17 23:54:19 +00:00
Guy Harris 2955489887 We don't know what, in captures with a major version number of 3,
indicates the subtype of an "Internetwork analyzer" capture; we've seen
only one such capture, and it was a frame relay capture, so we just wire
it to frame relay for now.

svn path=/trunk/; revision=6923
2003-01-14 19:52:47 +00:00
Guy Harris 61e9a95dba If it doesn't begin with FF 00 it can't be LANE LE Control; if it's
LANE, claimed to be LE Control, but doesn't begin with FF 00, call it
802.3.

svn path=/trunk/; revision=6901
2003-01-11 05:54:52 +00:00
Guy Harris fabf144b83 Rename the "version" argument to "process_header_records()" "maj_vers",
as it's the major version number.

Try using the first word of "rsvd" to determine whether a capture is an
ISDN capture or not in version 1 captures.

Version 1 captures look as if they might also have a REC_HEADER2 record
- it's longer than the ones in version 4 and 5 captures, but it still
appears to have a network subtype in the 5th byte.

Get rid of the heuristic that checks for WTAP_ENCAP_ISDN by looking at
the packet data; if we fail to recognize an ISDN capture, we should look
for stuff in the headers to determine whether the capture is one or not.

svn path=/trunk/; revision=6894
2003-01-10 09:04:44 +00:00
Guy Harris fbec15f6f2 It looks as if a value of 0xfa in the second byte of a REC_HEADER2
record might indicate an ISDN capture; treat that as an indication that
a capture is an ISDN capture.

svn path=/trunk/; revision=6893
2003-01-10 05:53:00 +00:00
Guy Harris 50e696df81 The Sniffer file formats include a file to identify raw cells; export
that flag in the ATM pseudo-header, and use it to determine whether a
frame is a raw cell or a reassembled frame, rather than using the AAL,
as you can have raw AAL5 cells in a capture.

svn path=/trunk/; revision=6889
2003-01-10 04:04:42 +00:00
Guy Harris 7be2e513c5 The checksum in DOS ATM Sniffer files appears to be stored in big-endian
format.

svn path=/trunk/; revision=6885
2003-01-09 04:36:26 +00:00
Guy Harris a0c5cac89d It appears that a channel number of 0 means DTE->DCE, and a channel
number of 1 means DCE->DTE, in DOS Sniffer ATM captures.

svn path=/trunk/; revision=6881
2003-01-09 01:55:13 +00:00
Guy Harris 2b5eab973e It appears that ATM sniffer files with 4.x versions 4.95 and greater
have a bogus record length for type 4 records, but earlier 4.x versions,
and 5.x versions, don't.

svn path=/trunk/; revision=6880
2003-01-09 01:38:30 +00:00
Guy Harris 94800ef0fb From Chris Waters: support Tazmen Sniffer Protocol and DLT_TZSP captures
from network-based libpcaps that use that protocol.

svn path=/trunk/; revision=6875
2003-01-08 05:03:54 +00:00
Guy Harris 4ef5d24633 It appears that the first two bytes of "xxz" are, in fact, the actual
length of the packet, and the second two bytes are the captured length
of the packet.  The old "length" value appears to be the captured length
of the packet as well; perhaps it's to be interpreted as the number of
bytes of data following the packet header (just in case there's padding,
for example).

Treat "ATM/", as an encapsulation string, as RFC 1483 ATM.  (It may
actually be raw ATM, but the only capture I've seen had, in the parts I
saw, only RFC 1483 traffic LLC/SNAP traffic.)

There are 8 bytes in front of the LLC/SNAP header in ATM captures; skip
them, for now.  (Perhaps they're a pseudo-header, giving VPI/VCI
information and stuff such as that?  Or perhaps that's in the record
header?)

svn path=/trunk/; revision=6871
2003-01-07 08:41:23 +00:00
Guy Harris f8a7dc5ad3 PRI captures appear to be the ISDN captures with padding.
The Windows Sniffer does *not* appear to know the difference between
802.3 and 802.3 multicast LANE traffic.

svn path=/trunk/; revision=6870
2003-01-07 07:16:24 +00:00
Guy Harris fdedaea568 If the Windows Sniffer writes out one of its ATM capture files in DOS
Sniffer format, it doesn't distinguish between LE Control and LANE
encapsulated LAN frames, so we can't rely on the ATM subtype being
correct even when reading DOS Sniffer captures - we force it to
TRAF_ST_LANE_LE_CTRL for LANE frames that begin with 0xff 0x00.

Move the calls to "infer_pkt_encap()" into "fix_pseudo_header()".

svn path=/trunk/; revision=6869
2003-01-07 06:46:50 +00:00
Guy Harris 2639f7f9dc Use some fields in the per-packet header for ATM to get the AAL type
and traffic type.

svn path=/trunk/; revision=6868
2003-01-07 06:09:08 +00:00
Guy Harris a2e3440370 Properly turn the raw ISDN channel number field into an actual channel
number.

Put in some commented-out code to deal with some end-of-packet crud in
some ISDN captures - not all ISDN captures have it, so we can't
unconditionally slice it out.

svn path=/trunk/; revision=6867
2003-01-07 03:52:59 +00:00
Guy Harris 553235d47d The direction flag for LAPB/X.25 and ISDN appears to be in the
bottommost bit of the 12th byte of "hdr.hdr_2_x.xxx".

svn path=/trunk/; revision=6866
2003-01-07 02:21:38 +00:00
Guy Harris 84bbc626d2 Update a comment.
svn path=/trunk/; revision=6865
2003-01-07 01:11:34 +00:00
Guy Harris a83be44e56 Properly turn the raw ISDN channel number field into an actual channel
number.

Put in some commented-out code to deal with some end-of-packet crud in
some ISDN captures - not all ISDN captures have it, so we can't
unconditionally slice it out.

svn path=/trunk/; revision=6863
2003-01-07 01:06:58 +00:00
Guy Harris db1246913e Cast "secs" to "double" before multiplying by 1000000, so that we don't
get an overflow if secs*1000000 doesn't fit in 31 bits.

svn path=/trunk/; revision=6858
2003-01-06 20:30:38 +00:00
Guy Harris 705bf9a6cb Don't interpret NET_HDLC as LAPB/X.25 - sometimes it's some other
HDLC-flavored encapsulation (or, at least, it was in at least one
capture).  Instead, treat it as WTAP_ENCAP_PER_PACKET, and infer the
packet type, as we do for NET_ROUTER.

For NET_ROUTER captures, if the ISDN channel number is zero, infer the
packet type from the contents, rather than wiring it to PPP - it might
be, for example, Cisco or Wellfleet HDLC.

Fix the check for Cisco HDLC to look for 0x0F 0x00 and 0x8F 0x00, as
0x0F, not 0x08, is the unicast address in Cisco HDLC.

When fixing the pseudo-header, fix it for WTAP_ENCAP_WFLEET_HDLC,
WTAP_ENCAP_CHDLC, and WTAP_ENCAP_PPP_WITH_PHDR, as well as for
WTAP_ENCAP_ISDN, as the three ones listed don't use x25.flags, they use
p2p.sent.

svn path=/trunk/; revision=6850
2003-01-06 00:03:43 +00:00
Guy Harris e56b77f4cd Add support for SDLC encapsulation in DOS Sniffer captures; that
includes adding an SDLC dissector.

svn path=/trunk/; revision=6848
2003-01-03 22:31:26 +00:00
Guy Harris deadb2896c Well, at least some version 5 captures have type 7 records, and they
appear to look like the type 7 records in version 4 captures.

Note that sometimes the subtype is misleading.

svn path=/trunk/; revision=6847
2003-01-03 20:42:52 +00:00
Guy Harris d0606b986a Well, it's not as simple as "version 5 internetwork analyzer captures
hide the subtype in the reserved field in the version number", alas....

svn path=/trunk/; revision=6845
2003-01-03 20:09:01 +00:00
Guy Harris 4750bf47a7 Add some more comments.
svn path=/trunk/; revision=6843
2003-01-03 08:00:51 +00:00
Guy Harris ae6cb2b4e3 Get rid of some bogus commented-out statements.
svn path=/trunk/; revision=6842
2003-01-03 07:54:01 +00:00
Guy Harris eaea31134c It appears there are, indeed, two fields in the "xxb" part of the file
header that specify the detailed capture type for WAN captures; use
those fields.

svn path=/trunk/; revision=6841
2003-01-03 07:51:26 +00:00
Guy Harris 0a5be3f18b Rename WTAP_ENCAP_ATM_SNIFFER to WTAP_ENCAP_ATM_PDUS, as it's not just
used for the DOS-based ATM Sniffer.  (That's not a great name, but I
couldn't think of a better one.)

Add a new WTAP_ENCAP_ATM_PDUS_UNTRUNCATED encapsulation type for capture
files where reassembled frames don't have trailers, such as the AAL5
trailer, chopped off.  That's what at least some versions of the
Windows-based ATM Sniffer appear to have.

Map the ATM capture file type for NetXRay captures to
WTAP_ENCAP_ATM_PDUS_UNTRUNCATED, and put in stuff to fill in what we've
reverse-engineered, so far, for the pseudo-header; there's more that
needs to be done on it, e.g. getting the channel, AAL type, and traffic
type (or inferring them if they're not in the packet header).

svn path=/trunk/; revision=6840
2003-01-03 06:45:45 +00:00
Guy Harris decd1f84d1 Add support for version 002.000, and note that there's probably
something hidden in the per-packet header for ATM captures that
specifies the traffic type (and stuff such as that).

svn path=/trunk/; revision=6839
2003-01-03 02:24:56 +00:00
Guy Harris 785413e7c0 Update some comments.
Make the "fs" and "flags" fields in type 6 records unsigned, as they are
in other per-frame records - they're probably the same set of flag bits.

svn path=/trunk/; revision=6814
2002-12-20 22:30:15 +00:00
Guy Harris 156254096a Add an item for Wellfleet HDLC.
svn path=/trunk/; revision=6813
2002-12-20 21:59:33 +00:00
Guy Harris 9284c8f86d Make "infer_pkt_encap()" take a pointer and length as arguments.
Update some comments.

svn path=/trunk/; revision=6812
2002-12-20 21:58:46 +00:00
Guy Harris 9a6a8177e4 Supply more information about "WAN/Synchronous" captures.
svn path=/trunk/; revision=6811
2002-12-20 21:23:02 +00:00
Richard Sharpe 13970cc2eb This adds the beginning of support for Wellfleet HDLC to ngsniffer.c as
well as Cisco HDLC support. It compiles OK, but I do not claim that it is
not borken.

I will have to add a small dissector that eats the first two bytes and then
calls the Ethernet dissector as well, to complete the work.

svn path=/trunk/; revision=6809
2002-12-20 05:40:52 +00:00
Olivier Abad b8c787a7ab - some radcom files seem to have a different magic key than the one we
use : 42:f9:02:34:12:66:22:88 instead of 42:d2:00:34:12:66:22:88
  We should accept both (perhaps bytes 2 and 3 are a version number ?)

- the code which looks for the "capture start time" is wrong.
  Apparently, we should look for the string "Active Time" in the file.
  The "frame_date" structure which contains the capture start time is
  found 32 bytes before this string.

svn path=/trunk/; revision=6794
2002-12-17 21:53:57 +00:00
Guy Harris 7280374f3d Add support for the new DLT_ value of 127, for the AVS WLAN header.
svn path=/trunk/; revision=6780
2002-12-11 22:45:24 +00:00
Guy Harris c3674ba31c Sigh. We really *do* have to check whether a capture is a snoop or
Surveyor capture, as there's one link-layer type that UNICOS/mp snoop
treats one way and Shomiti Surveyor treats another way.  The only way to
check that is to look at the first record to see how much padding it
has.

svn path=/trunk/; revision=6750
2002-12-05 22:33:11 +00:00
Guy Harris 4056129fef Add a "--with-extra-gcc-checks" option, which causes "-Wcast-qual
-Wcast-align" to be added to CFLAGS (except in Wiretap, where we already
do "-Wcast-qual").  We don't do them by default, as they produce some
warnings that aren't easy to eliminate; if we figure out how to
eliminate them on all platforms (or at least, on the platforms where you
*can't* eliminate them, reduce them to a low level), we can make those
options the default.

svn path=/trunk/; revision=6689
2002-11-28 04:21:31 +00:00
Guy Harris 08044b0409 Add "-Wcast-qual" to the list of "-W" flags, so we catch code that could
attempt to store through a const pointer.

svn path=/trunk/; revision=6680
2002-11-27 22:24:27 +00:00
Guy Harris a40e352b26 The "pd" argument to "wtap_process_pcap_packet()" is a const pointer;
when extracting the ATM pseudo-header from the data it points to, cast
it to a "const struct sunatm_hdr *".

svn path=/trunk/; revision=6679
2002-11-27 22:23:34 +00:00
Guy Harris 50256af1c8 The arguments to the "pntoh" and "pletoh" macros could be const
pointers, so cast them to "const guint8 *".

svn path=/trunk/; revision=6678
2002-11-27 22:21:41 +00:00
Guy Harris 2fed18defb AIX's tcpdump has the same annoying habit as AIX's iptrace of putting 3
bytes of padding in front of FDDI frames; strip it off.

svn path=/trunk/; revision=6647
2002-11-16 20:20:30 +00:00
Guy Harris bb240540bd From Brian Ginsbach: upport for additional snoop file encapsulations in
UNICOS/mp.

svn path=/trunk/; revision=6621
2002-11-13 21:49:58 +00:00
Guy Harris f37932ff64 Update comments to reflect some information inferred from the Sniffer
documentation.

svn path=/trunk/; revision=6605
2002-11-10 20:52:56 +00:00
Guy Harris cc293e051d It appears that 0x80 in the fs field of an ISDN packet means "network to
user", not "user to network" (SETUP messages are generally sent *to* the
network).

svn path=/trunk/; revision=6592
2002-11-09 08:07:19 +00:00
Guy Harris 70c5b343bf Attempt to handle REC_HEADER2 records in major version 2 DOS Sniffer
captures.

svn path=/trunk/; revision=6591
2002-11-09 07:31:17 +00:00
Guy Harris 8ee4a65f76 From Solomon Peachy: support for new "wlancap" 802.11 extra-information
header.

Add overflow checks to "BYTES_ARE_IN_FRAME()", and cast all arguments to
unsigned values (negative values should never be passed) to squelch
compiler warnings.

svn path=/trunk/; revision=6567
2002-11-06 21:49:34 +00:00