aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-vnc.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-09Fix a number of proto_tree_add_item() encoding args.wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39774 f5534014-38df-0310-8fa8-9805f1628bb7
2011-11-01Remove comma at the end of several enumerator lists.morriss1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39700 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-24Fix encoding arg for various fcn calls:wmeier1-6/+6
- 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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39539 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.wmeier1-1/+1
Also: remove trailing whitespace for a number of files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39503 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.wmeier1-31/+31
(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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39442 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵wmeier1-6/+6
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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39426 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-11/+11
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) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39328 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-62/+62
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39288 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵wmeier1-25/+25
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39260 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-22Don't create a subtree that is not used.morriss1-4/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36808 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-28Cast to guint to avoid a Windows compiler warning.cmaynard1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36389 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-28Fix for bug #4334 "VNC Hextile encoding is incomplete" from Yaniv Kaul.sfisher1-82/+103
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36386 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-25Fix coverity 268, 269, 546, 547, 548, 549 by checking for null returnsfisher1-6/+15
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36337 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-21From Yaniv Kaul:jake1-3/+82
This one parses the extended desktop size pseudo-encoding, as specified in http://www.tigervnc.com/cgi-bin/rfbproto#extendeddesktopsize-pseudo-encoding git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36022 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-6/+6
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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-11-19Verify the number of rectangles, sub-rectangles, the number of bytes of cutmorriss1-75/+103
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34977 f5534014-38df-0310-8fa8-9805f1628bb7
2010-11-19From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5366 :morriss1-51/+109
Several fixes that make Tight VNC negotiation properly parsed. It was not parsed correctly previously, for multiple reasons. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34976 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.morriss1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34227 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-13As suggested in ↵morriss1-109/+100
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32790 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-13From Yaniv Kaul: minor changes + smallest additionswmeier1-200/+282
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; git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31876 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-08Remove unneeded #includes.wmeier1-4/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31465 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-07From Yaniv Kaul: VNC dissector cleanups and minor changes.wmeier1-96/+110
From me: Several fixes to the patch and some additional cleanup. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31464 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-15Fix a number of copy & paste errors introduced over various checkins andsfisher1-8/+8
change duplicated filter names used for different purposes by inserting another word to differentiate between them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31274 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-15From Yaniv Kaul:jake1-8/+16
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31273 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-12From Yaniv Kaul:jake1-22/+45
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31250 f5534014-38df-0310-8fa8-9805f1628bb7
2009-11-17Remove the address operator from value_string arrays fed to VALS()dimeg1-8/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30995 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-24* Prefer col_append_str instead of col_append_fstr for constant stringskrj1-2/+1
* Remove check_col guards git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30127 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkkrj1-4/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29345 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_clear with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29344 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_INFO) with col_checkkrj1-60/+22
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29342 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29340 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-3/+3
(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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-31Change my e-mail addresssfisher1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28537 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-18Remove unnecessary tree checks pointed out by Stig.gerald1-16/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28396 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-18Clean up indentation.guy1-133/+133
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28395 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-18From Yaniv Kaul via bug 3215:gerald1-29/+84
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) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28394 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-13Apply some of the patches from:etxrab1-2/+1
http://wiki.wireshark.org/Development/Optimization git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28356 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-08FT_BOOLEAN fields w/o bitmasks really should use BASE_NONE (not BASE_DEC,...).wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28317 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-20Fix various typos and spelling errors (mostly in text strings)wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27065 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-02Trivial warning fixesjmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26899 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-30Fix copy & paste typosfisher1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26882 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-23From Federico Mena Quintero (bug 3070):stig1-106/+762
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26825 f5534014-38df-0310-8fa8-9805f1628bb7
2008-09-15Fix for bug 2875:jake1-1/+6
Fix a final eth_fopen -> ws_fopen When configuring with --without-zlib these functions need to have some parameters tagged _U_ git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26212 f5534014-38df-0310-8fa8-9805f1628bb7
2008-09-03Cleanup related to prefs & proto_reg_handoffwmeier1-33/+31
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26128 f5534014-38df-0310-8fa8-9805f1628bb7
2008-04-09Remove:etxrab1-3/+0
#ifdef NEED_G_ASCII_STRCASECMP_H #include "g_ascii_strcasecmp.h" #endif git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24859 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-27strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delendaguy1-3/+7
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23623 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-06use strcasecmp instead of g_ascii_strcasecmpsahlberg1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23372 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-03Add partial support for TightVNC packet dissection (work in progress). sfisher1-7/+195
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23345 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-30Minor correction to protocol behavior handling when security type "none" issfisher1-4/+6
selected by the client. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23312 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-30Fix for issue #1 in bug #1947 by doing a major overhaul of how the firstsfisher1-311/+294
nine or so packets are handled to accommodate authentication type none and to allow cleaner future improvements. Includes a few touch ups to the rest of the dissector as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23310 f5534014-38df-0310-8fa8-9805f1628bb7