VirtualBox

source: vbox/trunk/src/VBox/RDP/client-1.8.3/rdesktop.h@ 61540

最後變更 在這個檔案從61540是 55123,由 vboxsync 提交於 10 年 前

rdesktop 1.8.3 modified for VBox

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 5.2 KB
 
1/*
2 rdesktop: A Remote Desktop Protocol client.
3 Master include file
4 Copyright (C) Matthew Chapman 1999-2008
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20/*
21 * Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
22 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
23 * the General Public License version 2 (GPLv2) at this time for any software where
24 * a choice of GPL license versions is made available with the language indicating
25 * that GPLv2 or any later version may be used, or where a choice of which version
26 * of the GPL is applied is otherwise unspecified.
27 */
28
29#include <stdlib.h>
30#include <stdio.h>
31#include <string.h>
32#ifdef _WIN32
33#define WINVER 0x0400
34#include <windows.h>
35#include <winsock.h>
36#include <time.h>
37#define DIR int
38#else
39#include <dirent.h>
40#include <sys/time.h>
41#ifdef HAVE_SYS_SELECT_H
42#include <sys/select.h>
43#else
44#include <sys/types.h>
45#include <unistd.h>
46#endif
47#endif
48#include <limits.h> /* PATH_MAX */
49#ifdef HAVE_SYSEXITS_H
50#include <sysexits.h>
51#endif
52
53/* standard exit codes */
54#ifndef EX_OK
55#define EX_OK 0
56#endif
57#ifndef EX_USAGE
58#define EX_USAGE 64
59#endif
60#ifndef EX_DATAERR
61#define EX_DATAERR 65
62#endif
63#ifndef EX_NOINPUT
64#define EX_NOINPUT 66
65#endif
66#ifndef EX_NOUSER
67#define EX_NOUSER 67
68#endif
69#ifndef EX_NOHOST
70#define EX_NOHOST 68
71#endif
72#ifndef EX_UNAVAILABLE
73#define EX_UNAVAILABLE 69
74#endif
75#ifndef EX_SOFTWARE
76#define EX_SOFTWARE 70
77#endif
78#ifndef EX_OSERR
79#define EX_OSERR 71
80#endif
81#ifndef EX_OSFILE
82#define EX_OSFILE 72
83#endif
84#ifndef EX_CANTCREAT
85#define EX_CANTCREAT 73
86#endif
87#ifndef EX_IOERR
88#define EX_IOERR 74
89#endif
90#ifndef EX_TEMPFAIL
91#define EX_TEMPFAIL 75
92#endif
93#ifndef EX_PROTOCOL
94#define EX_PROTOCOL 76
95#endif
96#ifndef EX_NOPERM
97#define EX_NOPERM 77
98#endif
99#ifndef EX_CONFIG
100#define EX_CONFIG 78
101#endif
102
103/* rdesktop specific exit codes, lined up with disconnect PDU reasons */
104#define EXRD_API_DISCONNECT 1
105#define EXRD_API_LOGOFF 2
106#define EXRD_IDLE_TIMEOUT 3
107#define EXRD_LOGON_TIMEOUT 4
108#define EXRD_REPLACED 5
109#define EXRD_OUT_OF_MEM 6
110#define EXRD_DENIED 7
111#define EXRD_DENIED_FIPS 8
112#define EXRD_INSUFFICIENT_PRIVILEGES 9
113#define EXRD_FRESH_CREDENTIALS_REQUIRED 10
114#define EXRD_RPC_DISCONNECT_BY_USER 11
115#define EXRD_DISCONNECT_BY_USER 12
116#define EXRD_LIC_INTERNAL 16
117#define EXRD_LIC_NOSERVER 17
118#define EXRD_LIC_NOLICENSE 18
119#define EXRD_LIC_MSG 19
120#define EXRD_LIC_HWID 20
121#define EXRD_LIC_CLIENT 21
122#define EXRD_LIC_NET 22
123#define EXRD_LIC_PROTO 23
124#define EXRD_LIC_ENC 24
125#define EXRD_LIC_UPGRADE 25
126#define EXRD_LIC_NOREMOTE 26
127
128/* other exit codes */
129#define EXRD_WINDOW_CLOSED 62
130#define EXRD_UNKNOWN 63
131
132#ifdef VBOX
133#undef DEBUG
134#endif
135
136#ifdef WITH_DEBUG
137#define DEBUG(args) printf args;
138#else
139#define DEBUG(args)
140#endif
141
142#ifdef WITH_DEBUG_KBD
143#define DEBUG_KBD(args) printf args;
144#else
145#define DEBUG_KBD(args)
146#endif
147
148#ifdef WITH_DEBUG_RDP5
149#define DEBUG_RDP5(args) printf args;
150#else
151#define DEBUG_RDP5(args)
152#endif
153
154#ifdef WITH_DEBUG_CLIPBOARD
155#define DEBUG_CLIPBOARD(args) printf args;
156#else
157#define DEBUG_CLIPBOARD(args)
158#endif
159
160#ifdef WITH_DEBUG_SOUND
161#define DEBUG_SOUND(args) printf args;
162#else
163#define DEBUG_SOUND(args)
164#endif
165
166#ifdef WITH_DEBUG_CHANNEL
167#define DEBUG_CHANNEL(args) printf args;
168#else
169#define DEBUG_CHANNEL(args)
170#endif
171
172#ifdef WITH_DEBUG_SCARD
173#define DEBUG_SCARD(args) printf args;
174#else
175#define DEBUG_SCARD(args)
176#endif
177
178#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; }
179
180#ifndef MIN
181#define MIN(x,y) (((x) < (y)) ? (x) : (y))
182#endif
183
184#ifndef MAX
185#define MAX(x,y) (((x) > (y)) ? (x) : (y))
186#endif
187
188/* timeval macros */
189#ifndef timerisset
190#define timerisset(tvp)\
191 ((tvp)->tv_sec || (tvp)->tv_usec)
192#endif
193#ifndef timercmp
194#define timercmp(tvp, uvp, cmp)\
195 ((tvp)->tv_sec cmp (uvp)->tv_sec ||\
196 (tvp)->tv_sec == (uvp)->tv_sec &&\
197 (tvp)->tv_usec cmp (uvp)->tv_usec)
198#endif
199#ifndef timerclear
200#define timerclear(tvp)\
201 ((tvp)->tv_sec = (tvp)->tv_usec = 0)
202#endif
203
204/* If configure does not define the endianess, try
205 to find it out */
206#if !defined(L_ENDIAN) && !defined(B_ENDIAN)
207#if __BYTE_ORDER == __LITTLE_ENDIAN
208#define L_ENDIAN
209#elif __BYTE_ORDER == __BIG_ENDIAN
210#define B_ENDIAN
211#else
212#error Unknown endianness. Edit rdesktop.h.
213#endif
214#endif /* B_ENDIAN, L_ENDIAN from configure */
215
216/* No need for alignment on x86 and amd64 */
217#if !defined(NEED_ALIGN)
218#if !(defined(__x86__) || defined(__x86_64__) || \
219 defined(__AMD64__) || defined(_M_IX86) || \
220 defined(__i386__))
221#define NEED_ALIGN
222#endif
223#endif
224
225#include "parse.h"
226#include "constants.h"
227#include "types.h"
228
229#ifndef MAKE_PROTO
230#include "proto.h"
231#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette