diff options
author | dscho <dscho> | 2005-09-26 13:17:33 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-09-26 13:17:33 +0000 |
commit | da7b3e714f8f9b501cb13075f6433416410bd6aa (patch) | |
tree | 55aa6e98a630b287767a8c01b7ba976025f2ad14 /rfb | |
parent | 65bb85b9cb066ccbfe3c4b6b33b113e2a60e0abb (diff) | |
download | libvncserver-da7b3e714f8f9b501cb13075f6433416410bd6aa.zip libvncserver-da7b3e714f8f9b501cb13075f6433416410bd6aa.tar.gz |
support VNC protocol version 3.7
Diffstat (limited to 'rfb')
-rw-r--r-- | rfb/rfb.h | 22 | ||||
-rw-r--r-- | rfb/rfbproto.h | 21 |
2 files changed, 41 insertions, 2 deletions
@@ -6,6 +6,8 @@ */ /* + * Copyright (C) 2005 Rohit Kumar <rokumar@novell.com>, + * Johannes E. Schindelin <johannes.schindelin@gmx.de> * Copyright (C) 2002 RealVNC Ltd. * OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>. * Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge. @@ -143,6 +145,17 @@ typedef struct { } rfbColourMap; /* + * Security handling (RFB protocol version 3.7 + */ + +typedef struct _rfbSecurity { + uint8_t type; + void (*handler)(struct _rfbClientRec* cl); + struct _rfbSecurity* next; +} rfbSecurityHandler; + + +/* * Per-screen (framebuffer) structure. There can be as many as you wish, * each serving different clients. However, you have to call * rfbProcessEvents for each of these. @@ -265,6 +278,8 @@ typedef struct _rfbScreenInfo rfbProcessCustomClientMessageProcPtr processCustomClientMessage; in_addr_t listenInterface; + + rfbSecurityHandler* securityHandlers; } rfbScreenInfo, *rfbScreenInfoPtr; @@ -307,12 +322,16 @@ typedef struct _rfbClientRec { SOCKET sock; char *host; + /* RFB protocol minor version number */ + int protocolMinorVersion; + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD pthread_t client_thread; #endif /* Possible client states: */ enum { RFB_PROTOCOL_VERSION, /* establishing protocol version */ + RFB_SECURITY_TYPE, /* negotiating security (RFB v.3.7) */ RFB_AUTHENTICATION, /* authenticating */ RFB_INITIALISATION, /* sending initialisation messages */ RFB_NORMAL /* normal protocol messages */ @@ -582,7 +601,8 @@ extern void rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen); extern void rfbAuthNewClient(rfbClientPtr cl); extern void rfbAuthProcessClientMessage(rfbClientPtr cl); - +extern void rfbRegisterSecurityHandler(rfbScreenInfoPtr server, + rfbSecurityHandler* handler); /* rre.c */ diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 179c173..791b5f3 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -2,6 +2,7 @@ #define RFBPROTO_H /* + * Copyright (C) 2005 Rohit Kumar, Johannes E. Schindelin * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved. * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. @@ -217,12 +218,30 @@ typedef struct { #define rfbProtocolVersionFormat "RFB %03d.%03d\n" #define rfbProtocolMajorVersion 3 -#define rfbProtocolMinorVersion 3 +#define rfbProtocolMinorVersion 7 +#define rfbProtocolFallbackMinorVersion 3 typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */ #define sz_rfbProtocolVersionMsg 12 +/* + * Negotiation of the security type (protocol version 3.7) + * + * Once the protocol version has been decided, the server either sends a list + * of supported security types, or informs the client about an error (when the + * number of security types is 0). Security type rfbSecTypeTight is used to + * enable TightVNC-specific protocol extensions. The value rfbSecTypeVncAuth + * stands for classic VNC authentication. + * + * The client selects a particular security type from the list provided by the + * server. + */ + +#define rfbSecTypeInvalid 0 +#define rfbSecTypeNone 1 +#define rfbSecTypeVncAuth 2 + /*----------------------------------------------------------------------------- * Authentication |