File tree Expand file tree Collapse file tree 2 files changed +655
-320
lines changed Expand file tree Collapse file tree 2 files changed +655
-320
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,28 @@ typedef uint32_t encoding_type;
58
58
#define RFB_ENC_DESKTOP_SIZE (encoding_type)-223
59
59
#define RFB_ENC_EXTENDED_DESKTOP_SIZE (encoding_type)-308
60
60
61
+ /* Security types defined in RFC6143 7.2 (RFB Community wiki 7.1.2) */
62
+ enum sec_type
63
+ {
64
+ SEC_TYPE_INVALID = 0 ,
65
+ SEC_TYPE_NONE = 1 ,
66
+ SEC_TYPE_VNC_AUTH = 2 ,
67
+ SEC_TYPE_MAX = SEC_TYPE_VNC_AUTH // Max supported security type
68
+ };
69
+
70
+ #define SEC_TYPE_TO_STR (st ) \
71
+ (((st) == SEC_TYPE_INVALID) ? "Invalid" : \
72
+ ((st) == SEC_TYPE_NONE) ? "None" : \
73
+ ((st) == SEC_TYPE_VNC_AUTH) ? "VNC Auth" : "Unknown")
74
+
75
+ /* Constructs an RFB version from a major and minor version */
76
+ #define MAKE_RFBPROTO_VER (maj ,min ) ((maj * 1000) + (min))
77
+
78
+ /* Convenience macros */
79
+ #define RFBPROTO_VER_3_3 MAKE_RFBPROTO_VER(3,3)
80
+ #define RFBPROTO_VER_3_7 MAKE_RFBPROTO_VER(3,7)
81
+ #define RFBPROTO_VER_3_8 MAKE_RFBPROTO_VER(3,8)
82
+
61
83
/**
62
84
* Returns an error string for an ExtendedDesktopSize status code
63
85
*/
You can’t perform that action at this time.
0 commit comments