Commit Graph

86 Commits

Author SHA1 Message Date
Chris Maynard adf0b2f274 Corrected some obvious typos.
svn path=/trunk/; revision=40302
2011-12-27 17:34:01 +00:00
Bill Meier 30cee99009 Fix a number of proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39774
2011-11-09 17:33:18 +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 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +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
Jeff Morriss f3f9f2697f Make TVBs opaque for most users.
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions.

svn path=/trunk/; revision=37422
2011-05-27 03:06:50 +00:00
Jeff Morriss 7ad71a2d78 Treat TVBs as opaque: use the accessor functions instead of accessing the fields
directly.

svn path=/trunk/; revision=37420
2011-05-27 01:57:33 +00:00
Jakub Zawadzki 38c2f2a151 Cleanup: replace sizeof(arr)/sizeof(arr[0]) with shorter array_length(arr)
svn path=/trunk/; revision=36986
2011-05-04 19:32:35 +00:00
Gerald Combs b97275395f Check our PDU length. Fixes the infinite loop found in bug 5876.
svn path=/trunk/; revision=36958
2011-04-30 17:43:05 +00:00
Gerald Combs 43b089db87 Fix Coverity CIDs 603 & 604.
svn path=/trunk/; revision=36672
2011-04-16 21:46:15 +00:00
Stig Bjørlykke aca69d699a Removed "comparing an array to null", with no effect.
Coverity 532.

svn path=/trunk/; revision=36279
2011-03-23 07:25:08 +00:00
Bill Meier 1f5bfa75b1 Remove two tests for fail return from g_malloc(); Fixes Coverity #424 "FORWARD_NULL"
svn path=/trunk/; revision=36267
2011-03-22 19:27:48 +00:00
Jeff Morriss 50e1634f4c Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB
using the given offset and length.

Replace a bunch of:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...])

with:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...])

svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +00:00
Bill Meier ed78f0a33e Fix two cases of 'if (x = y)' which should be 'if (x == y)'.
Found by reviewing msvc level 4 warnings "assignment within conditional expression".

