Commit Graph

48 Commits

Author SHA1 Message Date
Stig Bjørlykke 85c8e31574 From Kovarththanan Rajaratnam via bug 3548:
More header_field_info cleanup.

From me:
Don't fix the empty name for hf_nisplus_dummy.

svn path=/trunk/; revision=28792
2009-06-21 18:45:56 +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
Bill Meier 6f92b028aa Use some default true_false_string's.
svn path=/trunk/; revision=27983
2009-04-07 12:20:41 +00:00
Jaap Keuter 8b65a8f0bb Fix for bug 3071:
Incorrect address structure assigned for find_conversation()

svn path=/trunk/; revision=26809
2008-11-19 07:27:02 +00:00
Bill Meier a042c3aedd Small changes related to proto_register & proto_reg_handoff
- Move find_dissector_table(...) to proto_reg_handoff;
 - Use dissactor_add_handle instead of registering the dissector to tcp port 0;
 - Use find_dissector when appropriate.


svn path=/trunk/; revision=26767
2008-11-13 01:31:57 +00:00
Anders Broman c29d949834 From Shmulik Bezale:
gsm sms -> reassemble + wap support
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3004

svn path=/trunk/; revision=26607
2008-10-28 19:48:55 +00:00
Anders Broman fb3d2f316b Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25336
2008-05-21 05:52:12 +00:00
Bill Meier b42aec2948 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25308
2008-05-15 13:22:06 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Jaap Keuter f37c29c2f5 Use proto functions i.s.o. manipulating node data directly.
svn path=/trunk/; revision=23940
2007-12-23 14:18:27 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +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
Jaap Keuter 792e51d00a Attempt to fix bug 1360.
Remove calls to tvb_free on subsets, since this seems to upset the tvb administration(!?)

svn path=/trunk/; revision=21772
2007-05-14 20:55:11 +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 85a464c980 Fix a bunch of warnings, add svn:keywords Id and svn:eol-style native
to packet-iuup.c.
 

svn path=/trunk/; revision=21244
2007-03-28 07:06:39 +00:00
Ulf Lamping 81297cee31 fix various const warnings
svn path=/trunk/; revision=21139
2007-03-23 00:20:59 +00:00
Anders Broman 498f530dc4 From Reinhard Speyerer:
this patch adds support for Any-encoding (WSP, 8.4.2.9) and Any-language (WSP, 8.4.2.10)

svn path=/trunk/; revision=20014
2006-11-29 06:53:48 +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
Olivier Biot f0c3253d6e Fix coverity Error CID: 15.
svn path=/trunk/; revision=17553
2006-03-09 16:21:39 +00:00
Olivier Biot 5cd8dbd028 Fix Coverity issue CID: 14 in wkh_accept_encoding().
svn path=/trunk/; revision=17539
2006-03-08 22:52:31 +00:00
Olivier Biot e931881626 Use g_print() instead of fprintf() to write messages to the debug console.
svn path=/trunk/; revision=16373
2005-11-01 18:18:46 +00:00
Gerald Combs c975c8e67a Use tvb_free() instead of g_free() to free tvbuffs.
svn path=/trunk/; revision=16220
2005-10-14 15:55:58 +00:00
Olivier Biot 6f5e84b2d7 Fix bug 492 - the MMSE dissector calls add_content_type() defined in WSP, which
uses proto_item_append_string(). The visibility hack must be present, otherwise
a dissector assert is generated within the MMSE dissector.

svn path=/trunk/; revision=16060
2005-09-30 19:29:21 +00:00
Olivier Biot 122105370d Part 2 of the fix: also add the correct offset for non-WSP address records.
svn path=/trunk/; revision=16014
2005-09-26 20:49:33 +00:00
Olivier Biot 875fb98655 Fix WSP redirect and SIR address parsing:
- The incorrect number of octets were highlighted (bearer type and port number
   were disregarded).

 - In SIR version 1 content, correct the parsing (full WSP address length was
   not added to the offset for parsing the non-WSP contact points).

