Commit Graph

43 Commits

Author SHA1 Message Date
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Martin Kaiser 1ea4e88824 coverity 1058716
set but not used variable

svn path=/trunk/; revision=51242
2013-08-10 12:37:47 +00:00
Guy Harris 629ee9ed81 Fix some more bugs that caused compiler warnings.
svn path=/trunk/; revision=50887
2013-07-25 09:53:28 +00:00
Guy Harris 166eb4f53d Get rid of an unused variable (set, but not used).
Get rid of extra arguments to expert_add_info_format_text() - as with
any other printf-like routine, if the format string has no % items, you
don't need to pass any additional arguments after that - you don't have
to tack on a BASE_NONE just for the lulz.

svn path=/trunk/; revision=50886
2013-07-25 09:03:02 +00:00
Michael Mann 3b3ff69af7 1. MASSIVE conversion of proto_tree_add_text to proto_tree_add_item with the help of (and a few passes of) convert_proto_tree_add_text.pl. Tried to keep display filter names in line with existing filters.
2. Cleaned up a bunch of proto_tree_add_xxx that could really be proto_tree_add_item so "useless" local variables could be removed.

3. Bugfixed a few bitmask (probably) copy/pasteos.

4. Better standardized whitespace and added modelines.

5. Still think some of the "object" filters (with BASE_NONE) could be removed in favor of a single filter (value_string) with object ID number (BASE_DEC), but I'll leave that to someone more familiar with the protocol.

svn path=/trunk/; revision=50884
2013-07-25 03:16:43 +00:00
Michael Mann a0606ce0b2 Cleanup hf_ variables so they can be identified as such. "Array" of hf items not necessary and prevents "check" scripts from fully working.
Made ett array local to proto_register_pcep.

All this for preparing to use convert_proto_tree_add_text (which I thought should be its own patch/revision)

svn path=/trunk/; revision=50733
2013-07-18 20:13:42 +00:00
Michael Mann fa5b45834b Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49921
2013-06-14 01:56:28 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
Bill Meier 1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Michael Mann 4f9707469d replaced decode_boolean_bitfield calls with itemized filters
added tfs_no_yes to tfs.[ch]

svn path=/trunk/; revision=45115
2012-09-25 01:00:41 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 7582254ef1 From Evan Huus: remove unused variables
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7229
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7230

svn path=/trunk/; revision=42455
2012-05-07 01:12:03 +00:00
Jeff Morriss 05113c3737 From Svetoslav Duhovnikov via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6995 :
The following patch adds decoding capabilities for RFC 5886 for PCEP protocol:

9.1. New PCEP Message


   Each PCEP message has a message type value.

   Two new PCEP (specified in [RFC5440]) messages are defined in this
   document:

   Value  Description                                      Reference
     8    Path Computation Monitoring Request (PCMonReq)   This document
     9    Path Computation Monitoring Reply (PCMonRep)     This document

9.2. New PCEP Objects


   Each PCEP object has an Object-Class and an Object-Type.  The
   following new PCEP objects are defined in this document:

   Object-Class Value Name        Object-Type             Reference

          19          MONITORING  1                       This document

          20          PCC-REQ-ID  1: IPv4 addresses       This document
                                  2: IPv6 addresses

          25          PCE-ID      1: IPv4 addresses       This document
                                  2: IPv6 addresses       This document

          26          PROC-TIME   1                       This document

          27          OVERLOAD    1: overload             This document

svn path=/trunk/; revision=41862
2012-03-30 22:36:02 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier f1b784b474 More conversions of proto_tree_add_item() 'encoding' arg
svn path=/trunk/; revision=39467
2011-10-19 15:04:44 +00:00
Jeff Morriss bd128abe64 From Roberto Morro via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6451 :
The patch fixes a bug in the PCEP Objective Function (OF) object tree
visualization (it didn't recognize the object and showed it as "Unknown
object").

Also fixes a small bug.

From me: remove a couple of unnecessary includes.

svn path=/trunk/; revision=39454
2011-10-18 01:27:01 +00:00
Chris Maynard 994e1f698b Update sub-object types of XRO to match RFC 5521. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3778.
svn path=/trunk/; revision=39031
2011-09-17 03:58:41 +00:00
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Stephen Fisher e1afac1b89 From Roberto Morro via bug #5701: Change the PCEP dissector's port
from 1010 to the IANA assigned value of 4189.  From me: Add RFC 5440
to the list of references.


svn path=/trunk/; revision=36004
2011-02-18 20:48:49 +00:00
Jeff Morriss 685c29d386 Use tvb_bytes_to_str_punct() instead of bytestring_to_str(tvb_get_ptr(), ...)
svn path=/trunk/; revision=35891
2011-02-09 22:37:26 +00:00
Jeff Morriss 8ee172d021 Store the result of tvb_get_ntohs() in a guint16 instead of a guint8 to avoid a
compiler warning.  (It looks like the only expected values will fit in 8 bits,
but it also appears that the code really is expecting 'of_code' to be stored in
16 bits on the wire.)


svn path=/trunk/; revision=35790
2011-02-03 22:04:19 +00:00
Jaap Keuter 806bb18a7b From Roberto Morro:
- add PATH-KEY object, PKSv4 and PKSv6 subobjects in ERO (RFC5520)
- new METRIC types, Objective Function (OF) object and TLV (RFC5541)
- new RP object Flags
- restructured PCEP_ERROR object dissection (easier to add new 
  error_types, error_values)

svn path=/trunk/; revision=35789
2011-02-03 20:14:38 +00:00
Jeff Morriss e11921d192 Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str().

svn path=/trunk/; revision=35540
2011-01-15 03:25:43 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke 7f77783e20 From Kovarththanan Rajaratnam:
More header field info cleanup in plugins/* and epan/dissectors/*

svn path=/trunk/; revision=28811
2009-06-22 18:23:58 +00:00
Stig Bjørlykke f8c959dc8c From Kovarththanan Rajaratnam:
Move header field info declarations into function scope.

This is the first step. Another patch will be submitted which actually scrubs
the header field info declarations (remove empty blurbs, etc.)

svn path=/trunk/; revision=28797
2009-06-22 04:58:08 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Bill Meier 33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Stig Bjørlykke e6a22e689e Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26648
2008-10-31 15:34:00 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Bill Meier 77b81b391b #include <prefs.h> not req'd
svn path=/trunk/; revision=26089
2008-08-25 22:06:20 +00:00
Bill Meier 44af6ef887 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
2008-05-14 01:47:41 +00:00
Guy Harris 9a9dd48fa2 According to draft-ietf-pce-pcep-09, the LOAD-BALANCING object has no
TLVs, and has a fixed length; fix the dissector for it to check for an
exact length and not to look for TLVs.

svn path=/trunk/; revision=23967
2007-12-29 00:57:51 +00:00
Jaap Keuter 3f431f9dfb Have a filled COL_INFO, even if tree is NULL
svn path=/trunk/; revision=23966
2007-12-29 00:55:01 +00:00
Guy Harris 39dfc7b4db Rename packet-pce.c to packet-pcep.c to match the protocol name.
svn path=/trunk/; revision=23965
2007-12-28 23:08:48 +00:00