Commit Graph

70 Commits

Author SHA1 Message Date
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier b37eaa9920 Fix a benign bug in proto_tree_add_item() 'encoding' arg.
svn path=/trunk/; revision=39341
2011-10-10 19:10:13 +00:00
Bill Meier 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +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 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Bill Meier fe8caf9040 Don't assign to a proto_item * if the value won't be used: Coverity 954 & 955;
Remove some unneeded #includes;
Minor whitespace cleanup.

svn path=/trunk/; revision=36589
2011-04-12 16:12:03 +00:00
Guy Harris 132f13c2f9 If the lack of a peer conversation is a bug, use one of the
dissector-bug macros.  If it's just that we're missing some packets, we
should handle that as best we can and, if there's stuff we can't do,
maybe put something into the protocol summary or tree saying "not enough
information".  Don't just spit out a warning message which the user
might not even see.

svn path=/trunk/; revision=35426
2011-01-08 16:40:46 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman 4d2e653901 From Didier Gautheron:
Dissectors using call_dissector() function inside a 'if (tree) {}' block.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4107

svn path=/trunk/; revision=30415
2009-10-09 07:24:33 +00:00
Kovarththanan Rajaratnam 8c48c6835f Rename address_to_str() to ep_address_to_str() because:
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().

svn path=/trunk/; revision=29747
2009-09-06 14:25:47 +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 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
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke eb18a596d7 From Kovarththanan Rajaratnam:
Move hf/ett into proto_register_jxta() and do some field cleanup

svn path=/trunk/; revision=28984
2009-07-07 14:13:45 +00:00
Stig Bjørlykke 8531980952 From Kovarththanan Rajaratnam:
More hf_register_info related cleanup.

svn path=/trunk/; revision=28832
2009-06-24 02:17:12 +00:00
Anders Broman 4ec2c4ff47 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28363
2009-05-14 19:28:07 +00:00
Stephen Fisher 5f78aafa55 Fix compiler warning/errors
svn path=/trunk/; revision=27969
2009-04-06 02:50:46 +00:00
Gerald Combs 60d3b45792 More size_t casts/fixes, and string buffers.
svn path=/trunk/; revision=27968
2009-04-06 00:08:46 +00:00
Bill Meier c53d96ac3b Use ascii_strdown_inplace instead of g_ascii_strdown in a few places.
This also fixes a few cases where memory was not freed after
 g_ascii_strdown.

svn path=/trunk/; revision=27254
2009-01-17 17:33:50 +00:00
Bill Meier 45e798a430 Minor rework related to proto_reg_handoff
svn path=/trunk/; revision=26588
2008-10-27 20:43:47 +00:00
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Stig Bjørlykke 280d579242 Added missing array for hf_jxta_element2_encodingid.
svn path=/trunk/; revision=24530
2008-03-02 20:29:11 +00:00
Mike Duigou 136e5c2e1f cleanup initial comment. fix urls and email addresses.
svn path=/trunk/; revision=24224
2008-01-29 23:28:10 +00:00
Mike Duigou cb3f7e3f7d svn path=/trunk/; revision=23758 2007-12-05 04:20:21 +00:00
Jeff Morriss 309f7503e5 Get rid of C++/C99 style comments--not all compilers support them
svn path=/trunk/; revision=23608
2007-11-26 18:55:17 +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
Ronnie Sahlberg 3c17f41224 coverity 263 check if variable is null before dereferencing it
svn path=/trunk/; revision=23046
2007-10-02 08:33:38 +00:00
Guy Harris 8e87bd423f "pinfo->match_string" is a "const char *"; save it into a variable of
the same type - that makes compilers much happier.

svn path=/trunk/; revision=23029
2007-09-29 02:20:17 +00:00
Mike Duigou fc975182fe Improves dissection of JXTA traffic from http connections.
Improved address display in packet summary panes.

more options for jxta pdu filtering by addresses.

