Commit Graph

55 Commits

Author SHA1 Message Date
Anders Broman 6a4ed4f4c3 From Michael Mann.
Part of "display filters with redundancies of PROTABBREV in them."
The ones left outs should be fixed differently I think.
Rename som ndps hf variables while at it.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2794

svn path=/trunk/; revision=37406
2011-05-26 06:32:51 +00:00
Alexis La Goutte 3dcbd7c392 Fix 100(!) Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=36704
2011-04-18 17:55:35 +00:00
Bill Meier fa5a06231c Fix two instances of apparent use of incorrect tree: Coverity 982 & 983;
Remove an uneeded line of code: Coverity 984;
#include <string.h> not needed;
Use consistent indentation & do other whitespace cleanup.

svn path=/trunk/; revision=36603
2011-04-12 19:41:26 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +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
Stig Bjørlykke 539b558f8c Renamed some reassembled data texts.
Removed some check_col().

svn path=/trunk/; revision=31809
2010-02-06 18:20:21 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Bill Meier 9b568ea691 Fix gcc -Wshadow warnings
svn path=/trunk/; revision=31561
2010-01-19 00:37:39 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Kovarththanan Rajaratnam 00810ff199 * Prefer col_append_str instead of col_append_fstr for constant strings
* Remove check_col guards

svn path=/trunk/; revision=30127
2009-09-24 20:21:23 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +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 4b6090e576 Don't guard col_set_str (COL_INFO) with col_check
svn path=/trunk/; revision=29342
2009-08-09 07:01:26 +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 b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Guy Harris cfe974aadd The expert_item pointers and expert_status values don't need to be
static; make them auto variables.

Make sure that expert information is added outside "if (tree) { }", so
it gets added even if we're not building the protocol tree.

Clean up white space.

svn path=/trunk/; revision=28281
2009-05-05 19:33:46 +00:00
Gerald Combs 16dac84760 Remove some no-longer-needed casts.
svn path=/trunk/; revision=28081
2009-04-17 22:07:50 +00:00
Anders Broman b666a7942e More size_t casts.
svn path=/trunk/; revision=27887
2009-03-29 18:26:06 +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
Stig Bjørlykke bd08ae7ee6 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26647
2008-10-31 15:11:57 +00:00
Anders Broman 90753a169e Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length().
non heuristic dissectors

svn path=/trunk/; revision=23405
2007-11-08 22:40:20 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Greg Morris a6aab98d1e Fix attribute *Print Checkpoint"
Fix Printer State Reasons in extended error codes.

svn path=/trunk/; revision=22747
2007-08-30 10:23:58 +00:00
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Gerald Combs 44318bc1f1 Check to see if we've passed a null strval to ndps_string().
Should fix the recent fuzz bugs.

svn path=/trunk/; revision=19506
2006-10-12 15:00:07 +00:00
Guy Harris 69ab0c473b Use a different heuristic to determine whether an NDPS string is ASCII
or Unicode, and use tvb_get_ephemeral_faked_unicode() to get Unicode
strings; this fixes problems I've seen in captures, where the string
isn't being processed correctly.

svn path=/trunk/; revision=19494
2006-10-11 17:01:51 +00:00
Ronnie Sahlberg a003f7cd8f fix two of iljas bugs
svn path=/trunk/; revision=18710
2006-07-11 03:19:15 +00:00
Gerald Combs bbc5a76517 Fix more bugs found by Ilja van Sprundel.
packet-mount.c:
  Don't allocate a huge amount of memory.

packet-ntp.c:
  Fix a possible format string bug.

packet-ndps.c:
packet-nmas.c:
  Fix an off-by-one buffer error.

svn path=/trunk/; revision=18678
2006-07-07 04:01:09 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg f331077a60 waste a couple of bytes per tcp conversation and make the tree for acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global.
while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite   tcp analysis might actually work and work well even for tcp over tcp tunnelling. 

