LibVNCServer/LibVNCClient
Data Structures | Macros | Functions | Variables
rfbserver.c File Reference
#include <stdio.h>
#include <string.h>
#include <rfb/rfb.h>
#include <rfb/rfbregion.h>
#include "private.h"
#include "rfb/rfbconfig.h"
#include <pwd.h>
#include "sockets.h"
#include <stdarg.h>
#include "scale.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <time.h>
#include <limits.h>
+ Include dependency graph for rfbserver.c:

Go to the source code of this file.

Data Structures

struct  rfbClientIteratorPtr
 
struct  RFB_FILETIME
 
struct  RFB_FIND_DATA
 

Macros

#define DEBUGPROTO(x)
 
#define rfbSetBit(buffer, position)   (buffer[(position & 255) / 8] |= (1 << (position % 8)))
 
#define FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN(msg, cl, ret)
 
#define MAX_PATH   260
 
#define RFB_FILE_ATTRIBUTE_READONLY   0x1
 
#define RFB_FILE_ATTRIBUTE_HIDDEN   0x2
 
#define RFB_FILE_ATTRIBUTE_SYSTEM   0x4
 
#define RFB_FILE_ATTRIBUTE_DIRECTORY   0x10
 
#define RFB_FILE_ATTRIBUTE_ARCHIVE   0x20
 
#define RFB_FILE_ATTRIBUTE_NORMAL   0x80
 
#define RFB_FILE_ATTRIBUTE_TEMPORARY   0x100
 
#define RFB_FILE_ATTRIBUTE_COMPRESSED   0x800
 

Functions

void rfbIncrClientRef (rfbClientPtr cl)
 
void rfbDecrClientRef (rfbClientPtr cl)
 
void rfbClientListInit (rfbScreenInfoPtr rfbScreen)
 
rfbClientIteratorPtr rfbGetClientIterator (rfbScreenInfoPtr rfbScreen)
 
rfbClientIteratorPtr rfbGetClientIteratorWithClosed (rfbScreenInfoPtr rfbScreen)
 
rfbClientPtr rfbClientIteratorHead (rfbClientIteratorPtr i)
 
rfbClientPtr rfbClientIteratorNext (rfbClientIteratorPtr i)
 
void rfbReleaseClientIterator (rfbClientIteratorPtr iterator)
 
void rfbNewClientConnection (rfbScreenInfoPtr rfbScreen, rfbSocket sock)
 
rfbClientPtr rfbReverseConnection (rfbScreenInfoPtr rfbScreen, char *host, int port)
 
void rfbSetProtocolVersion (rfbScreenInfoPtr rfbScreen, int major_, int minor_)
 Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported. More...
 
rfbClientPtr rfbNewClient (rfbScreenInfoPtr rfbScreen, rfbSocket sock)
 
rfbClientPtr rfbNewUDPClient (rfbScreenInfoPtr rfbScreen)
 
void rfbClientConnectionGone (rfbClientPtr cl)
 
void rfbProcessClientMessage (rfbClientPtr cl)
 
void rfbClientSendString (rfbClientPtr cl, const char *reason)
 
void rfbClientConnFailed (rfbClientPtr cl, const char *reason)
 
rfbBool rfbSendKeyboardLedState (rfbClientPtr cl)
 
rfbBool rfbSendSupportedMessages (rfbClientPtr cl)
 
rfbBool rfbSendSupportedEncodings (rfbClientPtr cl)
 
void rfbSetServerVersionIdentity (rfbScreenInfoPtr screen, char *fmt,...)
 
rfbBool rfbSendServerIdentity (rfbClientPtr cl)
 
rfbBool rfbSendXvp (rfbClientPtr cl, uint8_t version, uint8_t code)
 
rfbBool rfbSendTextChatMessage (rfbClientPtr cl, uint32_t length, char *buffer)
 send a TextChat message to a client More...
 
rfbBool rfbSendFileTransferMessage (rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, const char *buffer)
 
rfbBool rfbFilenameTranslate2UNIX (rfbClientPtr cl, char *path, char *unixPath, size_t unixPathMaxLen)
 
rfbBool rfbFilenameTranslate2DOS (rfbClientPtr cl, char *unixPath, char *path)
 
rfbBool rfbSendDirContent (rfbClientPtr cl, int length, char *buffer)
 
char * rfbProcessFileTransferReadBuffer (rfbClientPtr cl, uint32_t length)
 
rfbBool rfbSendFileTransferChunk (rfbClientPtr cl)
 
rfbBool rfbProcessFileTransfer (rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length)
 
rfbBool rfbSendFramebufferUpdate (rfbClientPtr cl, sraRegionPtr givenUpdateRegion)
 
rfbBool rfbSendCopyRegion (rfbClientPtr cl, sraRegionPtr reg, int dx, int dy)
 
rfbBool rfbSendRectEncodingRaw (rfbClientPtr cl, int x, int y, int w, int h)
 
rfbBool rfbSendLastRectMarker (rfbClientPtr cl)
 
