summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_types.h
blob: 30cf16a42b2f03bb01cab808d26455ad164cde84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

   Copyright (C) Jay Sorg 2004

   types

*/

/* tcp */
struct xrdp_tcp
{
  int sck;
  struct stream* in_s;
  struct stream* out_s;
  struct xrdp_iso* iso_layer;
};

/* iso */
struct xrdp_iso
{
  struct stream* in_s;
  struct stream* out_s;
  struct xrdp_mcs* mcs_layer;
  struct xrdp_tcp* tcp_layer;
};

/* mcs */
struct xrdp_mcs
{
  struct stream* in_s;
  struct stream* out_s;
  struct xrdp_sec* sec_layer;
  struct xrdp_iso* iso_layer;
  int userid;
  int chanid;
  struct stream* client_mcs_data;
  struct stream* server_mcs_data;
};

/* sec */
struct xrdp_sec
{
  struct stream* in_s;
  struct stream* out_s;
  struct xrdp_rdp* rdp_layer;
  struct xrdp_mcs* mcs_layer;
  char server_random[32];
  char client_random[64];
  char client_crypt_random[72];
  struct stream client_mcs_data;
  struct stream server_mcs_data;
  int decrypt_use_count;
  int encrypt_use_count;
  char decrypt_key[16];
  char encrypt_key[16];
  char decrypt_update_key[16];
  char encrypt_update_key[16];
  int rc4_key_size;
  int rc4_key_len;
  char sign_key[16];
  void* decrypt_rc4_info;
  void* encrypt_rc4_info;
};

/* rdp */
struct xrdp_rdp
{
  struct stream* in_s;
  struct stream* out_s;
  struct xrdp_process* pro_layer;
  struct xrdp_sec* sec_layer;
  char* next_packet;
  int share_id;
  int mcs_channel;
  int bpp;
  int width;
  int height;
};

/* rdp process */
struct xrdp_process
{
  int status;
  int sck;
  int term;
  struct stream in_s;
  struct stream out_s;
  struct xrdp_listen* lis_layer;
  struct xrdp_rdp* rdp_layer;
};

/* rdp listener */
struct xrdp_listen
{
  int status;
  int sck;
  int term;
  struct xrdp_process* process_list[100]; /* 100 processes possible */
  int process_list_count;
  int process_list_max;
};