Commit Graph

65 Commits

Author SHA1 Message Date
Michael Mann 757361f4d4 Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5469. Added more comments to make the function of vnc_is_client_or_server_version_message() very clear.
Also includes some minor cleanup of proto_tree_add_text -> proto_tree_add_item

svn path=/trunk/; revision=43814
2012-07-19 00:29:11 +00:00
Bill Meier 7882ec57c3 Improve use of the value_string x11_keysym_vals_source[]:
- Compile the value_string only as part of packet-x11.c
 - Create a value_string_ext to ref the value_string;
 - packet_vnc.c: Access the value_string using the value_string_ext;
 - packet-x11.c: Access the value-string using the value_string_ext
                 rather then building a temp GTree from the value_string.

svn path=/trunk/; revision=43558
2012-07-03 18:49:12 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 198c9ba55f FT_BOOLEAN hf[] entries with a 0 'bitmask' should have 'display' = BASE_NONE;
In some cases:
 Use val_to_str_const() instead of val_to_str();
 Reformat long lines;
 Do some general whitespace changes.


svn path=/trunk/; revision=41587
2012-03-16 02:00:29 +00:00
Bill Meier 30cee99009 Fix a number of proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39774
2011-11-09 17:33:18 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +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
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
Jeff Morriss e55e144bc8 Don't create a subtree that is not used.
svn path=/trunk/; revision=36808
2011-04-22 14:32:35 +00:00
Chris Maynard d69a7dac79 Cast to guint to avoid a Windows compiler warning.
svn path=/trunk/; revision=36389
2011-03-28 22:22:05 +00:00
Stephen Fisher d4649392d8 Fix for bug #4334 "VNC Hextile encoding is incomplete" from Yaniv Kaul.
svn path=/trunk/; revision=36386
2011-03-28 20:53:20 +00:00
Stephen Fisher 3a8bd554fe Fix coverity 268, 269, 546, 547, 548, 549 by checking for null return
from p_get_proto_data() since it should have been set already by the
calling function.  Any other case would be a bug, so call
DISSECTOR_ASSERT in those cases.  Hopefully Coverity realizes that this
is a null return value check.


svn path=/trunk/; revision=36337
2011-03-25 22:16:23 +00:00
Jaap Keuter af7e7f1004 From Yaniv Kaul:
This one parses the extended desktop size pseudo-encoding, as specified in
http://www.tigervnc.com/cgi-bin/rfbproto#extendeddesktopsize-pseudo-encoding

svn path=/trunk/; revision=36022
2011-02-21 21:12:21 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss f424256889 Verify the number of rectangles, sub-rectangles, the number of bytes of cut
text, etc. are "sane" before:
1) requesting enough bytes (from reassembly) to dissect them all
2) (and) attempting to add them all to the tree

Request all the bytes we'll need to dissect all those rectangles/sub-rectangles
before starting dissection rather than checking before dissecting each
rectangle/sub-rectangle.

Use tvb_get_ephemeral_string().

Use _U_ to mark unused arguments.

Fix up some indentation.

Get rid of one more DISSECTOR_ASSERT.

svn path=/trunk/; revision=34977
2010-11-19 18:54:19 +00:00
Jeff Morriss 8f642bdb5c From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5366 :
Several fixes that make Tight VNC negotiation properly parsed.
It was not parsed correctly previously, for multiple reasons.

svn path=/trunk/; revision=34976
2010-11-19 18:53:40 +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
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 a1149978bd From Yaniv Kaul: minor changes + smallest additions
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4339#c5

From Me:
 - Use VNC_... as the initial part of various enum identifiers to
   ensure that they are unique since they are part of the global namespace;
 - Fix some indentatiom;

svn path=/trunk/; revision=31876
2010-02-13 16:42:01 +00:00
Bill Meier c7a7cf0771 Remove unneeded #includes.
svn path=/trunk/; revision=31465
2010-01-08 00:24:45 +00:00
Bill Meier ca9fd88be4 From Yaniv Kaul: VNC dissector cleanups and minor changes.
From me: Several fixes to the patch and some additional cleanup.