this also means that if you include packet-tcp.h   you also need to include emem.h .




svn path=/trunk/; revision=17681
2006-03-20 10:52:53 +00:00
Jaap Keuter 846f069180 This patch fixes a couple of bind replies to report proper session id.
Greg Morris


svn path=/trunk/; revision=17000
2006-01-11 11:35:25 +00:00
Anders Broman 81fb46aacd From Greg Morris:
Fixes proper decoding of extended error 2 values
Also adds a number of additional error codes/values

svn path=/trunk/; revision=16572
2005-11-23 21:25:24 +00:00
Guy Harris f3144c4fef Clean up "print_address()" - fix the indentation, do the check for a
too-large address in common code, and *don't* use tvb_get_letohl() to
get IPv4 addresses (just use proto_tree_add_item(), it works Just Fine).

For integral values, always do the tvb_ensure_bytes_exist() test; don't
just do it if the length is the expected value (the real problem is with
bogus too-large lengths, so it's more important to do the check if the
length *isn't* the expected value!).  Fixes bug 549.

svn path=/trunk/; revision=16298
2005-10-25 00:28:40 +00:00
Gilbert Ramirez c31e002512 From Greg Morris:
Adds expert data to the NDPS dissector


svn path=/trunk/; revision=16267
2005-10-19 14:32:05 +00:00
Ronnie Sahlberg 05dbe84db8 gmemchunk -> se_alloc() improvements
svn path=/trunk/; revision=15326
2005-08-12 23:57:01 +00:00
Jörg Mayer a0f94c125f Last set of trivial fixes for "no previous declaration" warnings.
svn path=/trunk/; revision=15191
2005-08-02 08:30:33 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Ulf Lamping 56a9fe6d2a add a generated toplevel line between the connectionless DCE/RPC protocol and the defragmented DCE/RPC content, to better understand what's going on if defragmentation is done.
svn path=/trunk/; revision=14531
2005-06-02 20:55:58 +00:00
Ulf Lamping d3f821035b fix #223: add another tvb_ensure_bytes_exist() call
svn path=/trunk/; revision=14528
2005-06-02 19:31:16 +00:00
Ulf Lamping f3037e2f53 add two more tvb_ensure_bytes_exist() calls to fix #216
When I look at the remaining code, I fear this will become a never ending story :-(

svn path=/trunk/; revision=14481
2005-05-30 02:58:13 +00:00
Ulf Lamping f8b3fe7668 add some tvb_ensure_bytes_exist() calls, fixes #197, #202 and #208
svn path=/trunk/; revision=14465
2005-05-28 12:49:19 +00:00
Gerald Combs bf48f8e4d4 Check for a few more integer overflows. Found during fuzz testing.
svn path=/trunk/; revision=14266
2005-05-02 14:12:42 +00:00
Gerald Combs a416a4b6f5 Check for an integer overflow. Fixes bug 149.
svn path=/trunk/; revision=14245
2005-04-30 16:42:04 +00:00
Ronnie Sahlberg f229ab5733 fix for bug 107 from Greg Morris
svn path=/trunk/; revision=14199
2005-04-27 10:21:12 +00:00
Gerald Combs 380dfa0fde Add a bunch of tvb_ensure_bytes_exist() calls. Fixes bug 106.
svn path=/trunk/; revision=14194
2005-04-26 22:19:38 +00:00
Gerald Combs 78a09d190b Fix another invalid item length. Fixes bug 98.
svn path=/trunk/; revision=14184
2005-04-25 15:28:32 +00:00
Gerald Combs a9e9262981 Don't try to tell proto_tree_add_item() that FT_UINT32s are something other
than 4 bytes.  It throws a fit when you do that.  Fixes bug 97.

svn path=/trunk/; revision=14183
2005-04-25 15:21:37 +00:00
Gerald Combs cf23c92003 Make sure we don't exhaust system memory.
svn path=/trunk/; revision=14172
2005-04-23 20:54:59 +00:00