Restructure VNC lib_mod_connect()

1) Restructure lib_mod_connect() along the lines of the PDUs documented
   in RFC 6143.
2) Logging in lib_mod_connect() has been revised and improved.
3) Wrinkles around version 3.7 and 3.8 of the RFB protocol are
   now addressed.
4) Some new definitions are added to rfb.h to replace the use
   of magic numbers.
This commit is contained in:
matt335672
2025-03-17 11:50:47 +00:00
parent 527d21b0a1
commit 4b2155b6cf
2 changed files with 671 additions and 410 deletions
+22
View File
@@ -58,6 +58,28 @@ typedef uint32_t encoding_type;
#define RFB_ENC_DESKTOP_SIZE (encoding_type)-223
#define RFB_ENC_EXTENDED_DESKTOP_SIZE (encoding_type)-308
/* Security types defined in RFC6143 7.2 (RFB Community wiki 7.1.2) */
enum sec_type
{
SEC_TYPE_INVALID = 0,
SEC_TYPE_NONE = 1,
SEC_TYPE_VNC_AUTH = 2,
SEC_TYPE_MAX = SEC_TYPE_VNC_AUTH // Max supported security type
};
#define SEC_TYPE_TO_STR(st) \
(((st) == SEC_TYPE_INVALID) ? "Invalid" : \
((st) == SEC_TYPE_NONE) ? "None" : \
((st) == SEC_TYPE_VNC_AUTH) ? "VNC Auth" : "Unknown")
/* Constructs an RFB version from a major and minor version */
#define MAKE_RFBPROTO_VER(maj,min) ((maj * 1000) + (min))
/* Convenience macros */
#define RFBPROTO_VER_3_3 MAKE_RFBPROTO_VER(3,3)
#define RFBPROTO_VER_3_7 MAKE_RFBPROTO_VER(3,7)
#define RFBPROTO_VER_3_8 MAKE_RFBPROTO_VER(3,8)
/**
* Returns an error string for an ExtendedDesktopSize status code
*/
+649 -410
View File
File diff suppressed because it is too large Load Diff