Commit graph

70 commits

Author SHA1 Message Date
Alexis La Goutte
78c4f454f9 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40093
2011-12-04 18:43:05 +00:00
Stephen Fisher
082938900c Fix Coverity ID #1288: UNUSED_VALUE in spotlight_dissect_query_loop:
"returned_pointer: Pointer ... is never used" due to break and end 
of function after the switch block.


svn path=/trunk/; revision=39470
2011-10-19 16:15:53 +00:00
Stephen Fisher
20ae7e93d5 Fix Coverity ID 1300: UNUSED_VALUE in dissect_spotlight: "returned_pointer
is never used" because of the return -1 at the end of this if block.
Removed item_toc = assignment and fixed indentation.


svn path=/trunk/; revision=39469
2011-10-19 16:08:13 +00:00
Chris Maynard
c553e708a2 Cleanup AFP Version display filter name.
svn path=/trunk/; revision=39448
2011-10-17 23:58:25 +00:00
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
Guy Harris
6c3f1f0df7 Squelch some more warnings.
svn path=/trunk/; revision=39212
2011-10-02 08:58:35 +00:00
Guy Harris
b061017eca Squelch warnings (at that point, toc_offset has been determined to fit
into an int, as has offset + toc_offset + 8).

svn path=/trunk/; revision=39211
2011-10-02 08:40:03 +00:00
Guy Harris
3bad9fcc4d SQ_TYPE_NULL appears to do run-length encoding of nulls; do run-length
encoding of the list of nulls in the protocol tree, so if we have a
ridiculously large number of nulls, we don't have a ridiculously large
number of protocol tree entries, one for each null.  This should
(finally) fix bug 6378.

Add some additional sanity checks to avoid integer overflows and
underflows due to subtracting N from a value not guaranteed to be >= N.

In the big switch statements for AFP command codes, put the break
statement on a separate line, so it's a bit more obvious that the code
isn't falling through.

svn path=/trunk/; revision=39210
2011-10-02 08:12:08 +00:00
Guy Harris
e4532f21af Quit if we have a zero-length query, so we don't loop indefinitely.
Should fix bug 6378.

svn path=/trunk/; revision=39176
2011-09-28 19:08:20 +00:00
Anders Broman
c0c4fb5f21 Make query_length a gint as the lenght argument to proto_tree_add_text() is a gint.
svn path=/trunk/; revision=39067
2011-09-21 07:36:26 +00:00
Guy Harris
3e7c0390d7 From Frank Lahm: Complete dissection of AFP FPSpotlightRPC function.
From me: don't use global variables in FPSpotlightRPC dissection.

svn path=/trunk/; revision=39065
2011-09-20 19:24:07 +00:00
Guy Harris
98bbf4578d Use ENC_ values in proto_tree_add_item() calls. Use ENC_UTF_8 for
strings, and note that, for older AFP clients and servers, we might need
a way to say to use some Mac encoding instead.

Use tvb_strsize() rather than tvb_get_ephemeral_stringz() to just get
the length of a null-terminated string.

Use FT_GUID for UUIDs.

The low-order bit in the MessageBitmap in the FPGetSrvrMsg reply does
not, at least according to the current AFP spec, specify whether there's
a message at all, it specifies whether it's a server message or a login
message.  The spec *does* now mention the "message is UTF-8" bit; use
it.

Fix a blurb.

svn path=/trunk/; revision=39063
2011-09-20 17:23:16 +00:00
Stig Bjørlykke
e28a15e6ec Added some casts from spotlight_ntoh64 to guint.
svn path=/trunk/; revision=37694
2011-06-17 13:39:56 +00:00
Anders Broman
6a4ed4f4c3 From Michael Mann.
Part of "display filters with redundancies of PROTABBREV in them."
The ones left outs should be fixed differently I think.
Rename som ndps hf variables while at it.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2794

svn path=/trunk/; revision=37406
2011-05-26 06:32:51 +00:00
Jeff Morriss
d553df218e Use tvb_memeql().
Use tvb_ip_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=35547
2011-01-16 03:46:16 +00:00
Bill Meier
c17c9fff87 Use value_string_ext fcns to access certain value_string arrays;
Sort a few value_string arrays to be in ascending order by value;
Do minor reformatting and whitespace cleanup.