svn path=/trunk/; revision=23019
2007-09-28 20:53:56 +00:00
Jeff Morriss 6dd41716b2 Fix a known- and marked-by-a-comment memory leak: replace g_strdup() with se_strdup(). (The address in question is stored in a conversation structure so it's "seasonal".)
svn path=/trunk/; revision=22579
2007-08-21 22:18:27 +00:00
Jeff Morriss 7a57f956b8 Change COPY_ADDRESS to SE_COPY_ADDRESS: all of these appear to have "seasonal" scope (e.g., they are used in conversations or similar).
svn path=/trunk/; revision=22573
2007-08-21 21:23:37 +00:00
Sebastien Tandel 68ad2f4b9b fix MacOSX gcc-3.3 warnings about unused tfs/value_string variables
most have been tagged unused (few have been deleted if dissector has not been
modified since a long time)

move packet-ssl-utils.c to DISSECTOR_SRC


svn path=/trunk/; revision=21431
2007-04-14 14:01:53 +00:00
Richard van der Hoff 2c14858aef From Mike Duigou:
The enclosed patch corrects a problem where jxta elements were being added to the protocol tree for segments that did not contain complete jxta frames. This patch ensures that the jxta proto elements are only added those the segments that end a complete, assembled jxta frame.

The patch has been fuzz tested with a broad selection of jxta captures and ran successfully overnight for over 4000 iterations.


svn path=/trunk/; revision=21305
2007-04-03 01:31:22 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher ab8f589336 Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors
svn path=/trunk/; revision=21233
2007-03-27 22:50:11 +00:00
Jeff Morriss 109388d263 Clean up some more warnings: unused variables, unitialized variables, wrong format (%ld instead of %d) in packet-sccp.c
svn path=/trunk/; revision=21167
2007-03-24 13:46:41 +00:00
Ulf Lamping 7994794ad9 fix a lot more warnings
svn path=/trunk/; revision=21142
2007-03-23 01:29:52 +00:00
Stephen Fisher 4017f3c43a From Mike Duigou:
Adds support for dissecting the new version 2 binary wire format messages.


svn path=/trunk/; revision=20836
2007-02-18 03:30:20 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Gerald Combs 063621f11b Fix potential buffer overruns in address_to_str_buf() found by Andrej
Mikus.  Add a buf_len parameter to ip_to_str_buf(), and make sure it's 
enforced.  Copy the release notes over from the 0.99.5 trunk and add a
note about the ISUP dissector (which is affected by the overrun).

svn path=/trunk/; revision=20607
2007-01-29 20:25:26 +00:00
Ronnie Sahlberg 2258dfd5a9 coverity 172
remove a dead code condition


svn path=/trunk/; revision=18565
2006-06-23 23:44:17 +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
Guy Harris 5179074cd1 UDP and SCTP aren't byte-stream protocols, so they don't offer TCP-style
reassembly.  UDP has no notion of reassembly - that's done at the IP
layer - and SCTP has its own notions of reassembly which it currently
doesn't provide.  As such, TCP-style reassembly isn't possible for
JXTA-over-UDP or JXTA-over-SCTP.

As for TCP, a heuristic dissector for a TCP-based protocol can't request
more data if it's rejecting a packet; make it not do so.  That should
fix the recent buildbot crash, although there are still some reassembly
problems with that capture (c05-http-reply-r1.pcap.gz in the menagerie
and on the SampleCaptures page of the Wiki) that aren't fixed yet.

svn path=/trunk/; revision=18049
2006-05-01 02:28:01 +00:00
Anders Broman e4bdd466cf From Mike Duigou:
> I have improved the heuristics and the display tree building code in
> dissect_jxta_udp() and dissect_jxta_stream() to avoid this problem.

svn path=/trunk/; revision=17709
2006-03-23 18:42:25 +00:00
Ulf Lamping 854c700502 don't use g_message() inside dissector code
svn path=/trunk/; revision=17557
2006-03-09 21:18:44 +00:00
Ulf Lamping e147c558bf fix bug 772: and again, don't pass a NULL pointer to a printf like function on WIN32
svn path=/trunk/; revision=17535
2006-03-08 21:39:25 +00:00
Anders Broman 4621cc9150 From Mike Duigou:
- Improves ability of dissector to find conversations without seeing 
whole stream.

- Fixes some issues with dissection of data which requires reassembly.

- Adds the ability to dissect jxta conversations from SCTP streams.

- Better handling of welcome message.

- Adds direct dissection of compressed SRDI data.

- Has been run through extensive fuzz testing.

- Fixes compiler warnings with previous patch 17141

svn path=/trunk/; revision=17282
2006-02-13 19:45:38 +00:00
Anders Broman 598dc71801 From Mike Duigou
A patch to allow the JXTA dissector to pass fuzz testing. It 
also removes a couple of unused things and optimizes handling of the raw 
data dissector.

svn path=/trunk/; revision=16051
2005-09-29 05:37:27 +00:00