Commit Graph

80 Commits

Author SHA1 Message Date
Guy Harris 231f28ce08 Panic if a preference starts with the name of the module to which it
belongs, as that's redundant.

Fix a bunch of cases where that was done, and map the old name to the
new name.

Instead of marking "mtp3.mtp3_standard" as obsolete, map it to
"mtp3.standard".

svn path=/trunk/; revision=7030
2003-01-28 23:56:40 +00:00
Guy Harris f56360c779 From Albert Chin: get rid of trailing commas in enums, as Digital's,
err, umm, Compaq's, err, umm, HP's Tru64 C compiler doesn't like them.

svn path=/trunk/; revision=6994
2003-01-24 02:14:48 +00:00
Guy Harris 59932f2722 Don't cast away constness, and fix variable and structure member
qualifiers as necessary to ensure that we don't have to.

"strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't
test their results as if they did.

Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes.

Update Michael Tuexen's e-mail address.

svn path=/trunk/; revision=6726
2002-12-02 23:43:30 +00:00
Guy Harris 24a1312102 Don't use "unsigned long" to mean "32-bit unsigned integer", as it's not
32 bits on all platforms - it's 64 bits on some platforms.  Use
"guint32" instead.  The same applies for "unsigned short" and "guint16".

svn path=/trunk/; revision=6489
2002-10-24 03:04:51 +00:00
Ashok Narayanan 6cfdb3c0ed Added support for Label Request Type 2 (ATM Label Range) and
Type 3 (Frame Label Range)

svn path=/trunk/; revision=6485
2002-10-23 20:50:22 +00:00
Ashok Narayanan 58d356ad94 - Fixed RRO flag support that got dropped in the previous commit.
- Added support for FRR as per draft-ietf-mpls-rsvp-lsp-fastreroute-00.txt

svn path=/trunk/; revision=6383
2002-10-08 23:29:15 +00:00
Ashok Narayanan cb922419d3 Updates to RSVP
- Added the RESTART_CAP and PROTECTION_INFO objects (GMPLS)

- Cleaned up the tree variables & removed duplication

- Cleaned up the RRO/ERO subobject decoding and removed duplication

- Added IF-ID ERRORSPEC support

- Cleaned up the HOP IF-ID code and removed duplication

svn path=/trunk/; revision=6365
2002-10-02 21:15:27 +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 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 39927e5db7 Don't loop forever in "find_rsvp_session_tempfilt()" or
"dissect_rsvp_msg_tree()" if there's a zero-length object.

In "find_rsvp_session_tempfilt()", check to make sure the data exists
before fetching it, so that it doesn't throw an exception - the
information it returns is only used to put items into the protocol tree,
so there's no reason to quit dissecting the packet just because it can't
find that information because, for example, not enough of the packet
data was captured.

svn path=/trunk/; revision=5919
2002-07-31 10:10:44 +00:00
Ashok Narayanan 7f7af9143a Added support for dissecting RSVP Bundle Messages
svn path=/trunk/; revision=5881
2002-07-15 21:19:56 +00:00
Guy Harris fbaa0dd809 Add Booleans for the Ack and Srefresh messages, and move the Boolean for
the HELLO message to be in numerical message-code order.

svn path=/trunk/; revision=5871
2002-07-14 19:33:16 +00:00
Guy Harris 5e2787151a Add a Boolean field for the Bundle message type.
svn path=/trunk/; revision=5870
2002-07-14 19:23:04 +00:00
Guy Harris cf204c9938 Properly check for unknown RSVP message types.
Note where the message types are defined.

