Commit Graph

46 Commits

Author SHA1 Message Date
Guy Harris a12371ae60 From Hannes Gredler:
- unify the IS-IS CLV space
  IS-IS uses a unified CLV space across all Level and PDU Types
  there is no need to define PDU- and Level- Specific CLV
  Types;

- clean up Authentication CLV
  TLV #10 is the official supported TLV for carrying authentication
  information- todays code displays TLV #10 as non-standard which
  is wrong;
  also the notion of "Domain" "Authentication" and "Link" password
  has disappeared from contemporary routing SW;

- add IP Authentication CLV dissector
  this CLV is depreciated - however it is using different semantics
  than TLV #10 so we need a dedicated dissector;

- add Checksum CLV dissector
  add support for RFC 3358 Checksum CLVs
  majority of code re-used from the LSP checksum verification
  dissector.

svn path=/trunk/; revision=9204
2003-12-08 20:40:33 +00:00
Guy Harris 6341212165 Fix the ATT bit definitions.
svn path=/trunk/; revision=9037
2003-11-19 09:58:37 +00:00
Guy Harris 28c73939f3 From Laurent Rabret: show checksum status in a sub-item for the checksum
field, and add a "bad checksum" filterable field.

svn path=/trunk/; revision=7757
2003-05-28 22:39:14 +00:00
Guy Harris 64840abd9f From Laurent Rabret:
fix a bug where bad IPv4 and IPv6 prefix lengths could cause a
	buffer overflow;

	check the checksum in LSP packets.

svn path=/trunk/; revision=7675
2003-05-15 06:35:02 +00:00
Guy Harris e29579a74a Typo fix, from Laurent Rabret.
svn path=/trunk/; revision=7599
2003-04-29 16:57:05 +00:00
Guy Harris dea1bf4adb From Laurent Rabret: add support for Multi Topology Reachable IPv4
Prefixes and Multi Topology Reachable IPv6 Prefixes from
draft-ietf-isis-wg-multi-topology-06.

svn path=/trunk/; revision=7400
2003-04-03 05:22:11 +00:00
Guy Harris 47cdc34fcf Fix a typo.
svn path=/trunk/; revision=7389
2003-03-31 23:37:37 +00:00
Guy Harris f7b398f799 The "attached_string" doesn't apply to the attachments, so call it
"supported_string", instead, as it is used to indicate whether partition
repair is supported.

Fix a typo.

svn path=/trunk/; revision=7384
2003-03-31 07:37:23 +00:00
Guy Harris a9965dd468 From Hannes Gredler:
- TLV 135 cleanup and support for subTLVs
	- a common IP Reach subTLV dissector which dissects
	    subTLV 1 & 2 [32 & 64 Bit Admin Tags as per
	    draft-ietf-isis-admin-tags-01.txt]
	- rework IPv6-related TLVs.

svn path=/trunk/; revision=7381
2003-03-30 22:10:13 +00:00
Guy Harris 30dbf20866 From Laurent Rabret: fix bugs in ISIS LSP analyses, addi type block
filters and display the type block byte in a more standard way (bit
fields).

svn path=/trunk/; revision=7378
2003-03-27 19:42:33 +00:00
Guy Harris 46ac8aa4bd From Hannes Gredler:
open up a new subtree for dissecting the lsp-entry TLV;

	remove the isis_lsp_decode_lsp_id() routine, as the same
	functionality is better served using print_system_id();

	fix a small bug in print_system_id().

svn path=/trunk/; revision=6169
2002-09-02 22:10:17 +00:00
Guy Harris 79195136aa From Hannes Gredler: make the IS-IS dissector more verbose in the INFO
field - specifically for

	IIHs  the System-ID of the Hello;
	LSPs  the LSP-ID, Sequence #, Lifetime;
	CSNPs the LAN-ID, Start LSP-ID, End LSP-ID.

and change the display of some IDs.

Clean up white space.

svn path=/trunk/; revision=6128
2002-08-29 18:52:54 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 89a2075b73 net/inet.h should not be needed by a dissector.
svn path=/trunk/; revision=5950
2002-08-04 09:08:03 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Guy Harris 95a095a1c4 From Chenjiang Hu: use the correct offset when fetching unreserved
bandwidth values.

