Commit Graph

48 Commits

Author SHA1 Message Date
Jeff Morriss 8d32d2066a 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() or
tvb_get_const_stringz().

Use tvb_memeql() & tvb_memcmp().

svn path=/trunk/; revision=35558
2011-01-16 20:51:21 +00:00
Bill Meier 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +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
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
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
Anders Broman 6c25896d84 From Kovarththanan Rajaratnam:
No letter-shortcuts in Telephony menu.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3678

svn path=/trunk/; revision=29028
2009-07-08 18:36:31 +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
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Bill Meier ee180aec41 smpp: Fix potential crash(es): Mark hf[] entries with a range_string[] with BASE_RANGE_STRING in 'display' field;
svn path=/trunk/; revision=28124
2009-04-22 16:06:14 +00:00
Gerald Combs 453cd58768 Fix a typo.
svn path=/trunk/; revision=27929
2009-04-02 03:51:42 +00:00
Gerald Combs 3a4a3643c2 The format argument of val_to_str() formats a guint32, not a char *. Fixes
bug 3383.

svn path=/trunk/; revision=27928
2009-04-02 03:44:00 +00:00
Bill Meier 2baf9bd747 From Abhik Sarkar: SMPP TLV tag value_strings.
"I have chosen _not_ to use the value_string array in the header field for the
 tag because the information appears in too many places - once in the sub-tree
 and again once in the field which displays the value. Displaying the tag name
 again in the tag field would make the same information appear three times in
 four lines."
 See Bug #3369 [https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3369]

From me: Use consistent indentation throughout packet-smpp.c

svn path=/trunk/; revision=27922
2009-04-01 13:22:07 +00:00
Anders Broman b666a7942e More size_t casts.
svn path=/trunk/; revision=27887
2009-03-29 18:26:06 +00:00
Stig Bjørlykke 4932b881f2 Removed C++ style comments.
svn path=/trunk/; revision=27791
2009-03-18 23:06:08 +00:00
Richard van der Hoff 0bf1ff9f10 improve dissection of optional parameters. In particular, make the tag and length fields explicit.
svn path=/trunk/; revision=27780
2009-03-18 20:31:15 +00:00
Ulf Lamping f904f42f9d Remove an ugly hack:
There was an ugly hack while creating the menu, that tried to detect the stat_group a stats_tree belongs to by looking at the name string. That makes it unnecessarily hard to understand how the menu is really created.

Fix: Add a new function stats_tree_register_with_group() that takes the stat_group as a parameter. Use this function where a stats_tree doesn't fit into the default "unsorted" group.

svn path=/trunk/; revision=27407
2009-02-10 03:54:55 +00:00
Jaap Keuter dbb9f54e4f From Robert Groenenberg:
The SMPP optional parameter 'network_error_code' is decoded incorrectly. This field is 
present in SMPP (v3.4 and higher) deliver_sm messages containing a delivery notification.

This TLV contains 3 bytes of data, which is decoded in two steps, each adjusting the 
offset in the message. After that the offset is increased *again*, causing the next 
TLVs to not recognised. Removing the indicated increase in offset fixes the problem.

svn path=/trunk/; revision=27177
2009-01-07 08:10:21 +00:00
Bill Meier a8f30cbca1 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27037
2008-12-17 17:23:37 +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
Bill Meier aa30dcd129 Minor proto_reg_handoff cleanup: use find_dissector when appropriate.
svn path=/trunk/; revision=26308
2008-09-30 14:49:44 +00:00
Jeff Morriss 20193e363e From Abhik Sarkar via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2707
The SMPP dissector currently supports only version 3.4. The latest version of
the protocol is version 5.0 and it has been around for a while. However, the
usage of this version of the protocol is only now picking up. 

This patch adds basic support for SMPP 5.0. By basic I mean:
- New Operations and Responses.
- New TLVs.
- New Error codes.
- Any changes to earlier values. 

svn path=/trunk/; revision=25787
2008-07-22 12:13:38 +00:00
Jeff Morriss 71c1e4faf0 Change the stats tree API to use signed chars instead of guint8s for all its
strings; this should fix a number of signed/unsigned char warnings.
Reindent a bunch, too.