svn path=/trunk/; revision=5634
2002-06-06 11:02:05 +00:00
Gerald Combs cf247c7360 Require that the LMP and RSVP message types be greater than 0.
svn path=/trunk/; revision=5612
2002-06-02 23:55:11 +00:00
Guy Harris 531cb17873 From Albert Chin: fix various non-GCC compiler warnings.
svn path=/trunk/; revision=5600
2002-05-30 08:34:19 +00:00
Gerald Combs 8682b694f1 Add a "break;" after a "default:" to fix an MSVC++ compilation error.
svn path=/trunk/; revision=5498
2002-05-18 02:05:47 +00:00
Ashok Narayanan b1f780edf3 - Major cleanup of the RSVP dissector
- Added support for OIF O-UNI 1.0 (as per 125.7 standard)

svn path=/trunk/; revision=5492
2002-05-16 20:11:32 +00:00
Guy Harris 3af29ce7bf Use "%.10g", rather than "%f", for floating-point numbers. That will
display values that would fit in a 32-bit integer as integers, leaving
out all trailing zeroes after the decimal point (and leaving out the
decimal point if there are no digits left after the decimal point once
trailing zeroes are removed), and will use scientific notation for small
fractions or large numbers.

svn path=/trunk/; revision=5248
2002-04-25 06:34:42 +00:00
Guy Harris 92b47f62eb Use "tvb_get_ntohieee_float()" to fetch floating-point numbers.
Display those numbers as floating-point.

svn path=/trunk/; revision=5240
2002-04-24 20:06:06 +00:00
Guy Harris 64fe90a383 From Joerg Mayer: get rid of some unused variables and arguments.
Use "tvb_get_ntohs()" to fetch the checksum from a VJ compressed packet,
rather than doing the ntoh by hand.

svn path=/trunk/; revision=5163
2002-04-14 23:22:22 +00:00
Guy Harris db31932941 From Joerg Mayer:
Declares some variables static.

	Creates a new include file packet-rsvp.h, and make use of it
	(change some extern decls to #inlcude).

	Move the file packet-pgm.h into packet-pgm.c as it is not used
	by anything outside packet-pgm.c.

svn path=/trunk/; revision=5162
2002-04-14 23:04:04 +00:00
Ashok Narayanan 018dce8c50 Changed TBA GMPLS object numbers to proposed IETF numbers.
svn path=/trunk/; revision=5039
2002-03-29 00:41:54 +00:00
Guy Harris 6472a33533 "ulong" isn't defined on MacOS X (and probably isn't defined on some
other platforms, either) - don't use it.  Instead, use "guint32", as the
item in question is a 32-bit unsigned integer.

In fact, it's a 32-bit unsigned integer containing a bit set, and the
data type isn't a "long", so print it with "0x%08x", rather than
"0x%04lx", so that all 8 hex digits are printed, and so that the format
matches the data type.

It also doesn't have to be initialized - the only code path in which
it's used sets it.

svn path=/trunk/; revision=4842
2002-03-02 07:22:20 +00:00
Ashok Narayanan defeed858d Added RSVP support for the Administrative Status object.
svn path=/trunk/; revision=4839
2002-03-01 21:39:01 +00:00
Ashok Narayanan 00d1c463ee GMPLS extensions for OSPF Opaque LSAs
svn path=/trunk/; revision=4730
2002-02-14 02:32:14 +00:00
Guy Harris a758e63774 Put in a "break" statement after the "default:" clause; GCC may allow
you to have a label with no statement after it, but other C compilers
(e.g, MSVC++ 6.0) don't.

svn path=/trunk/; revision=4678
2002-02-02 11:52:41 +00:00
Ashok Narayanan 2519eb2d8f Added support for LSP-TUNNEL INTERFACE-ID object.
Some generic cleanups.

Added sensible information to message and object summaries.

svn path=/trunk/; revision=4654
2002-01-31 22:42:38 +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
Ashok Narayanan b18512d444 Changes to RSVP:
- Cleaned up TSpec and Flowspec support to handle multiple parameters
- Added support for Compression Hint (RFC3006)
- Added support for DCLASS (RFC2996)
- Corrected some bugs in support for Null Service (RFC2997)