svn path=/trunk/; revision=5414
2002-05-07 18:52:27 +00:00
Guy Harris 8c050e6851 From Joerg Mayer: mark unused arguments as such.
Add a check in "dissect_hello_restart_clv()" that the length of the TLV
is correct.

Use "val_to_str()" to get the name of the adjacency state in
"dissect_hello_ptp_adj_clv()".

svn path=/trunk/; revision=5357
2002-05-02 10:13:56 +00:00
Guy Harris 6c12522f42 Use "tvb_get_ntohieee_float()" to fetch floating-point numbers.
svn path=/trunk/; revision=5242
2002-04-24 20:25:02 +00:00
Guy Harris b212a49bd7 Get rid of the unused hf_ value "hf_isis_hello_clv_restart".
Use the "tree_id" argument to "isis_dissect_mt_clv()" for the 2-byte MT
IDs, and arrange that the two hf_ values passed as that argument
actually be defined for protocol fields.

Fix the loop in "isis_dissect_mt_clv()" so that it actually catches an
odd byte at the end (i.e., loop until there is data at all, not until
there is 1 or fewer bytes), and put that odd byte, if it exists, into
the tree as a 1-byte text item, not a 2-byte text item.

svn path=/trunk/; revision=5113
2002-04-07 23:39:00 +00:00
Guy Harris 5a89b3b965 Get rid of unused "pinfo" arguments.
svn path=/trunk/; revision=5112
2002-04-07 22:36:55 +00:00
Guy Harris c9396446fb From Heikki Vatiainen: fix the test for IS-IS virtual links.
svn path=/trunk/; revision=5010
2002-03-23 22:03:41 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 92915713d3 Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff".  This can be used if

	1) the item covers the entire packet or the remaining payload in
	   the packet

or

	2) the item's length won't be known until it's dissected, and
	   will be then set with "proto_item_set_len()" - if an
	   exception is thrown in the dissection, it means the item ran
	   *past* the end of the tvbuff, so saying it runs to the end of
	   the tvbuff is reasonable.

Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).

In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).

Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.

Fix some indentation.

svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
Guy Harris 319892c608 From Hannes Gredler:
System IDs in IS neighbor CLVs in Hello PDUs are assumed to be
	MAC addresses, so use "get_ether_name()" on them to try to
	resolve them to host names.

	Properly label IS type values of ISIS_LSP_TYPE_LEVEL_2 as being
	"Level 1 and Level 2 IS".

svn path=/trunk/; revision=4451
2001-12-26 21:37:21 +00:00
Guy Harris e9121f9498 Put the Hello, LSP, and {C,P}SNP ISIS stuff into the ISIS protocol,
rather than having them each have their own protocol.

svn path=/trunk/; revision=4432
2001-12-20 07:33:21 +00:00
Ed Warnicke fcd5b352af Moved from using dissect_data() to using call_dissector()
svn path=/trunk/; revision=4269
2001-11-26 04:52:51 +00:00
Guy Harris 7ee4a18804 Tvbuffified ISIS dissector, from Ronnie Sahlberg.
svn path=/trunk/; revision=3626
2001-07-02 00:19:34 +00:00
Guy Harris 6bdba27db5 Fix a typo, discovered whilst testing the tvbuffified ISIS dissector
(the tvbuffified version is correct here; I'll check this in for
reference purposes, even though I plan to check in the tvbuffified
version later).

svn path=/trunk/; revision=3625
2001-07-01 20:37:02 +00:00
Guy Harris d4c81a142c More IS-IS updates.
HELLO message support in RSVP.

svn path=/trunk/; revision=3604
2001-06-23 19:45:12 +00:00
Guy Harris 8412393197 From Joerg Mayer: explicitly fill in all members of a
"header_field_info" structure, including the ones that are later set by
the routines to register fields.

svn path=/trunk/; revision=3561
2001-06-18 02:18:27 +00:00
Guy Harris f15f06f1a4 Support for External Reachability TLVs, and assorted output
improvements, from Hannes Gredler.

svn path=/trunk/; revision=3558
2001-06-18 01:24:58 +00:00
Guy Harris 4dff9f69c0 More updates from Hannes Gredler.
svn path=/trunk/; revision=3522
2001-06-07 19:13:35 +00:00
Guy Harris 315a43b5e3 Get rid of extra colons, and fix up the display of default metrics, from
Jean-Christian Pennetier.

