Commit Graph

33 Commits

Author SHA1 Message Date
Guy Harris 27ca639e86 Register an "osinl" dissector table for ISO/IEC TR 9577 NLPID values,
and have dissectors for protocols that run at the OSI network layer
register themselves with it using "dissector_add()".

Make various dissectors static if they can be, and remove from header
files declarations of those dissectors.

svn path=/trunk/; revision=1873
2000-04-17 01:36:31 +00:00
Guy Harris 0ba3e2b233 Register a "llc.dsap" dissector table for 802.2 LLC, and have dissectors
for protocols that run inside 802.2 LLC register themselves with it
using "dissector_add()".

Make various dissectors static if they can be, and remove from header
files declarations of those dissectors.

svn path=/trunk/; revision=1872
2000-04-17 00:32:43 +00:00
Laurent Deniel a5719d1448 Remove TODO comments about NSAP and ISIS decodings since
this is implemented now.

svn path=/trunk/; revision=1868
2000-04-16 09:10:53 +00:00
Guy Harris c9d4dd080d Ralf Schneider's changes to enhance to OSI CLNP, CLTP, and ISIS support
and to add OSI ESIS support.

svn path=/trunk/; revision=1865
2000-04-15 22:11:26 +00:00
Guy Harris 26ca4597f6 In the COTP dissector, don't forcibly set the protocol to COTP if we
find a COTP PDU - we might have called a subdissector, which would have
set the protocol itself.  Do so only if we've not seen any DT PDUs on
which we've called a subdissector.

svn path=/trunk/; revision=1864
2000-04-15 21:27:12 +00:00
Guy Harris 9ec3cb0c17 Alas, one can't count on CLNP packets with a destination NSEL of 0x21
being COTP packets, so we make "dissect_cotp_internal()" return FALSE if
it saw no valid COTP packets, and return TRUE and set the COL_PROTOCOL
field to COTP if it saw at least one valid COTP packet, and have
"dissect_cotp()" dissect the packet as raw data if
"dissect_cotp_internal()" returns FALSE (for the benefit of callers such
as X.25).

svn path=/trunk/; revision=1861
2000-04-15 07:26:57 +00:00
Guy Harris 823398834b If an NPDU contains multiple concatenated TPDUs, dissect all of them.
Fix up some spacing problems in the INFO field of CLNP packets.

Dissect only the payload of DT and MD NPDUs as COTP; the payload of
other packets isn't to be so dissected (ER NPDUs are like ICMP error
packets, in that they contain the network-layer header and zero or more
bytes of the payload of the offending packet, for example).

svn path=/trunk/; revision=1860
2000-04-15 06:47:43 +00:00
Guy Harris e70b4f7700 Set the COL_PROTOCOL column to "ISIS" in the ISIS dissector, rather than
in its caller.

Set the COL_PROTOCOL column to "COTP" in the COTP dissector, rather than
in the dissectors it calls, so that it's done for all frames we hand to
that dissector.

Set the COL_INFO field for COTP packets we don't dissect because the
length indicator is zero, or the frame is too short, or the PDU type is
bogus.

svn path=/trunk/; revision=1842
2000-04-13 08:14:35 +00:00
Guy Harris dccffa9d2f Add CLNP PDU types other than DT and ER.
Fix the TPDU code numeric value to be "0x%x" rather than "Ox%x".

Add a COL_INFO field for CLNP PDUs whose payload we don't dissect as
COTP.

Don't dissect segments other than the first derived PDU of a segmented
CLNP PDU (just as we do with fragments other than the first fragment of
a fragmented IP datagram).

svn path=/trunk/; revision=1841
2000-04-13 07:52:55 +00:00
Guy Harris 5b81d92b45 Fix a typo.
Use "%u" rather than a hex format to print length values and segment
offsets, and use "%u" rather than "%d" to print unsigned values.

In the CLNP dissector, chop off the payload and captured-payload lengths
based on the segment length (along the lines of what we do for IP).