svn path=/trunk/; revision=34813
2010-11-08 21:59:39 +00:00
Jeff Morriss
cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Jeff Morriss
72516cc39e Replace another blurb that matches the name (case insensitive) with NULL.
svn path=/trunk/; revision=34228
2010-09-24 01:32:27 +00:00
Jeff Morriss
0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Stephen Fisher
4c6864b29b From Frank Lahm via bug #5169: Provide initial support for the undocumented
AFP FPSpotlightRPC call. 


svn path=/trunk/; revision=34083
2010-09-08 19:01:41 +00:00
Guy Harris
43ae1a4b2b Update some links.
svn path=/trunk/; revision=33969
2010-08-27 21:28:24 +00:00
Stig Bjørlykke
ec94791339 From Frank Lahm via bug 5136:
Correct volume flags for FPGetSrvrParms.

svn path=/trunk/; revision=33961
2010-08-27 20:54:21 +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
ce72d43d29 Use consistent indentation & whitespace.
svn path=/trunk/; revision=32693
2010-05-06 21:16:31 +00:00
Bill Meier
055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +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
aaa917be72 remove check_col
svn path=/trunk/; revision=32089
2010-03-03 13:52:17 +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
Bill Meier
0882e38510 Remove some unneeded (indirect) 'if(check_col()...)' guarding.
svn path=/trunk/; revision=30213
2009-09-30 13:30:35 +00:00
Jeff Morriss
e64df56967 From Didier Gautheron via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3995
There's a copy and paste error in hf_afp_vol_attribute_CaseSensitive
declaration and add kSupportsTMLockSteal

svn path=/trunk/; revision=29916
2009-09-15 01:49:01 +00:00
Anders Broman
213c607443 From Alex deVries:
DSI/AFP dissectors need support for AFP 3.3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3995

svn path=/trunk/; revision=29836
2009-09-10 06:07:31 +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
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
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
Stig Bjørlykke
b9960e08d8 Added an expert info for "IP port reused".
svn path=/trunk/; revision=28472
2009-05-25 21:10:22 +00:00
Gerald Combs
169d8cb394 From Didier Gautheron via bug 3210:
This patch improves the decoding of MapID and MapName Apple's AFP commands for
subtype 5 and 6.

svn path=/trunk/; revision=28383
2009-05-17 18:30:04 +00:00
Stig Bjørlykke
9d70ae5470 Fixed some data types to remove some warnings.
svn path=/trunk/; revision=27828
2009-03-23 13:13:05 +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
Bill Meier
c93ba4d596 Fix a few typos & spelling errors
svn path=/trunk/; revision=26014
2008-08-14 16:28:56 +00:00
Stig Bjørlykke
5ccc52fbb6 From Alex deVries (bug 2486):
This adds fpSyncFork and fpSyncDir functionality to the AFP dissector.

svn path=/trunk/; revision=25142
2008-04-21 21:36:11 +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
Guy Harris
7cc6cfb7ad Update documentation links.
svn path=/trunk/; revision=24623
2008-03-14 03:23:36 +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
840a048b7f Implement some of the minor possible speed improvment patches.
svn path=/trunk/; revision=23192
2007-10-15 20:11:25 +00:00
Guy Harris
555af2a1dc Include a link to the AFP reference, as well as to the programming
guide.

svn path=/trunk/; revision=22095
2007-06-13 23:43:07 +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
Stephen Fisher
d565967b58 From Peter Johansson:
Fix warnings


svn path=/trunk/; revision=21214
2007-03-26 21:16:21 +00:00
Ulf Lamping
db963eeb59 fix some more warnings
svn path=/trunk/; revision=21143
2007-03-23 01:55:29 +00:00
Bill Meier
3dbfb21cf9 packet-afp: remove unneeded line of code;
packet-sctp: register sctp dissector since packet-lge-monitor wants to call same


svn path=/trunk/; revision=20850
2007-02-19 01:27:16 +00:00