svn path=/trunk/; revision=16012
2005-09-26 20:00:37 +00:00
Guy Harris 25c4bc9379 Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.

Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).

svn path=/trunk/; revision=15758
2005-09-11 21:25:37 +00:00
Ronnie Sahlberg e3a0e74e8d some more tcv_get_stringz() to tvb_get_ephemeral_stringz() conversions
svn path=/trunk/; revision=15288
2005-08-11 07:44:38 +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
Ronnie Sahlberg a2142fd8f1 more emeification of tvb_get_string()
svn path=/trunk/; revision=15133
2005-07-28 10:05:37 +00:00
Luis Ontanon 10f8560838 avoid a crash when tree is null
svn path=/trunk/; revision=15008
2005-07-23 02:07:02 +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
Ronnie Sahlberg 6879e6da67 from didier fix for the regression for bug 62
svn path=/trunk/; revision=14457
2005-05-27 21:33:27 +00:00
Ronnie Sahlberg 864245ef6e cket wsp is creating string items and later appending to them and their value at runtime which breaks when the TRY_TO_FAKE_THIS_ITEM() is used.
Add a comment to proto_item_append_string() explaining the "danger" and what needs to be done if one decides to use proto_item_append_string()

Add a small change to WSP so that it will disable this speed optimization so not to trigger a DISSECTOR_BUG in proto_item_append_string()




svn path=/trunk/; revision=14452
2005-05-27 06:00:08 +00:00
Gerald Combs efd08d91bc Add even more calls to tvb_ensure_bytes_exist().
svn path=/trunk/; revision=14111
2005-04-17 05:11:25 +00:00
Gerald Combs 67a2c952a6 Ham-fistedly drop in a bunch of tvb_ensure_bytes_exist() calls. One of
them fixes bug 46.

svn path=/trunk/; revision=14110
2005-04-17 01:42:10 +00:00
Gerald Combs d19929cd62 Add a few tvb_ensure_bytes_exist() calls. Fixes bug 35.
svn path=/trunk/; revision=14109
2005-04-16 22:25:54 +00:00
Gerald Combs 05ae084f5b Fix brokenness from previous patch.
svn path=/trunk/; revision=14031
2005-04-08 20:28:24 +00:00
Gerald Combs 388c7e2da9 Add a length check, fix up some comments.
svn path=/trunk/; revision=14029
2005-04-08 19:09:46 +00:00
Gerald Combs c92c1df4a4 Try not to call proto_tree_add_text() with negative lengths in error messages.
svn path=/trunk/; revision=14018
2005-04-05 14:40:59 +00:00
Guy Harris 189c2652f7 "tvb_get_stringz()" and "abs_time_to_str()" don't return null pointers,
so don't check whether they've done so with "DISSECTOR_ASSERT()". 
("proto_item_set_string()" and friends already do so.)

Fix indentation.

svn path=/trunk/; revision=13876
2005-03-23 03:51:38 +00:00
Olivier Biot 71d79f31c0 As suggested by Ulf Lamping, prevent Ethereal from bailing out if there's a protocol error, as we now have a DISSECTOR_ASSERT() macro.
svn path=/trunk/; revision=13869
2005-03-22 22:27:14 +00:00
Ulf Lamping b955abc3ed bugfix for buildbot randpkt: don't call proto_tree_add_string with a NULL pointer
TO THE DISSECTOR DEVELOPERS, PLEASE FIX THIS: I could easily found several places where a g_assert is called, depending on the input packet data. NEVER DO THIS, as this crashes Ethereal simply by invalid packet data input!!!

svn path=/trunk/; revision=13868
2005-03-22 21:47:11 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Guy Harris e20d80ea57 Use "plurality()" rather than locally-defined "PLURALIZE()" macros, and
get rid of the definition of "PLURALIZE()" in modules that don't use it.

svn path=/trunk/; revision=12791
2004-12-20 22:13:48 +00:00
Gerald Combs d45961b73f Replace a few instances of match_strval() with val_to_str().
svn path=/trunk/; revision=12625
2004-11-30 16:52:21 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00