svn path=/trunk/; revision=1839
2000-04-13 06:09:35 +00:00
Gilbert Ramirez f6e92a9e93 Break proto_tree_add_item_format() into multiple functions:
proto_tree_add_protocol_format()
	proto_tree_add_uint_format()
	proto_tree_add_ipxnet_format()
	proto_tree_add_ipv4_format()
	proto_tree_add_ipv6_format()
	proto_tree_add_bytes_format()
	proto_tree_add_string_format()
	proto_tree_add_ether_format()
	proto_tree_add_time_format()
	proto_tree_add_double_format()
	proto_tree_add_boolean_format()
If using GCC 2.x, we can check the print-format against the variable args
passed in. Regardless of compiler, we can now check at run-time that the
field type passed into the function corresponds to what that function
expects (FT_UINT, FT_BOOLEAN, etc.)

Note that proto_tree_add_protocol_format() does not require a value field,
since the value of a protocol is always NULL. It's more intuitive w/o the
vestigial argument.

Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c
Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*)

Checked in Guy's fix for the function declearation for proto_tree_add_text()
and proto_tree_add_notext().

svn path=/trunk/; revision=1713
2000-03-12 04:48:32 +00:00
Guy Harris fa942a502f Gerrit Gehnen's dissector for the Sinec H1 protocol (Siemens Industrial
Ethernet; used for communication with Siemens S5 PLC's over Ethernet),
and his changes to display OSI COTP TSAPs that consist solely of
printable characters as text rather than as hex data and to decode the
version number resource in COTP.

svn path=/trunk/; revision=1677
2000-03-02 07:27:05 +00:00
Gilbert Ramirez ddfa11e870 Create a header file for every packet-*.c file. Prune the packet.h file.
This change allows you to add a new packet-*.c file and not cause a
recompilation of everything that #include's packet.h

Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list.

Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol
is not defined, squelching a compiler complaint when compiling the generated
C file.

svn path=/trunk/; revision=1637
2000-02-15 21:06:58 +00:00
Guy Harris 31ff2ea5f1 Add a bunch of additional NLPIDs from ISO 9577.
svn path=/trunk/; revision=1583
2000-01-30 05:50:02 +00:00
Guy Harris 01e6fa1a24 In "dissect_clnp()", fill in "clnp" before looking at it.
svn path=/trunk/; revision=1567
2000-01-26 05:04:29 +00:00
Guy Harris f2246ebb65 Fix a bunch of dissectors to use "pi.captured_len" rather than
"fd->cap_len" for the frame length - or to use macros such as
"BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which
use "pi.captured_len" - so that they correctly handle frames where the
actual data length of the packet is less than the size of the raw frame,
e.g. with encapsulations such as ISL.

svn path=/trunk/; revision=1530
2000-01-24 03:33:35 +00:00
Guy Harris 0ce1dab01d Gerrit Gehnen's patch to add support for the "Inactive Subset" of the
ISO 8473 CLNP protocol.

svn path=/trunk/; revision=1513
2000-01-20 19:16:41 +00:00
Guy Harris b558dc21ec Get the NLPID value for ISIS from "nlpid.h", and report the NLPID value
in ISIS packets with "nlpid_vals".

Report the NLPID value in CLNP packets with "nlpid_vals" as well.

svn path=/trunk/; revision=1462
2000-01-13 06:07:53 +00:00
Guy Harris 7368e42aac Add the NLPID value for PPP.
In Q.931 and Q.2931, the TR 9577 values are NLPIDs, so use "nlpid_vals"
to dissect them, and values from "nlpid.h" to refer to them.

svn path=/trunk/; revision=1461
2000-01-13 05:41:24 +00:00
Guy Harris 35a0a0ada4 Export the list of OSI NLPIDs in "nlpid.h", for use by the CDP
dissector.

Add a "value_string" table for NLPIDs to the OSI dissector, and export
it for use by the CDP dissector.

Fix the CDP dissector as per the documentation in

	http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm

and as per some traces we have with CDP data in them.