svn path=/trunk/; revision=31464
2010-01-07 23:34:39 +00:00
Stephen Fisher ae2b555a96 Fix a number of copy & paste errors introduced over various checkins and
change duplicated filter names used for different purposes by inserting
another word to differentiate between them.


svn path=/trunk/; revision=31274
2009-12-15 08:05:14 +00:00
Jaap Keuter 1e90e0e29a From Yaniv Kaul:
Attached patch fixes the dissection of the Set Colormap Entries server message. 
It was at least off-by-one to start with, and the dissection went a bit wrong from there on.

svn path=/trunk/; revision=31273
2009-12-15 07:45:14 +00:00
Jaap Keuter 98aaf48d95 From Yaniv Kaul:
VNC dissector fails to dissect properly the authentication used by the older
VNC protocol. Specifically, the part about version 3.3 in section 6.2 of the 
protocol was ignored / not properly implemented.

svn path=/trunk/; revision=31250
2009-12-12 08:39:38 +00:00
Gerasimos Dimitriadis c840cdd5a0 Remove the address operator from value_string arrays fed to VALS()
svn path=/trunk/; revision=30995
2009-11-17 18:35:27 +00:00
Kovarththanan Rajaratnam 00810ff199 * Prefer col_append_str instead of col_append_fstr for constant strings
* Remove check_col guards

svn path=/trunk/; revision=30127
2009-09-24 20:21:23 +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
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam 4b6090e576 Don't guard col_set_str (COL_INFO) with col_check
svn path=/trunk/; revision=29342
2009-08-09 07:01:26 +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
Stephen Fisher c4680240d9 Change my e-mail address
svn path=/trunk/; revision=28537
2009-05-31 05:55:15 +00:00
Gerald Combs 79c4c2990b Remove unnecessary tree checks pointed out by Stig.
svn path=/trunk/; revision=28396
2009-05-18 19:14:21 +00:00
Guy Harris a9f463bee4 Clean up indentation.
svn path=/trunk/; revision=28395
2009-05-18 17:47:42 +00:00
Gerald Combs 23d52583ca From Yaniv Kaul via bug 3215:
Attached please find a patch that enables to heuristically find VNC
traffic on non-standard ports.

(it also adds some if(tree) ... around some proto_tree_add_item()
functions)

svn path=/trunk/; revision=28394
2009-05-18 17:23:16 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Bill Meier 79a1441582 FT_BOOLEAN fields w/o bitmasks really should use BASE_NONE (not BASE_DEC,...).
svn path=/trunk/; revision=28317
2009-05-08 20:35:57 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Jörg Mayer 4149a23cc5 Trivial warning fixes
svn path=/trunk/; revision=26899
2008-12-02 08:11:23 +00:00
Stephen Fisher 5378ecb53e Fix copy & paste typo
svn path=/trunk/; revision=26882
2008-11-30 10:27:53 +00:00
Stig Bjørlykke 85eab2967b From Federico Mena Quintero (bug 3070):
Add support for TightVNC extensions to the VNC dissector.

It has the following changes:
- Dissect TightVNC negotiation (tunneling, basic authentication, capabilities).
- Dissect X cursor encoding.
- Dissect POINTER_POS encoding.
- Dissect the general form of Tight rectangles.
- Dissect Tight image data (basic compression, JPEG, gradient).
- Handle LastRect encoding.
- Fix some always-true conditions.
- Some code cleanups.

svn path=/trunk/; revision=26825
2008-11-23 14:09:04 +00:00
Jaap Keuter b95f7e92ae Fix for bug 2875:
Fix a final eth_fopen -> ws_fopen
When configuring with --without-zlib these functions need to have some parameters tagged _U_

svn path=/trunk/; revision=26212
2008-09-15 21:50:50 +00:00
Bill Meier 419e3a47f6 Cleanup related to prefs & proto_reg_handoff
svn path=/trunk/; revision=26128
2008-09-03 16:42:35 +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 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