svn path=/trunk/; revision=25716
2008-07-11 21:13:39 +00:00
Jaap Keuter c22bfae716 Fix for bug 1603:
SMPP validity period as relative time interpretation corrected.

svn path=/trunk/; revision=25001
2008-04-13 21:54:07 +00:00
Jaap Keuter 9f82b15448 From Abhik Sarkar:
The attached patch changes the handling of the parameters in question to octet
string instead of string

svn path=/trunk/; revision=24662
2008-03-17 07:30:22 +00:00
Jeff Morriss d7fb23f849 Fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2111 : After verifying that there's enough TVB for the smallest possible message, also verify that the length parameter in the message is at least that big.
svn path=/trunk/; revision=24063
2008-01-10 23:16:59 +00:00
Jaap Keuter 7a76c45b04 From Abhik Sarkar:
This patch adds initial support for statistics to the SMPP dissector using the Stats Tree API.

svn path=/trunk/; revision=23931
2007-12-21 08:16:47 +00:00
Martin Mathieson 325bd496a4 Make this dissector finable by name.
svn path=/trunk/; revision=22908
2007-09-19 17:33:08 +00:00
Jeff Morriss caf9f71cee When saving off a temporary copy of an address, use SET_ADDRESS instead of COPY_ADDRESS so as to avoid a memory leak (or adding g_free() calls to fix said memory leak).
svn path=/trunk/; revision=22568
2007-08-21 20:24:17 +00:00
Jaap Keuter e9577b77f5 Fix for bug 1512:
Present user with the invalid time string.

svn path=/trunk/; revision=22052
2007-06-05 20:36:23 +00:00
Jaap Keuter 08a6f4ed7b Fix for bug 1642:
Added hf_smpp_sms_signal to hf_array.

svn path=/trunk/; revision=22051
2007-06-05 20:26:03 +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
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman 2bf7bd3a45 From Jacques, Olivier
Here is a patch for gsm_map dissector that adds USSD string decoding (mainly used in processUnstructuredSS-Request, UnstructuredSS-Request, UnstructuredSS-Notify). For now, it assumes that it will be GSM 7 bits.
It re-use packet-gsm_sms.c "gsm_sms_char_7bit_unpack" and "gsm_sms_char_ascii_decode" functions, as well as packet-smpp.c "smpp_handle_dcs" function.

svn path=/trunk/; revision=17739
2006-03-27 18:48:33 +00:00
Jörg Mayer 735ba01eb1 Bill Meier: More spelling fixes
svn path=/trunk/; revision=16965
2006-01-06 03:26:45 +00:00
Jörg Mayer f9a57f08d1 Bill Meier:
Spelling fixes.

svn path=/trunk/; revision=16956
2006-01-05 13:01:08 +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
Ulf Lamping 9a42ef9536 fix #480: Change defaults for all reassembling settings to ON
I've changed all settings I could find to TRUE. It might be reasonable to change some protocol settings back to FALSE, if reassembling fails very often.

svn path=/trunk/; revision=16048
2005-09-28 22:15:38 +00:00
Ronnie Sahlberg ec488447dc more sprintf removals,
replace some char arrays on the stack to ep_alloc()ed memory


svn path=/trunk/; revision=15446
2005-08-19 23:28:23 +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
Ulf Lamping 2ce8d2a30f fixed various issues (two serious ones) found by "private" fuzz-testing
svn path=/trunk/; revision=14830
2005-07-01 21:04:13 +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
Gerald Combs 06a47f5880 Fix Win32 compilation, broken by yesterday's checkin.
svn path=/trunk/; revision=14664
2005-06-16 19:51:14 +00:00
Gerald Combs c2b9534398 Catch an infinite loop in smpp_handle_dlist(). Fixes bug 246.
svn path=/trunk/; revision=14639
2005-06-15 21:42:30 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Guy Harris 0667d869b2 From Chris Maynard: free mallocated strings when we're done with them.
(There's still the risk of a leak if we throw an exception before we
free the string.)

Clean up indentation.

svn path=/trunk/; revision=12973
2005-01-07 10:39:51 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ulf Lamping d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +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