svn path=/trunk/; revision=1455
2000-01-13 00:41:11 +00:00
Guy Harris 096134536e Stuart Stanley's ISIS dissection support.
svn path=/trunk/; revision=1340
1999-12-15 04:34:44 +00:00
Guy Harris a7aba0a288 Replace the ETT_ "enum" members, declared in "packet.h", with
dynamically-assigned "ett_" integer values, assigned by
"proto_register_subtree_array()"; this:

	obviates the need to update "packet.h" whenever you add a new
	subtree type - you only have to add a call to
	"proto_register_subtree_array()" to a "register" routine and an
	array of pointers to "ett_", if they're not already there, and
	add a pointer to the new "ett_" variable to the array, if they
	are there;

	would allow run-time-loaded dissectors to allocate subtree types
	when they're loaded.

svn path=/trunk/; revision=1043
1999-11-16 11:44:20 +00:00
Gilbert Ramirez bacb9d5bae New proto_tree header_field_info stuff. Header_field_infos now contain
the base for numbers to be displayed in, bitmasks for bitfields, and blurbs
(which are one or two sentences describing the field).

proto_tree_add*() routines now automatically handle bitfields. You tell
it which header field you are adding, and just pass it the value of the
entire field, and the proto_tree routines will do the masking and shifting
for you.

This means that bitfields are more naturally filtered via dfilter now.

Added Phil Techau's support for signed integers in dfilters/proto_tree.

Added the beginning of the SNA dissector. It's not complete, but I'm
committing it now because it has example after example of how to use
bitfields with the new header_field_info struct and proto_tree routines.
It was the impetus to change how header_field_info works.

svn path=/trunk/; revision=815
1999-10-12 06:21:15 +00:00
Laurent Deniel 86220d8c7a Convert OSI CLNP into new protocol tree dissectors.
svn path=/trunk/; revision=688
1999-09-18 15:51:31 +00:00
Laurent Deniel d7ce8a7805 Register cotp and clnp instead of simply osi to allow
display filtering on those protocols and future
enhancements (other OSI protocols decoding).

svn path=/trunk/; revision=662
1999-09-11 16:41:19 +00:00
Gilbert Ramirez 7bd6c15378 Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.

svn path=/trunk/; revision=402
1999-07-29 05:47:07 +00:00
Gilbert Ramirez 07f42b5b31 Created a new protocol tree implementation and a new display filter
mechanism that is built into ethereal. Wiretap is now used to read all
file formats. Libpcap is used only for capturing.

svn path=/trunk/; revision=342
1999-07-07 22:52:57 +00:00
Gilbert Ramirez ef3dfe2077 Removed all references to gtk objects from packet*.[ch] files. They now
reference the protocol tree with struct proto_tree and struct proto_item
objects. That way, the packet decoding source code file can be used with
non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged
some of the information in packet.h to more appropriate places (like other
packet-*.[ch] files).

svn path=/trunk/; revision=223
1999-03-23 03:14:46 +00:00
Gerald Combs 6ca358948b * Added column formatting functionality.
* Added check_col(), add_col_str() and add_col_fmt() to replace references
  to ft->win_info.
* Added column prefs handling code.

svn path=/trunk/; revision=97
1998-11-17 04:29:13 +00:00
Gilbert Ramirez fcb4c78a6a A lengthy patch to add the wiretap library. Wiretap is not used by default
because it is still in its infancy, but it can be compiled in optionally.
The library exists in its own subdirectory ethereal/wiretap. This patch also
edits all the packet-*.c files to remove the #include <pcap.h> line which is
unnecessary in these files. In the ethereal code, file.c is the most heavily
modified with #ifdef WITH_WIRETAP lines for the optional library.

svn path=/trunk/; revision=82
1998-11-12 00:06:47 +00:00
Laurent Deniel 23ab0b90bd too few arguments for sprintf format
svn path=/trunk/; revision=49
1998-10-13 17:56:41 +00:00
Gerald Combs 2e7e493198 Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to
   the tree view, and fixes a bunch of miscellaneous coding bugs.

svn path=/trunk/; revision=31
1998-09-27 22:12:47 +00:00
Gerald Combs 19176fbb4f * Added in Laurent's OSI/ISO CNLP and COTP support.
* Added Laurent's changes to the man (actually pod) page.
* Copied in VERSION file so that others can make doc/Makefile

svn path=/trunk/; revision=8
1998-09-17 02:01:50 +00:00