35 |
#include <sys/un.h> /* sockaddr_un */ |
#include <sys/un.h> /* sockaddr_un */ |
36 |
#endif |
#endif |
37 |
|
|
|
#ifdef WITH_OPENSSL |
|
38 |
#include <openssl/md5.h> |
#include <openssl/md5.h> |
|
#else |
|
|
#include "crypto/md5.h" |
|
|
#endif |
|
39 |
|
|
40 |
char g_title[64] = ""; |
char g_title[64] = ""; |
41 |
char g_username[64]; |
char g_username[64]; |
122 |
fprintf(stderr, " -N: enable numlock syncronization\n"); |
fprintf(stderr, " -N: enable numlock syncronization\n"); |
123 |
fprintf(stderr, " -X: embed into another window with a given id.\n"); |
fprintf(stderr, " -X: embed into another window with a given id.\n"); |
124 |
fprintf(stderr, " -a: connection colour depth\n"); |
fprintf(stderr, " -a: connection colour depth\n"); |
125 |
|
fprintf(stderr, " -z: enable rdp compression\n"); |
126 |
fprintf(stderr, " -x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex nr.)\n"); |
fprintf(stderr, " -x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex nr.)\n"); |
127 |
fprintf(stderr, " -P: use persistent bitmap caching\n"); |
fprintf(stderr, " -P: use persistent bitmap caching\n"); |
128 |
fprintf(stderr, " -r: enable specified device redirection (this flag can be repeated)\n"); |
fprintf(stderr, " -r: enable specified device redirection (this flag can be repeated)\n"); |
130 |
" '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1\n"); |
" '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1\n"); |
131 |
fprintf(stderr, " or COM1=/dev/ttyS0,COM2=/dev/ttyS1\n"); |
fprintf(stderr, " or COM1=/dev/ttyS0,COM2=/dev/ttyS1\n"); |
132 |
fprintf(stderr, |
fprintf(stderr, |
133 |
" '-r disk:A=/mnt/floppy': enable redirection of /mnt/floppy to A:\n"); |
" '-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share\n"); |
134 |
fprintf(stderr, " or A=/mnt/floppy,D=/mnt/cdrom'\n"); |
fprintf(stderr, " or 'floppy=/mnt/floppy,cdrom=/mnt/cdrom'\n"); |
135 |
fprintf(stderr, " '-r clientname=<client name>': Set the client name displayed\n"); |
fprintf(stderr, " '-r clientname=<client name>': Set the client name displayed\n"); |
136 |
fprintf(stderr, " for redirected disks\n"); |
fprintf(stderr, " for redirected disks\n"); |
137 |
fprintf(stderr, |
fprintf(stderr, |
364 |
#endif |
#endif |
365 |
|
|
366 |
while ((c = getopt(argc, argv, |
while ((c = getopt(argc, argv, |
367 |
VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1) |
VNCOPT "u:d:s:c:p:n:k:g:fbBeEmzCDKS:T:NX:a:x:Pr:045h?")) != -1) |
368 |
{ |
{ |
369 |
switch (c) |
switch (c) |
370 |
{ |
{ |
525 |
} |
} |
526 |
break; |
break; |
527 |
|
|
528 |
case 'x': |
case 'z': |
529 |
|
DEBUG(("rdp compression enabled\n")); |
530 |
|
flags |= RDP_COMPRESSION; |
531 |
|
break; |
532 |
|
|
533 |
|
case 'x': |
534 |
if (strncmp("modem", optarg, 1) == 0) |
if (strncmp("modem", optarg, 1) == 0) |
535 |
{ |
{ |
536 |
g_rdp5_performanceflags = |
g_rdp5_performanceflags = |
573 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
574 |
g_rdpsnd = True; |
g_rdpsnd = True; |
575 |
#else |
#else |
576 |
warning("Not compiled with sound support"); |
warning("Not compiled with sound support\n"); |
577 |
#endif |
#endif |
578 |
|
|
579 |
if (strncmp("off", optarg, 3) == 0) |
if (strncmp("off", optarg, 3) == 0) |
580 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
581 |
g_rdpsnd = False; |
g_rdpsnd = False; |
582 |
#else |
#else |
583 |
warning("Not compiled with sound support"); |
warning("Not compiled with sound support\n"); |
584 |
#endif |
#endif |
585 |
|
|
586 |
optarg = p; |
optarg = p; |
591 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
592 |
g_rdpsnd = True; |
g_rdpsnd = True; |
593 |
#else |
#else |
594 |
warning("Not compiled with sound support"); |
warning("Not compiled with sound support\n"); |
595 |
#endif |
#endif |
596 |
} |
} |
597 |
} |
} |
852 |
void * |
void * |
853 |
xrealloc(void *oldmem, int size) |
xrealloc(void *oldmem, int size) |
854 |
{ |
{ |
855 |
void *mem = realloc(oldmem, size); |
void *mem; |
856 |
|
|
857 |
|
if (size < 1) |
858 |
|
size = 1; |
859 |
|
mem = realloc(oldmem, size); |
860 |
if (mem == NULL) |
if (mem == NULL) |
861 |
{ |
{ |
862 |
error("xrealloc %d\n", size); |
error("xrealloc %d\n", size); |