rfbBool rfbSendNewFBSize (rfbClientPtr cl, int w, int h)
 
rfbBool rfbSendExtDesktopSize (rfbClientPtr cl, int w, int h)
 
rfbBool rfbSendUpdateBuf (rfbClientPtr cl)
 
rfbBool rfbSendSetColourMapEntries (rfbClientPtr cl, int firstColour, int nColours)
 
void rfbSendBell (rfbScreenInfoPtr rfbScreen)
 
void rfbSendServerCutText (rfbScreenInfoPtr rfbScreen, char *str, int len)
 
void rfbNewUDPConnection (rfbScreenInfoPtr rfbScreen, rfbSocket sock)
 
void rfbProcessUDPInput (rfbScreenInfoPtr rfbScreen)
 

Variables

int DB = 1
 

Macro Definition Documentation

◆ DEBUGPROTO

#define DEBUGPROTO (   x)

Definition at line 58 of file rfbserver.c.

◆ FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN

#define FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN (   msg,
  cl,
  ret 
)
Value:
if ((cl->screen->getFileTransferPermission != NULL \
&& cl->screen->getFileTransferPermission(cl) != TRUE) \
|| cl->screen->permitFileTransfer != TRUE) { \
rfbLog("%sUltra File Transfer is disabled, dropping client: %s\n", msg, cl->host); \
rfbCloseClient(cl); \
return ret; \
}
#define TRUE
Definition: rfbproto.h:112

Definition at line 1201 of file rfbserver.c.

◆ MAX_PATH

#define MAX_PATH   260

Definition at line 1254 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_ARCHIVE

#define RFB_FILE_ATTRIBUTE_ARCHIVE   0x20

Definition at line 1278 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_COMPRESSED

#define RFB_FILE_ATTRIBUTE_COMPRESSED   0x800

Definition at line 1281 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_DIRECTORY

#define RFB_FILE_ATTRIBUTE_DIRECTORY   0x10

Definition at line 1277 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_HIDDEN

#define RFB_FILE_ATTRIBUTE_HIDDEN   0x2

Definition at line 1275 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_NORMAL

#define RFB_FILE_ATTRIBUTE_NORMAL   0x80

Definition at line 1279 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_READONLY

#define RFB_FILE_ATTRIBUTE_READONLY   0x1

Definition at line 1274 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_SYSTEM

#define RFB_FILE_ATTRIBUTE_SYSTEM   0x4

Definition at line 1276 of file rfbserver.c.

◆ RFB_FILE_ATTRIBUTE_TEMPORARY

#define RFB_FILE_ATTRIBUTE_TEMPORARY   0x100

Definition at line 1280 of file rfbserver.c.

◆ rfbSetBit

#define rfbSetBit (   buffer,
  position 
)    (buffer[(position & 255) / 8] |= (1 << (position % 8)))

Definition at line 930 of file rfbserver.c.

Function Documentation

◆ rfbClientIteratorHead()

rfbClientPtr rfbClientIteratorHead ( rfbClientIteratorPtr  i)

Definition at line 193 of file rfbserver.c.

+ Here is the call graph for this function:

◆ rfbClientSendString()

void rfbClientSendString ( rfbClientPtr  cl,
const char *  reason 
)

Definition at line 723 of file rfbserver.c.

◆ rfbFilenameTranslate2DOS()

rfbBool rfbFilenameTranslate2DOS ( rfbClientPtr  cl,
char *  unixPath,
char *  path 
)

Definition at line 1321 of file rfbserver.c.

◆ rfbFilenameTranslate2UNIX()

rfbBool rfbFilenameTranslate2UNIX ( rfbClientPtr  cl,
char *  path,
char *  unixPath,
size_t  unixPathMaxLen 
)

Definition at line 1283 of file rfbserver.c.

◆ rfbGetClientIteratorWithClosed()

rfbClientIteratorPtr rfbGetClientIteratorWithClosed ( rfbScreenInfoPtr  rfbScreen)

Definition at line 180 of file rfbserver.c.

◆ rfbSendKeyboardLedState()

rfbBool rfbSendKeyboardLedState ( rfbClientPtr  cl)

Definition at line 902 of file rfbserver.c.

◆ rfbSendServerIdentity()

rfbBool rfbSendServerIdentity ( rfbClientPtr  cl)

Definition at line 1094 of file rfbserver.c.

◆ rfbSendSupportedEncodings()

rfbBool rfbSendSupportedEncodings ( rfbClientPtr  cl)

Definition at line 1005 of file rfbserver.c.

◆ rfbSendSupportedMessages()

rfbBool rfbSendSupportedMessages ( rfbClientPtr  cl)

Definition at line 937 of file rfbserver.c.

◆ rfbSendXvp()

rfbBool rfbSendXvp ( rfbClientPtr  cl,
uint8_t  version,
uint8_t  code 
)

Definition at line 1139 of file rfbserver.c.

Variable Documentation

◆ DB

int DB = 1

Definition at line 1210 of file rfbserver.c.