svn path=/trunk/; revision=4459
2001-12-29 00:43:55 +00:00
Ashok Narayanan 3a0b573c9c Added support for Generalized MPLS (GMPLS) to RSVP
svn path=/trunk/; revision=4452
2001-12-26 22:32:57 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Guy Harris bced8711f6 Make "dissector_add()", "dissector_delete()", and "dissector_change()"
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID.  Associate dissector handles with
dissector table entries.

svn path=/trunk/; revision=4308
2001-12-03 04:00:26 +00:00
Gilbert Ramirez 6de396c4a8 Fix the rest of the signed/unsigned comparison warnings.
svn path=/trunk/; revision=4088
2001-10-26 18:28:17 +00:00
Guy Harris 0b36ed83c6 Add HFILL to explicitly fill in some additional structure members.
svn path=/trunk/; revision=3609
2001-06-26 20:50:30 +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
Ashok Narayanan a077ae8a6f Cosmetic: Corrected "Maximum policed unit" to "Maximum packet size"
svn path=/trunk/; revision=3546
2001-06-14 18:26:04 +00:00
Ashok Narayanan abe5eaef80 Bugfix: Removed an unnecessary and potentially spurious include from RSVP.
svn path=/trunk/; revision=3393
2001-05-01 18:33:06 +00:00
Ashok Narayanan 56884ad699 - Added support for RSVP Refresh Reduction Extensions
(draft-ietf-rsvp-refresh-reduct-05).

- Added one-line summary of each RSVP object in the object line.

svn path=/trunk/; revision=3392
2001-05-01 18:19:04 +00:00
Guy Harris 2cadc3ba3a Get rid of some unnecessary includes.
Fix up Gerald's e-mail address.

svn path=/trunk/; revision=3371
2001-04-23 18:19:03 +00:00
Guy Harris c75f555d8c Move the declarations of IP protocol numbers to "ipproto.h" from
"packet-ip.h".

Fix Gerald's address in some files while we're at it.

svn path=/trunk/; revision=3366
2001-04-23 17:51:37 +00:00
Guy Harris 4ef93d0651 All the object class-specific types are interior nodes, and the only
interesting thing about them is whether they're present or absent - make
them FT_NONE, rather than FT_BOOLEAN, so they don't have an extra ":
True" added to the protocol tree display line.

svn path=/trunk/; revision=3339
2001-04-20 01:22:23 +00:00
Guy Harris 477cefc2d5 FT_UINTn and FT_INTn fields must always have a base selected for them;
otherwise, the filtering GUI gets very upset when you try to construct a
filter expression to test the value of that field.  Make some of them
that are really Booleans ("is there an object of this class in the
packet?") FT_BOOLEAN, and give others BASE_DEC, for now.

Give the hidden field for the RSVP object class to have a name (so it
shows up as "Object class" in the filtering GUI).

svn path=/trunk/; revision=3333
2001-04-19 22:55:31 +00:00
Guy Harris 2aa31bea47 Move the declaration of "etype_vals[]" from "epan/packet.h" to
"etypes.h".

svn path=/trunk/; revision=3314
2001-04-17 06:43:21 +00:00
Guy Harris 859860013e L3PIDs are Ethertypes; display them as such.
Use "decode_boolean_bitfield()" to dissect flag bits.

svn path=/trunk/; revision=2989
2001-02-04 09:37:28 +00:00
Guy Harris 52bf014948 Tvbuffify the RSVP dissector.
Display the message checksum, and check it if possible.

Fix some IPv6 entries to be 16 bytes long, not 4 bytes long.

Make the routine to fetch an IEEE floating point number and turn it into
a "long" take a tvbuff pointer and offset rather than a pointer to data.

svn path=/trunk/; revision=2987
2001-02-04 08:21:35 +00:00
Guy Harris c57c848dfa Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.

Move the setting of the Protocol column in various dissectors before
anything is fetched from the packet, and also clear the Info column at
that point in those and some other dissectors, so that if an exception
is thrown, the columns don't reflect the previous protocol.

Don't use

	col_add_fstr(..., "%s", string);

Use

	col_add_str(..., string);

as it does the same thing, but doesn't drag all the heavy *printf
machinery in.

Fix the DDTP dissector to set the Info column regardless of whether
we're building a protocol tree or not, and to set it to "Encrypted
payload" if the payload is encrypted.  Also fix a typo in a field name.

Register the FTP data dissector as being associated with the FTP data
protocol, not the FTP protocol (the removed "CHECK_DISPLAY_AS_DATA()"
call checked "proto_ftp_data", and the removed "pinfo->current_proto ="
line set it to "FTP-DATA", so it should be associated with
"proto_ftp_data").

Make the H1 dissector check whether the frame has at least 2 bytes in it
before checking the first two bytes; heuristic dissectors must not throw
exceptions until they've accepted the packet as one of theirs.

Use "tvb_format_text()" rather than "tvb_get_ptr()" and "format_text()"
in some dissectors where the result of "tvb_get_ptr()" is used only in
the "format_text()" call.

In the Quake dissector, don't check whether there are at least 4 bytes
in the packet - if we return, the packet won't be dissected at all (it's
not as if some other dissector will get to handle it), and, if we don't
return, we'll throw an exception if there aren't at least 4 bytes in the
packet, so the packet will be marked as short or malformed, as
appropriate.

