Commit Graph

63 Commits

Author SHA1 Message Date
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
Anders Broman 78e0a2b458 From Mike Duigou:
A patch to the JXTA dissector. It's purpose is to improve 
the behaviour of the dissector when dissecting captures that do not 
include the whole conversation.

The dissector is now more capable of isolating a conversation without 
seeing the beginning of the conversation. It's still not always able to 
pick up all conversations (suggestions, patches and hints welcome).

improved some of the doxygen docs and comments.

svn path=/trunk/; revision=15500
2005-08-21 18:42:54 +00:00
Ronnie Sahlberg c30eeef7d8 some more gmemchunk -> se_alloc() updates
there are only 5 gmemchunks left   but they have different litetime for their allocations   than the 100+   ones that have been removed.

The remaining 5 should be converted some other way.




svn path=/trunk/; revision=15328
2005-08-13 01:29:31 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Guy Harris ce7154c78a Include <epan/emem.h> to declare ep_alloc().
svn path=/trunk/; revision=15136
2005-07-29 03:47:12 +00:00
Ronnie Sahlberg 7035a45c8f ememify some more tvb_get_string() calls
one memleak in vnc related to tvb_get_string() closed.


svn path=/trunk/; revision=15130
2005-07-28 09:35:27 +00:00
Anders Broman 46a2aec7bc From Mike Duigou:
In order to get filtering of conversations and
> endpoints to work from the endpoints and conversations windows I found 
> it necessary to add a new AT_URI address type and a SAT_JXTA. This also 
> necessitated a change to to_str.c to avoid a buffer overflow problem. 
> Please review these changes carefully.
> 
> Also includes some changes to the jxta dissector to fix filtering on
> generated fields and some changes to the types used for ints/unsigned ints.
> 
> Fixes a bug with the processing of messages containing namespaces.

svn path=/trunk/; revision=14716
2005-06-20 20:15:33 +00:00