2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <freerdp/freerdp.h>
26 #include <freerdp/utils/stream.h>
28 /* Client Address Family */
29 #define ADDRESS_FAMILY_INET 0x0002
30 #define ADDRESS_FAMILY_INET6 0x0017
32 /* Client Info Packet Flags */
33 #define INFO_MOUSE 0x00000001
34 #define INFO_DISABLECTRLALTDEL 0x00000002
35 #define INFO_AUTOLOGON 0x00000008
36 #define INFO_UNICODE 0x00000010
37 #define INFO_MAXIMIZESHELL 0x00000020
38 #define INFO_LOGONNOTIFY 0x00000040
39 #define INFO_COMPRESSION 0x00000080
40 #define INFO_ENABLEWINDOWSKEY 0x00000100
41 #define INFO_REMOTECONSOLEAUDIO 0x00002000
42 #define INFO_FORCE_ENCRYPTED_CS_PDU 0x00004000
43 #define INFO_RAIL 0x00008000
44 #define INFO_LOGONERRORS 0x00010000
45 #define INFO_MOUSE_HAS_WHEEL 0x00020000
46 #define INFO_PASSWORD_IS_SC_PIN 0x00040000
47 #define INFO_NOAUDIOPLAYBACK 0x00080000
48 #define INFO_USING_SAVED_CREDS 0x00100000
49 #define RNS_INFO_AUDIOCAPTURE 0x00200000
50 #define RNS_INFO_VIDEO_DISABLE 0x00400000
51 #define INFO_CompressionTypeMask 0x00001E00
52 #define INFO_PACKET_COMPR_TYPE_8K 0x00000100
53 #define INFO_PACKET_COMPR_TYPE_64K 0x00000200
54 #define INFO_PACKET_COMPR_TYPE_RDP6 0x00000400
55 #define INFO_PACKET_COMPR_TYPE_RDP61 0x00000600
57 /* Logon Information Types */
58 #define INFO_TYPE_LOGON 0x00000000
59 #define INFO_TYPE_LOGON_LONG 0x00000001
60 #define INFO_TYPE_LOGON_PLAIN_NOTIFY 0x00000002
61 #define INFO_TYPE_LOGON_EXTENDED_INF 0x00000003
63 /* Extended Logon Info */
64 #define LOGON_EX_AUTORECONNECTCOOKIE 0x00000001
65 #define LOGON_EX_LOGONERRORS 0x00000002
67 /* Logon Error Info */
68 #define LOGON_FAILED_BAD_PASSWORD 0x00000000
69 #define LOGON_FAILED_UPDATE_PASSWORD 0x00000001
70 #define LOGON_FAILED_OTHER 0x00000002
71 #define LOGON_WARNING 0x00000003
73 void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time);
74 void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time);
75 void rdp_get_client_time_zone(STREAM* s, rdpSettings* settings);
76 boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings);
77 void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings);
78 void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
79 boolean rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
80 void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
81 void rdp_write_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
82 boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings);
83 void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings);
84 boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings);
85 void rdp_write_info_packet(STREAM* s, rdpSettings* settings);
86 boolean rdp_recv_client_info(rdpRdp* rdp, STREAM* s);
87 boolean rdp_send_client_info(rdpRdp* rdp);
88 boolean rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s);