In the RIPng dissector, associate the table of strings for the command
field with the command field, so that the dissector doesn't have to
format the string for the protocol tree entry itself, and so that the
filter construction dialog box can let you select "Request" or
"Response" from a list rather than requiring you to know the values for
"Request" and "Response".

Make "dissect_rpc()" static, as it's called only through a heuristic
dissector list.

Use "col_set_str()" to set the COL_PROTOCOL column for RPC protocols;
the string used is from a table provided by the dissector, and is a
string constant.

Don't format the Info column for WSP into a buffer and then format that
buffer into the column with "%s" - "col_add_fstr()" can do the
formatting for you, without having to allocate your own buffer (or run
through the *printf machinery twice).

Don't fetch fields from the WTP packet until you're ready to use them,
so that you don't throw an exception before you even set the Protocol
column or clear the Info column.

Use "pinfo->destport", not "pi.destport", in the Zebra dissector when
checking whether the packet is a request or reply, and do the check by
comparing with "pinfo->match_port" rather than TCP_PORT_ZEBRA (so that
if the dissector is ever registered on another port, it still correctly
determines whether the packet is a request or reply - the Network
Monitor HTTP dissector has port 80 wired into its brain, which is a bit
irritating if you're trying to get it to dissect HTTP proxy traffic on
port 3128 or proxy administration UI traffic on port 3132).

svn path=/trunk/; revision=2931
2001-01-22 08:03:46 +00:00
Guy Harris c1bbd1b277 Fix call to "pntohs()" - it was missing the "pd+", so it was just
passing the offset in the packet, not a pointer into the packet, to
"pntohs()".

svn path=/trunk/; revision=2864
2001-01-10 23:30:41 +00:00
Guy Harris 43ccfd8054 Add an additional "protocol index" argument to "{old_}dissector_add()",
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and
"register_dissector()", so that an entry in those tables has associated
with it the protocol index of the protocol the dissector handles (or -1,
if there is no protocol index for it).

This is for future use in a number of places.

(Arguably, "proto_register_protocol()" should take a dissector pointer
as an argument, but

	1) it'd have to handle both regular and heuristic dissectors;

	2) making it take either a "dissector_t" or a union of that and
	   a "heur_dissector_t" introduces some painful header-file
	   interdependencies

so I'm punting on that for now.  As with other Ethereal internal APIs,
these APIs are subject to change in the future, at least until Ethereal
1.0 comes out....)

svn path=/trunk/; revision=2849
2001-01-09 06:32:10 +00:00