(Unfortunately most of the warnings are false positives so this warning can't be enabled)



svn path=/trunk/; revision=35726
2011-01-31 18:58:38 +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
Jeff Morriss 705f2ede5d Roll some calls to tvb_get_ptr() into proto_tree_add_bytes_format() (instead
of going through a temporary variable).  This just makes it more obvious which
add_bytes_format() calls are or are not being given pointers into the TVB.

Use tvb_ip_to_str() and tvb_ip6_to_str() in a couple spots.

svn path=/trunk/; revision=35593
2011-01-20 03:49:44 +00:00
Jeff Morriss f36e2be287 Use tvb_memeql() and tvb_memcpy().
Use tvb_ip_to_str() and tvb_ip6_to_str().

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the
return string is NULL terminated.

svn path=/trunk/; revision=35546
2011-01-16 03:35:29 +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 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +00:00
Jaap Keuter 61e6d3eb0e From David Aggeler:
- Finally, better reassembly using fragment_add_seq_next().
  The previous mode is still supported.
- Fixed sporadic decoding and export issues. Always decode 
  association negotiation, since performance check (tree==NULL)
  is now only in dissect_dcm_pdv_fragmented(). 
- Added one more PDV length check
- Show Association Headers as individual items
- Code cleanup. i.e. moved a few lookup functions to be closer 
  to the dissection.

svn path=/trunk/; revision=33751
2010-08-09 19:28:09 +00:00
Bill Meier 7b85f43d0e Do some constifying [or other] based upon gcc -Wwrite-strings warnings.
svn path=/trunk/; revision=33198
2010-06-09 18:12:17 +00:00
Jeff Morriss a8ca1bb630 From David Aggeler via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4762 :
- Fixed HF to separate signed & unsigned values and to have BASE_DEC all signed 
- Fixed private sequences with undefined length in ILE
- Fixed some spellings in comments

svn path=/trunk/; revision=32815
2010-05-14 21:54:48 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Guy Harris 237b930ec4 Squelch a bunch of compiler warnings.
svn path=/trunk/; revision=32246
2010-03-19 20:24:06 +00:00
Stig Bjørlykke c198fc6546 From Didier Gautheron via bug 4419:
se_alloc and ep_alloc never return NULL and se_alloc0 already initialized
data with 0.

svn path=/trunk/; revision=31654
2010-01-25 11:47:39 +00:00
Bill Meier de4c6ff515 Fix a number of gcc _Wshadow warnings
svn path=/trunk/; revision=31557
2010-01-18 21:49:47 +00:00
Kovarththanan Rajaratnam dc265696a1 tvb_format_text() always returns a non NULL pointer so don't check return value for NULL pointer
svn path=/trunk/; revision=30821
2009-11-04 16:08:47 +00:00
Anders Broman 88bb44a51e From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Bill Meier 56eec34f80 Fix possible memmove with a NULL poiunter.
svn path=/trunk/; revision=29599
2009-08-28 16:52:05 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Jaap Keuter 24d2fb5126 From David Aggeler:
* - Fixed corrupt files on DICOM Export
 * - Fixed memory limitation on DICOM Export
 * - Removed minimum packet length for static port mode
 * - Simplified checks for heuristic mode
 * - Removed unused functions

svn path=/trunk/; revision=29060
2009-07-10 21:54:29 +00:00
Jaap Keuter b118290a6b From David Aggeler:
Not much, just a little bit of fine tuning:
- Spelling
- Added expert_add_info() for status responses with warning & error level
- Added command details in info column (optionally)

Also plugging memory leak.

svn path=/trunk/; revision=28392
2009-05-18 06:21:22 +00:00
Anders Broman e0171e1a79 More size_t casts.
svn path=/trunk/; revision=27880
2009-03-29 13:47:15 +00:00
Stig Bjørlykke 0258be0b05 From Jakub Zawadzki:
More remove checking for NULL before g_free().

svn path=/trunk/; revision=27728
2009-03-15 18:08:46 +00:00
Gerald Combs 6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Bill Meier d2ba316fd9 Fix two typos
svn path=/trunk/; revision=27052
2008-12-18 19:32:11 +00:00
Bill Meier c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +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
Jaap Keuter 426e6c1700 From David Aggeler:
Added Tag matching based on masks for remaining tags in the standard. 
Now all tags (except private tags) should be supported.

svn path=/trunk/; revision=26662
2008-10-31 22:59:14 +00:00
Stig Bjørlykke d0e33bc3c5 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26646
2008-10-31 14:07:23 +00:00
Anders Broman 3893c32000 From David Aggeler:
Reworked the item creation.

svn path=/trunk/; revision=26424
2008-10-12 21:35:23 +00:00
Stig Bjørlykke 813c6102b3 Really make it compile. Someone should have a look at this.
svn path=/trunk/; revision=26417
2008-10-11 15:16:37 +00:00
Anders Broman 08b51ea542 Just try to make it compile.
svn path=/trunk/; revision=26416
2008-10-11 15:00:39 +00:00
Anders Broman 93a0edf6dd From David Aggeler:
packet-dcm, improved DICOM Tag support, misc fixes.

svn path=/trunk/; revision=26413
2008-10-11 14:25:02 +00:00
Stig Bjørlykke 9ef96188ee From Shinsuke SUZUKI (bug 2789):
Remove some non-ASCII characters.

svn path=/trunk/; revision=25972
2008-08-09 16:24:39 +00:00
Anders Broman 8db1e7a8b2 From David Aggeler:
Follow-up from SVN 25825 check in

The g_slist_free() is really needed in export_object.c, otherwise, the export
list has false (repetitive) entries in it, that cause a crash when selecting
them.

Whether false entries are in the list, only depends on the speed of the export
processing, since this tap is 

Replaced all guchar with gchar. This should eliminate the warnings on solaris. 
I guess I used the wrong reference.

Added patch for 'Authors' in case I need to add myself to the list.

svn path=/trunk/; revision=25834
2008-07-25 22:58:05 +00:00
Jeff Morriss 9bacbeceb5 static variable declarations don't belong in header files
svn path=/trunk/; revision=25830
2008-07-25 15:42:46 +00:00
Jeff Morriss 4e19755680 Remove an unused variable and cast a string constant into a guchar. Also add newline at the end of the file.
svn path=/trunk/; revision=25829
2008-07-25 15:06:52 +00:00
Anders Broman 72c2f913e5 Try to fix some of the warnings.
svn path=/trunk/; revision=25827
2008-07-25 14:54:12 +00:00