1 |
/* -*- c-basic-offset: 8 -*- |
/* -*- c-basic-offset: 8 -*- |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Protocol services - Multipoint Communications Service |
Protocol services - Multipoint Communications Service |
4 |
Copyright (C) Matthew Chapman 1999-2002 |
Copyright (C) Matthew Chapman 1999-2005 |
5 |
Copyright (C) Erik Forsberg 2003 |
Copyright (C) Erik Forsberg 2003 |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
26 |
extern RDPCOMP g_mppc_dict; |
extern RDPCOMP g_mppc_dict; |
27 |
|
|
28 |
void |
void |
29 |
rdp5_process(STREAM s, BOOL encryption) |
rdp5_process(STREAM s) |
30 |
{ |
{ |
31 |
uint16 length, count, x, y; |
uint16 length, count, x, y; |
32 |
uint8 type, ctype; |
uint8 type, ctype; |
36 |
struct stream *ns = &(g_mppc_dict.ns); |
struct stream *ns = &(g_mppc_dict.ns); |
37 |
struct stream *ts; |
struct stream *ts; |
38 |
|
|
|
if (encryption) |
|
|
{ |
|
|
in_uint8s(s, 8); /* signature */ |
|
|
sec_decrypt(s->p, s->end - s->p); |
|
|
} |
|
|
|
|
39 |
#if 0 |
#if 0 |
40 |
printf("RDP5 data:\n"); |
printf("RDP5 data:\n"); |
41 |
hexdump(s->p, s->end - s->p); |
hexdump(s->p, s->end - s->p); |
60 |
|
|
61 |
if (ctype & RDP_MPPC_COMPRESSED) |
if (ctype & RDP_MPPC_COMPRESSED) |
62 |
{ |
{ |
63 |
|
if (length > RDP_MPPC_DICT_SIZE) |
64 |
|
error("error decompressed packet size exceeds max\n"); |
65 |
if (mppc_expand(s->p, length, ctype, &roff, &rlen) == -1) |
if (mppc_expand(s->p, length, ctype, &roff, &rlen) == -1) |
66 |
error("error while decompressing packet\n"); |
error("error while decompressing packet\n"); |
67 |
|
|