svn path=/trunk/; revision=3437
2001-05-23 18:44:59 +00:00
Guy Harris dc710bd3df Various ISIS improvements (ISIS IPv6 routing TLV dissection, ISIS
traffic engineering TLV dissection, IS neighbor and IP reachability TLVs
given their own subtree types), from Jean-Christian Pennetier.

svn path=/trunk/; revision=3413
2001-05-14 18:40:17 +00:00
Guy Harris 77789be82e Assorted ISIS enhancements from Hannes Gredler.
When dissecting the ISIS NLPID CLV, use the "nlpid_vals" array to
convert NLPID values to protocol names.

svn path=/trunk/; revision=3308
2001-04-16 10:04:33 +00:00
Guy Harris 376056336c OSI network layer over PPP support, fix to P2P ISIS processing, and ISIS
hostname TLV support, from Hannes Gredler.

svn path=/trunk/; revision=3271
2001-04-08 19:32:05 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2810
2001-01-03 06:56:03 +00:00
Laurent Deniel cc36f0b931 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2267
2000-08-13 14:09:15 +00:00
Guy Harris 1cca166630 Make the "isis_hello.source_id" an FT_BYTES field rather than an
FT_ETHER field; the ISIS spec doesn't say it's necessarily a 6-byte
Ethernet address (and, if it's FT_BYTES, you can test it in a filter
much the same way you test an Ethernet address).

Make "isis_hello.lan_id" an FT_BYTES field rather than an FT_STRING
field - it's an array of bytes, not a character string.

Don't require that "system ID" fields be 6 octets; use the size value
from the ISIS PDU header.  (This means that PDUs containing "system ID"
fields can't be described as C structures; dissect them by stepping the
offset instead.)

svn path=/trunk/; revision=2080
2000-06-19 08:33:50 +00:00
Guy Harris 283ce59938 Add routines for adding items to a protocol tree that take arguments of
a particular type, rather than taking a varargs list, along the lines of
the "proto_tree_add_XXX_format()" routines.

Replace most calls to "proto_tree_add_item()" and
"proto_tree_add_item_hidden()" with calls to those routines.

Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to
"proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and
add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()"
routines that don't take the item to be added as an argument - instead,
they fetch the argument from the packet whose tvbuff was handed to them,
from the offset handed to them.

svn path=/trunk/; revision=2031
2000-05-31 05:09:07 +00:00
Gilbert Ramirez 292e38e2c6 Add tvbuff class.
Add exceptions routines.
Convert proto_tree_add_*() routines to require tvbuff_t* argument.
Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as
the tvbuff_t* argument to proto_tree_add_*() routines.

dissect_packet() creates a tvbuff_t, wraps the next dissect call in
a TRY block, will print "Short Frame" on the proto_tree if a BoundsError
exception is caught.

The FDDI dissector is converted to use tvbuff's.

svn path=/trunk/; revision=1939
2000-05-11 08:18:09 +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
Gilbert Ramirez e29f2705bf Change dfilter_init() to check for empty-string abbreviations and for
duplicate abbreviations. All mods to packet-*.c files are fixes to remove
those cases.

svn path=/trunk/; revision=1733
2000-03-20 22:52:48 +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
Gilbert Ramirez 339d67b043 Merge in the final code to make Ethereal run on Win32, compiled
with MSVC 6.0 and 'nmake', the make tool that comes with MSVC.

It compiles, links, and runs. It doesn't run correctly. There's a problem
when reading files. I'm getting short reads.  I'm not linking in zlib or
libsnmp because it first needs to be debugged.

I changed the plugin code to use gmodule instead of libltdl, but the
Unix build still links ethereal against libltdl. I'll fix that tonight; sorry
about leaving it in such a sad state, but I wanted to check in this code
before I left work on a Friday night. Ethereal still works, but the
building is less than optimal.

svn path=/trunk/; revision=1479
2000-01-15 00:23:13 +00:00
Guy Harris 096134536e Stuart Stanley's ISIS dissection support.
svn path=/trunk/; revision=1340
1999-12-15 04:34:44 +00:00