1 /* -*- c-basic-offset: 8 -*-
2 rdesktop: A Remote Desktop Protocol client.
3 Protocol services - Multipoint Communications Service
4 Copyright (C) Matthew Chapman 1999-2002
5 Copyright (C) Erik Forsberg 2003
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 extern uint8 *g_next_packet;
25 extern int listen_on_vnc;
28 rdp5_process(STREAM s, BOOL encryption)
30 uint16 length, count, x, y;
36 in_uint8s(s, 8); /* signature */
37 sec_decrypt(s->p, s->end - s->p);
41 printf("RDP5 data:\n");
42 hexdump(s->p, s->end - s->p);
53 uint16 device_flags, x, y;
54 static int mouse1_down = 0, mouse2_down = 0;
56 in_uint16_le(s, device_flags);
60 printf("- Type: Mouse\n");
61 printf("- Device flags: %x\n", device_flags);
62 printf("- Position: (%u,%u)\n", x, y);
64 if (device_flags & MOUSE_FLAG_BUTTON1)
65 mouse1_down = (device_flags & MOUSE_FLAG_DOWN) ? 0x01 : 0;
66 if (device_flags & MOUSE_FLAG_BUTTON2)
67 mouse2_down = (device_flags & MOUSE_FLAG_DOWN) ? 0x02 : 0;
69 printf("button mask = %x\n", mouse1_down | mouse2_down);
71 /* buf[0] = 5; // message type
72 buf[1] = mouse1_down | mouse2_down; // button mask
74 buf[3] = param1 & 0xff;
76 buf[5] = param2 & 0xff;
77 write(vnc_sock, buf, 6); */
82 printf("Unimplemented RDP5 opcode %d (len=%u)\n", type, length);