VirtualBox

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

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

rdesktop 1.8.3 unmodified

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.7 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#include <stdlib.h>
21#include <stdio.h>
22#include <string.h>
23#ifdef _WIN32
24#define WINVER 0x0400
25#include <windows.h>
26#include <winsock.h>
27#include <time.h>
28#define DIR int
29#else
30#include <dirent.h>
31#include <sys/time.h>
32#ifdef HAVE_SYS_SELECT_H
33#include <sys/select.h>
34#else
35#include <sys/types.h>
36#include <unistd.h>
37#endif
38#endif
39#include <limits.h> /* PATH_MAX */
40#ifdef HAVE_SYSEXITS_H
41#include <sysexits.h>
42#endif
43
44/* standard exit codes */
45#ifndef EX_OK
46#define EX_OK 0
47#endif
48#ifndef EX_USAGE
49#define EX_USAGE 64
50#endif
51#ifndef EX_DATAERR
52#define EX_DATAERR 65
53#endif
54#ifndef EX_NOINPUT
55#define EX_NOINPUT 66
56#endif
57#ifndef EX_NOUSER
58#define EX_NOUSER 67
59#endif
60#ifndef EX_NOHOST
61#define EX_NOHOST 68
62#endif
63#ifndef EX_UNAVAILABLE
64#define EX_UNAVAILABLE 69
65#endif
66#ifndef EX_SOFTWARE
67#define EX_SOFTWARE 70
68#endif
69#ifndef EX_OSERR
70#define EX_OSERR 71
71#endif
72#ifndef EX_OSFILE
73#define EX_OSFILE 72
74#endif
75#ifndef EX_CANTCREAT
76#define EX_CANTCREAT 73
77#endif
78#ifndef EX_IOERR
79#define EX_IOERR 74
80#endif
81#ifndef EX_TEMPFAIL
82#define EX_TEMPFAIL 75
83#endif
84#ifndef EX_PROTOCOL
85#define EX_PROTOCOL 76
86#endif
87#ifndef EX_NOPERM
88#define EX_NOPERM 77
89#endif
90#ifndef EX_CONFIG
91#define EX_CONFIG 78
92#endif
93
94/* rdesktop specific exit codes, lined up with disconnect PDU reasons */
95#define EXRD_API_DISCONNECT 1
96#define EXRD_API_LOGOFF 2
97#define EXRD_IDLE_TIMEOUT 3
98#define EXRD_LOGON_TIMEOUT 4
99#define EXRD_REPLACED 5
100#define EXRD_OUT_OF_MEM 6
101#define EXRD_DENIED 7
102#define EXRD_DENIED_FIPS 8
103#define EXRD_INSUFFICIENT_PRIVILEGES 9
104#define EXRD_FRESH_CREDENTIALS_REQUIRED 10
105#define EXRD_RPC_DISCONNECT_BY_USER 11
106#define EXRD_DISCONNECT_BY_USER 12
107#define EXRD_LIC_INTERNAL 16
108#define EXRD_LIC_NOSERVER 17
109#define EXRD_LIC_NOLICENSE 18
110#define EXRD_LIC_MSG 19
111#define EXRD_LIC_HWID 20
112#define EXRD_LIC_CLIENT 21
113#define EXRD_LIC_NET 22
114#define EXRD_LIC_PROTO 23
115#define EXRD_LIC_ENC 24
116#define EXRD_LIC_UPGRADE 25
117#define EXRD_LIC_NOREMOTE 26
118
119/* other exit codes */
120#define EXRD_WINDOW_CLOSED 62
121#define EXRD_UNKNOWN 63
122
123#ifdef WITH_DEBUG
124#define DEBUG(args) printf args;
125#else
126#define DEBUG(args)
127#endif
128
129#ifdef WITH_DEBUG_KBD
130#define DEBUG_KBD(args) printf args;
131#else
132#define DEBUG_KBD(args)
133#endif
134
135#ifdef WITH_DEBUG_RDP5
136#define DEBUG_RDP5(args) printf args;
137#else
138#define DEBUG_RDP5(args)
139#endif
140
141#ifdef WITH_DEBUG_CLIPBOARD
142#define DEBUG_CLIPBOARD(args) printf args;
143#else
144#define DEBUG_CLIPBOARD(args)
145#endif
146
147#ifdef WITH_DEBUG_SOUND
148#define DEBUG_SOUND(args) printf args;
149#else
150#define DEBUG_SOUND(args)
151#endif
152
153#ifdef WITH_DEBUG_CHANNEL
154#define DEBUG_CHANNEL(args) printf args;
155#else
156#define DEBUG_CHANNEL(args)
157#endif
158
159#ifdef WITH_DEBUG_SCARD
160#define DEBUG_SCARD(args) printf args;
161#else
162#define DEBUG_SCARD(args)
163#endif
164
165#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; }
166
167#ifndef MIN
168#define MIN(x,y) (((x) < (y)) ? (x) : (y))
169#endif
170
171#ifndef MAX
172#define MAX(x,y) (((x) > (y)) ? (x) : (y))
173#endif
174
175/* timeval macros */
176#ifndef timerisset
177#define timerisset(tvp)\
178 ((tvp)->tv_sec || (tvp)->tv_usec)
179#endif
180#ifndef timercmp
181#define timercmp(tvp, uvp, cmp)\
182 ((tvp)->tv_sec cmp (uvp)->tv_sec ||\
183 (tvp)->tv_sec == (uvp)->tv_sec &&\
184 (tvp)->tv_usec cmp (uvp)->tv_usec)
185#endif
186#ifndef timerclear
187#define timerclear(tvp)\
188 ((tvp)->tv_sec = (tvp)->tv_usec = 0)
189#endif
190
191/* If configure does not define the endianess, try
192 to find it out */
193#if !defined(L_ENDIAN) && !defined(B_ENDIAN)
194#if __BYTE_ORDER == __LITTLE_ENDIAN
195#define L_ENDIAN
196#elif __BYTE_ORDER == __BIG_ENDIAN
197#define B_ENDIAN
198#else
199#error Unknown endianness. Edit rdesktop.h.
200#endif
201#endif /* B_ENDIAN, L_ENDIAN from configure */
202
203/* No need for alignment on x86 and amd64 */
204#if !defined(NEED_ALIGN)
205#if !(defined(__x86__) || defined(__x86_64__) || \
206 defined(__AMD64__) || defined(_M_IX86) || \
207 defined(__i386__))
208#define NEED_ALIGN
209#endif
210#endif
211
212#include "parse.h"
213#include "constants.h"
214#include "types.h"
215
216#ifndef MAKE_PROTO
217#include "proto.h"
218#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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