AnyConnect Secure Mobility Client
4.10.08025
Main Page
Related Pages
Classes
Files
File List
File Members
GenDefs.h
1
/**************************************************************************
2
* Copyright (c) 2000, 2021 Cisco Systems, Inc.
3
* All Rights Reserved. Cisco Confidential.
4
***************************************************************************
5
*
6
* File: GenDefs.h
7
* Date: 8/23/00
8
*
9
***************************************************************************
10
* NOTE* This file is for PORTABILITY related defines ONLY.
11
***************************************************************************
12
* defines base types to be used by all CVC client components
13
***************************************************************************/
14
#ifndef __GENDEFS_H
15
#define __GENDEFS_H
16
17
#ifndef _WIN32
18
19
#ifndef USES_CONVERSION
20
#define USES_CONVERSION
21
#endif
22
23
#define PRELIM_UNIX_PORT
24
25
#ifdef HAVE_CONFIG_H
26
#include "config.h"
27
#endif
28
29
#ifdef HAVE_STDINT_H
30
#ifndef CNI_LINUX_INTERFACE
31
#include <stdint.h>
32
#endif
33
#elif HAVE_INTTYPES_H
34
#include <inttypes.h>
35
#endif
36
37
#ifdef HAVE_SYS_TYPES_H
38
#ifndef CNI_LINUX_INTERFACE
39
#include <sys/types.h>
40
#else
41
#include <linux/types.h>
42
#undef _UINTPTR_T_DEFINED
43
#undef _INTPTR_T_DEFINED
44
#endif
45
#endif
46
47
#undef FAR
48
#define FAR
49
#undef PASCAL
50
#define PASCAL
51
52
#else //_WIN32
53
#define HAVE_STDINT_H
54
#include <stdint.h>
55
#undef HAVE_CONFIG_H
56
#undef HAVE_SYS_TYPES_H
57
#define WORDS_BIGENDIAN 0
58
#if !defined(DWORD)
59
typedef
unsigned
long
DWORD;
60
#endif // !defined(DWORD)
61
62
#endif //_WIN32
63
64
65
#undef TRUE
66
#define TRUE 1
67
68
#undef FALSE
69
#define FALSE 0
70
71
#ifdef DDKBUILD //building with the DDK as the source.
72
#include <crtdefs.h>
73
#endif
74
75
#if !defined(PLATFORM_WIN_APP)
76
// it'd be nice if we could switch to the C99 standard types at some point...
77
#if defined(HAVE_STDINT_H) || defined(HAVE_INTTYPES_H)
78
typedef
uint8_t bool8;
79
typedef
uint16_t bool16;
80
typedef
uint32_t bool32;
81
82
typedef
int8_t int8;
83
typedef
int16_t int16;
84
85
#if (!defined(CNI_LINUX_INTERFACE) || !defined(CONFIG_ISDN_PPP) || !defined(CONFIG_ISDN_PPP_VJ) || !defined(_SLHC_H)) && !defined(PROTYPES_H)
86
typedef
int32_t int32;
87
#endif
88
89
typedef
uint8_t uint8;
90
typedef
uint16_t uint16;
91
92
#if !defined(CSSMAPI) && !defined(PROTYPES_H)
93
#ifdef _WIN32
94
typedef
unsigned
long
uint32;
95
#else
96
typedef
uint32_t uint32;
97
#endif
98
#endif
99
100
typedef
uint64_t uint64;
101
#else
102
103
typedef
unsigned
char
uint8;
104
typedef
unsigned
short
uint16;
105
#ifndef CSSMAPI
106
typedef
unsigned
long
uint32;
107
#endif
108
typedef
unsigned
char
uint8_t;
109
typedef
unsigned
short
uint16_t;
110
#if defined(_WIN32) && !defined (HS_TYPES_H_)
111
typedef
unsigned
long
uint32_t;
112
#endif
113
114
#ifdef _WIN32
115
typedef
__int64 int64;
116
typedef
unsigned
__int64 uint64;
117
typedef
__int64 int64_t;
118
typedef
unsigned
__int64 uint64_t;
119
#else
120
typedef
long
long
int64;
121
typedef
unsigned
long
long
int
uint64;
122
typedef
long
long
int64_t;
123
typedef
unsigned
long
long
int
uint64_t;
124
#endif
125
#endif
126
127
// Definitions for Windows not available in <stdint.h>
128
#ifdef _WIN32
129
typedef
unsigned
long
bool32_t;
130
typedef
unsigned
char
bool8_t;
131
#endif
132
133
// integer types for doing pointer arithmetic, they should be the
134
// same size as a pointer. Part of the C99 standard, but they aren't
135
// available everywhere yet.
136
// These defs should work with IA32 (x86), ILP32 (sparcv8) and LP64 (sparcv9).
137
// These types are protected with the WIN32 macros (_INTPTR_T_DEFINED), since
138
// some, but not all of the WIN32 SDK's define these types.
139
#ifdef _WIN32
140
#ifndef _INTPTR_T_DEFINED
141
#if defined(_LP64)
142
#warning 64 bit
143
typedef
int64 intptr_t;
144
#else
145
typedef
int32 intptr_t;
146
#endif
147
#define _INTPTR_T_DEFINED
148
#endif
149
150
#ifndef _UINTPTR_T_DEFINED
151
#if defined(_LP64)
152
#warning 64 bit
153
typedef
uint64 uintptr_t;
154
#else
155
typedef
uint32 uintptr_t;
156
#endif
157
#define _UINTPTR_T_DEFINED
158
#endif
159
#endif
160
161
#ifndef __OBJC__
/* Mac OS X defines this in ObjectiveC land... */
162
typedef
int
BOOL;
163
#endif
164
165
#ifndef _WIN32
166
typedef
int
BOOLEAN;
167
#endif
168
169
#ifdef _WIN32
170
typedef
int
mode_t;
171
#endif
172
173
typedef
unsigned
char
uchar;
174
#ifndef HAVE_SYS_TYPES_H
175
typedef
unsigned
int
uint;
176
typedef
unsigned
short
ushort;
177
typedef
unsigned
long
ulong;
178
#endif
179
180
#ifndef PLATFORM_ANDROID
181
typedef
ulong ULONG;
182
typedef
ulong* PULONG;
183
#endif
184
185
#if defined(PLATFORM_ANDROID)
186
typedef
unsigned
long
ulong;
187
typedef
unsigned
short
ushort;
188
#endif
189
190
typedef
uint32 DWORD;
191
typedef
uint32* PDWORD;
192
typedef
long
LONG;
193
typedef
long
* PLONG;
194
typedef
int
INT;
195
typedef
int
* PINT;
196
typedef
uint UINT;
197
typedef
uint* PUINT;
198
typedef
uint16 USHORT;
199
typedef
uint16* PUSHORT;
200
typedef
int16 SHORT;
201
typedef
int16* PSHORT;
202
typedef
uint16 WORD;
203
typedef
uint16* PWORD;
204
typedef
char
CHAR;
205
typedef
uchar UCHAR;
206
typedef
char
* PCHAR;
207
typedef
uint8 BYTE;
208
typedef
uint8* PBYTE;
209
#define VOID void
210
typedef
void
* PVOID;
211
#ifdef _WIN32
212
typedef
void
* HANDLE;
213
#else
214
typedef
int
HANDLE;
215
typedef
int
SOCKET;
216
typedef
const
char
* LPCTSTR;
217
typedef
const
char
* LPCSTR;
218
typedef
const
char
* PCTSTR;
219
typedef
char
* LPTSTR;
220
typedef
void
* LPVOID;
221
typedef
char
* LPSTR;
222
typedef
long
* LPLONG;
223
typedef
DWORD* LPDWORD;
224
typedef
signed
int
INT32;
225
226
227
typedef
struct
__WSABUF
228
{
229
unsigned
long
len;
230
char
*buf;
231
} WSABUF, *LPWSABUF;
232
233
typedef
struct
OVERLAPPED
234
{
235
void
*data;
236
int
fd;
237
} OVERLAPPED,*LPOVERLAPPED;
238
239
typedef
struct
sockaddr_in SOCKADDR_IN;
240
typedef
struct
sockaddr_in6 SOCKADDR_IN6;
241
242
#endif
//!_WIN32
243
244
typedef
HANDLE* PHANDLE;
245
typedef
uint8 KIRQL;
246
#else // PLATFORM_WIN_APP
247
typedef
unsigned
long
bool32;
248
typedef
unsigned
long
bool32_t;
249
typedef
unsigned
long
ulong;
250
typedef
unsigned
char
BYTE;
251
typedef
unsigned
long
uint32;
252
typedef
long
int32;
253
#endif // !defined(PLATFORM_WIN_APP)
254
255
typedef
long
STATUSCODE;
256
257
/* function parameter context */
258
#undef IN
259
#define IN
260
261
#undef OUT
262
#define OUT
263
264
#undef INOUT
265
#define INOUT
266
267
#undef packed
268
#define packed
269
270
#ifndef CLEAR
271
#define CLEAR(a) memset(&a,0,sizeof(a))
272
#endif
273
274
#ifndef POINT_BEYOND
275
#define POINT_BEYOND(a,t) (t) &((&a)[1])
276
#endif
277
278
#ifndef MAX
279
#define MAX(a,b) ((a) > (b) ? (a) : (b))
280
#endif
281
#ifndef MIN
282
#define MIN(a,b) ((a) < (b) ? (a) : (b))
283
#endif
284
285
#ifndef _WIN32
286
#define _ftime ftime
287
#define _timeb timeb
288
#define __cdecl
289
#define __stdcall
290
#ifndef __fastcall
291
#define __fastcall
292
#endif
293
#ifndef WINAPI
294
#define WINAPI
295
#endif
296
#ifndef CALLBACK
297
#define CALLBACK
298
#endif
299
#endif
300
301
#ifndef _WIN32
302
#undef INVALID_SOCKET
303
#define INVALID_SOCKET -1
304
#undef INVALID_FD
305
#define INVALID_FD -1
306
#undef SOCKET_ERROR
307
#define SOCKET_ERROR -1
308
#undef SOCKADDR
309
#define SOCKADDR sockaddr
310
#undef SOCKADDR_IN
311
#define SOCKADDR_IN sockaddr_in
312
#undef SOCKADDR_IN6
313
#define SOCKADDR_IN6 sockaddr_in6
314
315
#if defined(PLATFORM_DARWIN) || defined(PLATFORM_APPLE_SSLVPN) || defined(APPLE_IOS) || defined(PLATFORM_CHROMEBOOK)
316
#define s6_words __u6_addr.__u6_addr16
317
#elif defined(PLATFORM_LINUX)
318
#define s6_words s6_addr16
319
#endif
320
321
#endif
322
323
#ifndef _CRT_SECURE_NO_DEPRECATE
324
#define _CRT_SECURE_NO_DEPRECATE
325
#endif
326
327
328
#if !defined(_WIN32)
329
330
#ifndef ZeroMemory
331
#define ZeroMemory ZEROMEM
332
#ifndef PLATFORM_ANDROID
333
#define ZEROMEM(ptr,cnt) \
334
if ( NULL != ptr ) { memset(ptr,0,cnt); }
335
#else
336
// Cius compiler will generate a compilation error for: if( &var )
337
#define ZEROMEM(ptr,cnt) \
338
{ \
339
void *pZero = ptr; \
340
if ( NULL != pZero ) { memset(pZero,0,cnt); } \
341
}
342
#endif
/* !PLATFORM_ANDROID */
343
#endif
/* ZeroMemory */
344
345
#ifndef SecureZeroMemory
346
#define SECUREZEROMEM(ptr, cnt) \
347
do { \
348
size_t size = (size_t)cnt; \
349
volatile char *vptr = (volatile char *)ptr; \
350
while (size) { \
351
*vptr = 0; \
352
vptr++; \
353
size--; \
354
} \
355
} while(0);
356
#define SecureZeroMemory SECUREZEROMEM
357
#endif
/* SecureZeroMemory */
358
#endif
/* Windows */
359
360
361
362
#ifndef _WIN32
363
#define _strnicmp strncasecmp
364
#define _stricmp strcasecmp
365
#endif
366
367
#if !defined(UINT16_MAX)
368
#define UINT16_MAX 0xffffu
369
#endif
370
371
#ifndef ARRAY_SIZE
372
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
373
#endif
374
375
#if !defined(TO_STR) && !defined(TO_TSTR) && !defined(SYMBOL_TO_STR) && !defined(SYMBOL_TO_TSTR)
376
377
// use TO_STR(x)/TO_TSTR(x) to stringize (put double quotes around) x
378
// example:
379
// std::string foo = TO_STR(15);
380
// tstring bar = TO_TSTR(15);
381
// becomes
382
// std::string foo = "15";
383
// tstring bar = _T("15");
384
#define TO_STR(x) #x
385
#define TO_TSTR(x) _T(#x)
386
387
// use SYMBOL_TO_STR(x)/SYMBOL_TO_TSTR(x) to stringize
388
// the definition of symbol x
389
// example:
390
// #define MAX_LEN 15
391
// std::string foo = SYMBOL_TO_STR(MAX_LEN);
392
// tstring bar = SYMBOL_TO_TSTR(MAX_LEN);
393
// becomes
394
// std::string foo = "15";
395
// tstring bar = _T("15");
396
//
397
// Note that TO_STR(MAX_LEN) results in "MAX_LEN". The double macro is required in
398
// order to strinigize the *definition* of a symbol (as opposed to the symbol itself)
399
#define SYMBOL_TO_STR(x) TO_STR(x)
400
#define SYMBOL_TO_TSTR(x) TO_TSTR(x)
401
402
#endif
403
404
#ifdef _WIN32
405
#define systemtime_t __time64_t
406
#define getSystemTimeInSeconds() _time64(NULL)
407
#else
408
#define systemtime_t time_t
409
#define getSystemTimeInSeconds() time(NULL)
410
#endif
411
412
#ifndef _WIN32
413
#ifndef INFINITE
414
#define INFINITE 0xFFFFFFFF
415
#endif
416
#endif
417
418
#ifdef _WIN32
419
#define ANY_PATHNAME_DELIMITER "/\\"
420
#define PATHNAME_DELIMITER '\\'
421
#define PATHNAME_DELIMITER_STR "\\"
422
#else
423
#define ANY_PATHNAME_DELIMITER "/"
424
#define PATHNAME_DELIMITER '/'
425
#define PATHNAME_DELIMITER_STR "/"
426
#endif
427
#define URL_URI_DELIMITER '/'
428
#define URL_URI_DELIMITER_STR "/"
429
430
#ifdef _WIN32
431
#define NEWLINE "\r\n"
432
#else
433
#define NEWLINE "\n"
434
#endif
435
436
#if defined(_WIN32)
437
#define HOSTSFILE_LOCATION _T("drivers\\etc\\hosts")
438
#else
439
#define HOSTSFILE_LOCATION _T("/etc/hosts")
440
#endif
441
442
#ifdef _WIN32
443
#define DebugWriteFile(_handle_,_buffer_,_length_,_refCharsWritten_) \
444
WriteFile((_handle_),(_buffer_),(_length_),(_refCharsWritten_),NULL)
445
#else
446
#ifndef INVALID_HANDLE_VALUE
447
#define INVALID_HANDLE_VALUE NULL
448
#endif
449
#define DebugWriteFile(_handle_,_buffer_,_length_,_refCharsWritten_) \
450
fprintf((_handle_), "%s", (_buffer_)); \
451
fflush((_handle_))
452
#endif
453
454
typedef
uint8_t MAC_ADDR[6];
455
456
#if !defined(_WIN32) || defined(_WIN32_WCE)
457
#ifndef ADDRESS_FAMILY
458
typedef
unsigned
short
ADDRESS_FAMILY;
459
#endif
460
#endif
461
462
#if __cplusplus >= 201103L
463
#define CPP_11_SUPPORTED
464
#endif
465
#if __cplusplus >= 201402L
466
#define CPP_14_SUPPORTED
467
#endif
468
#if __cplusplus >= 201703L
469
#define CPP_17_SUPPORTED
470
#endif
471
472
#if ((defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
473
/*
474
** the FIREWALL_SUPPORTED define is used to track the platforms
475
** where the firewall feature is supported. This is to avoid repeating the
476
** platforms in #ifdef clauses in other files.
477
** Also, when Firewall feature expands to other platforms, they only need to be added in
478
** one place.
479
*/
480
#define FIREWALL_SUPPORTED
481
#endif
482
483
#if !defined(PRODUCT_TYPE_SSA) && ((defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_CHROMEBOOK)))
484
/*
485
** the TRUSTED_NETWORK_DETECTION define is used to track the platforms
486
** where Trusted Network Detection is performed. This is to avoid repeating the
487
** platforms in #ifdef clauses in other files.
488
** Also, when TND support expands to other platforms, they only need to be added in
489
** one place.
490
*/
491
#define TRUSTED_NETWORK_DETECTION
492
493
/*
494
* Android only uses TND to report state to NVM.
495
* Policy-based actions are not supported.
496
*/
497
#if !defined(PLATFORM_ANDROID)
498
#define TND_ACTIONS_SUPPORTED
499
#endif
500
#endif
501
502
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK) && !defined(PLATFORM_WIN_APP))
503
#define INTER_MODULE_STATE_NOTIFY
504
#endif
505
506
#if ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(TRUSTED_NETWORK_DETECTION)) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_ANDROID)
507
/*
508
** the LOGIN_UTILITIES_SUPPORTED define is used to track the platforms
509
** that support AnyConnect action triggered by user login. This is to avoid
510
** repeating the platforms in #ifdef clauses in other files.
511
** Also, when login support expands to other platforms, they only need to be added in
512
** one place.
513
*/
514
#define LOGIN_UTILITIES_SUPPORTED
515
#endif
516
517
#if !(defined(PLATFORM_APPLE_SSLVPN) && TARGET_CPU_ARMV6)
518
/*
519
** A bug was discovered in iPhone testing wherein virtual inline functions do
520
** not work correctly on ARMv6 processors. To work around this, virtual inline
521
** function need to be made standard virtual functions on ARMv6. To prevent
522
** differences in runtime behavior, the VIRTUAL_INLINES_SUPPORTED define is used
523
** to define some virtual inlines in the header files, letting the functions be
524
** defined without the inline type in the cpp file for non-supported platforms.
525
*/
526
#define VIRTUAL_INLINES_SUPPORTED
527
#endif
528
529
/*
530
* When changing the SCRIPTING_SUPPORTED definition, you MUST also update the
531
* ClientIfcBase.h! We duplicate this definition there due to the manner in
532
* which we distribute our code to partners; we cannot include this header from
533
* ClientIfcBase.h.
534
*/
535
#if !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_WIN_APP)
536
/*
537
** the SCRIPTING_SUPPORTED define is used to enable the script manager for launching
538
** customer provided scripts on events like connection establishment, completion of
539
** disconnect, and captive portal detection.
540
*/
541
#define SCRIPTING_SUPPORTED
542
#endif
543
544
#if defined(PLATFORM_ANDROID)
545
#define DYNAMIC_UPDATE_LOCAL_POLICY
546
#endif // PLATFORM_ANDROID
547
548
#if !defined(PRODUCT_TYPE_SSA) && ((defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK)))
549
/*
550
** the NETWORK_ENVIRONMENT_STATE define is used to track the platforms
551
** where NETWORK_ENVIRONMENT_STATE check is performed. This is to avoid repeating the
552
** platforms in #ifdef clauses in other files.
553
** Also, when NES support expands to other platforms, they only need to be added in
554
** one place.
555
*/
556
#define NETWORK_ENVIRONMENT_STATE
557
#endif
558
559
560
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK))
561
/*
562
** The AUTOMATIC_HEADEND_SELECTION define is used to track the platforms
563
** where Automatic Headend Selection is performed. This is to avoid repeating the
564
** platforms in #ifdef clauses in other files.
565
** Also, when AHS support expands to other platforms, they only need to be added in
566
** one place.
567
*/
568
#define AUTOMATIC_HEADEND_SELECTION
569
#endif
570
571
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN)
572
/*
573
** the MUS_HOST_SERVICES define is used to track the platforms
574
** where MUS Host Status check is performed. This is to avoid repeating the
575
** platforms in #ifdef clauses in other files.
576
*/
577
#define MUS_HOST_SERVICES
578
#endif
579
580
// BUGBUG - initially only enable code signing for Windows
581
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_LINUX_EMBEDDED_PPC) && !defined(PLATFORM_LINUX_EMBEDDED_ARM) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK))
582
/*
583
** the CODE_SIGNING_SUPPORTED define is used to track the platforms
584
** where code sign verification is support. This is to avoid repeating the
585
** platforms in #ifdef clauses in other files.
586
**
587
*/
588
#define CODE_SIGNING_SUPPORTED
589
#endif
590
591
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)
592
#define RSA_SECURID_SUPPORTED
593
#endif
594
595
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)
596
#define SAFEWORD_SOFTOKEN_SUPPORTED
597
#endif
598
599
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_APPLE_SSLVPN) || ( defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) )
600
/*
601
** the IPSEC_SUPPORTED define is used to track the platforms
602
** where the IPSec protocol is supported. This is to avoid repeating the
603
** platforms in #ifdef clauses in other files.
604
*/
605
#define IPSEC_SUPPORTED
606
#endif
607
608
#if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_CHROMEBOOK)) || defined(PLATFORM_APPLE_SSLVPN) || defined (PLATFORM_ANDROID)
609
/*
610
** The IPV6_SUPPORTED define is used to track the platforms
611
** where full IPv6 capability is supported. This is to avoid repeating the
612
** platforms in #ifdef clauses in other files.
613
** Note that this is further narrowed down by method CIPv6Util::IsIPv6FullCapabilitySupported.
614
*/
615
#define IPV6_SUPPORTED
616
#endif
617
618
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_APPLE_SSLVPN) || ( defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) )
619
/*
620
** the PLUGIN_PROTOCOL_SUPPORTED define is used to track the platforms
621
** where modular protocol Plugins are supported. This is to avoid repeating the
622
** platforms in #ifdef clauses in other files.
623
*/
624
#define PLUGIN_PROTOCOL_SUPPORTED
625
#endif
626
627
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP) && !defined(PRODUCT_TYPE_SSA)
628
/*
629
** The IPSEC_OVER_SSL define is used to track the platforms
630
** where the feature "IPsec tunneling over SSL for Oracle" (EDCS-852737) is supported.
631
** This is to avoid repeating the platforms in #ifdef clauses in other files.
632
** Also, when the support expands to other platforms, they only need to be added in
633
** one place.
634
*/
635
#define IPSEC_OVER_SSL
636
#endif
637
638
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK)) || defined(APPLE_IOS)
639
/*
640
** the DATA_OBFUSCATING_SUPPORTED define is used to track the platforms
641
** where data obfuscation using key exchanges are supported. This is to
642
** avoid repeating the platforms in #ifdef clauses in other files.
643
*/
644
#define DATA_OBFUSCATING_SUPPORTED
645
#endif
646
647
#if !defined(PLATFORM_APPLE_SSLVPN) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK)
648
/*
649
** the HOSTFILE_MODIFICATION_SUPPORTED define is used to track the platforms
650
** where hosts file modification is performed. This is to avoid repeating the
651
** platforms in #ifdef clauses in other files.
652
*/
653
#define HOSTSFILE_MODIFICATION_SUPPORTED
654
#endif
655
656
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)|| defined(PLATFORM_WIN_APP)
657
/*
658
** the SCEP_CERTIFICATE_ENROLLMENT_SUPPORTED define is used to track the platforms
659
** where SCEP enrollment can be performed. This is to avoid repeating the
660
** platforms in #ifdef clauses in other files.
661
*/
662
#define SCEP_CERTIFICATE_ENROLLMENT_SUPPORTED
663
#endif
664
665
#if (defined(_WIN32) && !defined(_WIN32_WCE))
666
/*
667
** these XXX_PROFILE_SUPPORTED defines are used to track the platforms where
668
** Service Profiles for optional modules are supported.
669
** All platforms: VPN
670
** Windows: NAM, Web Security, ISE Posture, FireAMP, NVM and OpenDNS
671
*/
672
#define NAM_PROFILE_SUPPORTED
673
#define WEBSEC_PROFILE_SUPPORTED
674
#define ISEPOSTURE_PROFILE_SUPPORTED
675
#define FIREAMP_PROFILE_SUPPORTED
676
#define NVM_PROFILE_SUPPORTED
677
#define OPENDNS_PROFILE_SUPPORTED
678
#elif defined(PLATFORM_DARWIN)
679
/*
680
** OS X: Web Security, ISE Posture, FireAMP, NVM and OpenDNS
681
*/
682
#define WEBSEC_PROFILE_SUPPORTED
683
#define ISEPOSTURE_PROFILE_SUPPORTED
684
#define FIREAMP_PROFILE_SUPPORTED
685
#define NVM_PROFILE_SUPPORTED
686
#define OPENDNS_PROFILE_SUPPORTED
687
#elif defined(PLATFORM_LINUX)
688
#define NVM_PROFILE_SUPPORTED
689
#define ISEPOSTURE_PROFILE_SUPPORTED
690
#endif
691
692
#if defined(_WIN32) || defined(PLATFORM_DARWIN)
693
/*
694
** the CLOUD_UPDATE_SUPPORTED define is used to track the platforms
695
** that support cloud updates (currently from OpenDNS). This is to avoid repeating the
696
** platforms in #ifdef clauses in other files.
697
*/
698
#define CLOUD_UPDATE_SUPPORTED
699
#endif
700
701
/*
702
** The PLATFORM_DESKTOP define is used to track AnyConnect desktop platforms.
703
*/
704
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK) && !defined (PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK))) \
705
&& !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
706
#define PLATFORM_DESKTOP
707
#endif
708
709
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
710
/*
711
** The DNS_PLUGIN_SUPPORTED define is used to track the platforms where the DNS KDF plugin is
712
** available. This is to avoid repeating the platforms in #ifdef clauses in other files.
713
** Also, when support expands to other platforms, they only need to be added in one place.
714
*/
715
#define DNS_PLUGIN_SUPPORTED
716
#if defined(_WIN32)
717
/*
718
** The DNS_PLUGIN_DNS_REQ_HANDLING_SUPPORTED define is used to track the platforms where the DNS KDF plugin is
719
** available and supports handling of DNS requests during the VPN tunnel (e.g. for split-DNS or tunnel-all-DNS enforcement).
720
**/
721
#define DNS_PLUGIN_DNS_REQ_HANDLING_SUPPORTED
722
#endif // _WIN32
723
/*
724
** The DYNAMIC_SPLIT_TUNNELING_SUPPORTED define is used to track the platforms where dynamic split tunneling is supported.
725
**/
726
#define DYNAMIC_SPLIT_TUNNELING_SUPPORTED
727
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
728
729
#if defined(PLATFORM_DESKTOP)
730
/*
731
** The exportStats call is only supported on the Desktop Platforms,
732
** it should not be included or supported if it is not a Desktop Plat
733
*/
734
#define EXPORT_STATS_SUPPORTED
735
#endif
736
737
#if defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_APPLE_SSLVPN)
738
#define AC_CERTIFICATE_POLICY_SUPPORTED
739
#endif
740
741
#ifndef _TRSTRING
742
#define _tr(String) String
743
#define _TRSTRING
744
#endif
745
746
#ifndef _C_MYASSERT
747
#define C_MYASSERT(e) typedef char __C_MYASSERT__[(e)?1:-1]
748
#define _C_MYASSERT
749
#endif
750
751
#if defined(PLATFORM_APPLE_SSLVPN) || defined(APPLE_IOS)
752
#define NETWORK_ORDER_LOOPBACK_INTF_ADDR htonl(0x7f000001) // 127.0.0.1
753
#endif
754
755
#if !defined(BITS_PER_BYTE)
756
#define BITS_PER_BYTE 8
757
#endif
758
759
#if defined(PLATFORM_DESKTOP) && defined(PLATFORM_LINUX)
760
#define STATIC_THREAD_LOCAL static __thread
761
#else
762
#define STATIC_THREAD_LOCAL thread_local
763
#endif
764
765
/*
766
** The MANUAL_PKCS12_IMPORT_SUPPORTED define is used to track the platforms
767
** where the manual import of PKCS12 certificates is supported. This is to avoid
768
** repeating the platforms in #ifdef clauses in other files.
769
770
** NOTE: When changing the MANUAL_PKCS12_IMPORT_SUPPORTED definition, you MUST also
771
** update the ClientIfcBase.h! We duplicate this definition there due to the manner
772
** in which we distribute our code to partners; we cannot include this header from
773
** ClientIfcBase.h.
774
*/
775
#if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK)|| defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_WIN_APP)
776
#define MANUAL_PKCS12_IMPORT_SUPPORTED
777
#endif
778
779
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK)
780
// Zlib is statically linked.
781
#define STATIC_ZLIB
782
#endif
783
784
#if (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID)) || defined(PLATFORM_DARWIN)
785
// Use zlib dynamic library on the system.
786
#define USE_SYSTEM_ZLIB
787
#endif
788
789
790
/*
791
* Platforms that support a single profile.
792
*/
793
#if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK)
794
#define USE_SINGLE_PROFILE
795
#endif
796
797
798
/*
799
* Platforms that support ACIDEX.
800
*/
801
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_CHROMEBOOK)
802
#define ACIDEX_SUPPORTED
803
#endif
804
805
/*
806
* Platforms that support PerApp.
807
*/
808
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)
809
#define PERAPP_SUPPORTED
810
#endif
811
812
813
/*
814
* Platforms that support HOSTDATA.
815
*/
816
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK)
817
#define HOST_DATA_SUPPORTED
818
#endif
819
820
821
/*
822
* Platforms that support scripting.
823
*
824
* When changing the SCRIPTING_SUPPORTED definition, you MUST also update the
825
* ClientIfcBase.h! We duplicate this definition there due to the manner in
826
* which we distribute our code to partners; we cannot include this header from
827
* ClientIfcBase.h.
828
829
*/
830
#if !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_WIN_APP)
831
#define SCRIPTING_SUPPORTED
832
#endif
833
834
#if defined(PLATFORM_ANDROID)
835
// On Android, modifying the default route may break system network services.
836
#define DONT_TOUCH_IPV4_DEFAULT_ROUTE
837
#endif
838
839
#if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK)
840
#define SNAK_NO_ROUTE_TABLE_ACCESS
841
#endif
842
843
#if defined(ANYCONNECT_USE_SNAK) || defined(PLATFORM_APPLE_SSLVPN)
844
#define GLOBAL_SNAK_PLUGIN_VER 2
845
#endif
846
847
/*
848
** Supports API for integrating program data (e.g. localization and profile).
849
**
850
** NOTE: When changing the PROGRAM_DATA_IMPORT_SUPPORTED definition, you MUST also
851
** update the ClientIfcBase.h! We duplicate this definition there due to the manner
852
** in which we distribute our code to partners; we cannot include this header from
853
** ClientIfcBase.h.
854
*/
855
#if defined(PLATFORM_ANDROID)
856
#define PROGRAM_DATA_IMPORT_SUPPORTED
857
#endif
858
859
/*
860
** Credentials for a connection can be prefilled via uri handling or API calls
861
** if you add a new platform, you need to add it in ClientIfcBase.h and ConnectPromptInfoBase.h
862
**
863
** NOTE: When changing the CREDENTIAL_PREFILL_SUPPORTED definition, you MUST also
864
** update the ClientIfcBase.h! We duplicate this definition there due to the manner
865
** in which we distribute our code to partners; we cannot include this header from
866
** ClientIfcBase.h.
867
*/
868
#if defined(PLATFORM_ANDROID)
869
#define CREDENTIAL_PREFILL_SUPPORTED
870
#endif
871
872
#if !(defined(_WIN32_WCE) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK))
873
// support for automatic reconnects
874
#define AUTORECONNECT_SUPPORTED
875
#endif
876
877
#if !defined(_WIN32_WCE) && !defined(PLATFORM_LINUX_EMBEDDED_PPC) && !defined(PLATFORM_WEBOS_ARM) && !defined(PLATFORM_WEBOS_X86) && !defined(APPLE_IOS) && !defined(PLATFORM_WIN_APP) && !defined(_DOWNLOADER)
878
#define FIPS_SUPPORTED
879
#endif
880
881
#if !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP) && !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_LINUX_EMBEDDED_PPC) && !defined(PLATFORM_WEBOS_ARM) && !defined(PLATFORM_WEBOS_X86) && !defined(APPLE_IOS) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_CHROMEBOOK)
882
#define LEAF_SUPPORTED
883
#endif
884
885
#if defined(PLATFORM_DESKTOP) && (defined(_WIN32) || defined(PLATFORM_LINUX))
886
/*
887
** This define is used to track platforms where user logon
888
** related preferences in client profile are supported.
889
*/
890
#define ENFORCE_USER_LOGON_SETTINGS
891
#endif
892
893
#if !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK) // More platforms need to be added
894
#define WIDE_CHAR_SUPPORTED
895
#endif
896
897
#if defined(PLATFORM_DESKTOP) && (defined(_WIN32) || defined(PLATFORM_DARWIN))
898
/*
899
** This define is used to track platforms where private-side proxy
900
** settings are supported.
901
*/
902
#define TUNNEL_PROXY_SETTINGS_SUPPORTED
903
#endif
904
905
/*
906
** Public Proxy support is only implemented on Windows, Linux and Mac desktop platforms
907
*/
908
#if defined(PLATFORM_DESKTOP)
909
#define PUBLIC_PROXY_SUPPORTED
910
#endif
911
912
/*
913
** NTLM support is only implemented on Windows desktop platforms
914
*/
915
#if defined(_WIN32) && defined(PUBLIC_PROXY_SUPPORTED)
916
#define PROXYAUTH_NTLM_SUPPORTED
917
#endif
918
919
#if defined(PLATFORM_ANDROID) || defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_APPLE_SSLVPN)
920
#define IMPORT_API_SUPPORTED
921
#endif
922
923
#if defined(PLATFORM_APPLE_SSLVPN) || (defined(PRODUCT_TYPE_SSA) && !(defined(PLATFORM_ANDROID) || defined(APPLE_IOS))) || defined(PLATFORM_CHROMEBOOK)
924
/*
925
** This serves to tell the IPsec plugin interface to explicitly
926
** exclude it's global namespace entry points, leaving the only
927
** plugin interface as a set of static class methods, which the
928
** loading code will look for directly.
929
*/
930
#define IPSEC_AS_INTERNAL_MODULE
931
#endif
932
933
#if defined(PLATFORM_ANDROID) // More platforms need to be added
934
#define dynamic_cast reinterpret_cast
935
#endif
936
937
#if defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) && !defined(PLATFORM_APPLE_SSLVPN)
938
#define CONFIGURE_REMOTE_WAKEUP_SUPPORTED
939
#endif
940
941
/*
942
** The SMARTCARD_SUPPORTED define is used to track the platforms where smartcard
943
** certificate authentication is supported. This is to avoid repeating the
944
** platforms in #ifdef clauses in other files.
945
*/
946
#if (defined(_WIN32) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN)
947
#define SMARTCARD_SUPPORTED
948
/*
949
** The SMARTCARD_REMOVAL_SUPPORTED define is used to track the platforms where smartcard
950
** removal monitoring is supported. This is to avoid repeating the
951
** platforms in #ifdef clauses in other files.
952
*/
953
#if defined(_WIN32)
954
#define SMARTCARD_REMOVAL_SUPPORTED
955
#endif
956
#endif // (_WIN32 && !PLATFORM_WIN_APP) || PLATFORM_DARWIN
957
958
#if (defined(PLATFORM_LINUX) || defined(PLATFORM_DARWIN)) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
959
/*
960
** The CIRCUMVENT_HOST_FILTERING_SUPPORTED define is used to track the platforms
961
** where AnyConnect can control whether or not pre-existing host filtering is
962
** circumvented upon applying AnyConnect filtering (only applicable to split-tunneling).
963
*/
964
#define CIRCUMVENT_HOST_FILTERING_SUPPORTED
965
#endif
966
967
#if defined(PLATFORM_LINUX) && defined(PLATFORM_DESKTOP)
968
/*
969
** The TUNNEL_FROM_ANY_SOURCE_SUPPORTED define is used to track the platforms
970
** where admin can control whether or not to allow packets from any source addresses
971
** being tunneled.
972
*/
973
#define TUNNEL_FROM_ANY_SOURCE_SUPPORTED
974
#endif
975
976
#if defined(_WIN32) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
977
/*
978
** The SKIP_DHCP_SERVER_ROUTE_SUPPORTED define is used to track the platforms
979
** where the admin can control whether or not the public DHCP server route is created
980
** upon establishing the VPN tunnel.
981
*/
982
#define SKIP_DHCP_SERVER_ROUTE_SUPPORTED
983
#endif
984
985
#if defined(PLUGIN_PROTOCOL_SUPPORTED) && !defined(PRODUCT_TYPE_SSA)
986
#if (defined(_WIN32) && !defined(_WIN32_WCE))
987
// support Service Control Plugins if defined
988
#define SERVICE_PLUGIN
989
// support PhoneHome Plugin if defined
990
#define PHONEHOME_PLUGIN
991
#elif defined(PLATFORM_DARWIN)
992
// support Service Control Plugins if defined
993
#define SERVICE_PLUGIN
994
// support PhoneHome Plugin if defined
995
#define PHONEHOME_PLUGIN
996
#elif defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK)
997
#define PHONEHOME_PLUGIN
998
#define SERVICE_PLUGIN
999
#endif
1000
#endif
1001
1002
#if (defined (PLATFORM_DARWIN) || defined (PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK) || (defined (PLATFORM_LINUX) && !defined (ANYCONNECT_USE_SNAK)))
1003
#define FILE_STORE_SUPPORTED
1004
#endif
1005
1006
#if !defined(PLATFORM_WIN_APP)
1007
/*
1008
** the INTERPROCESS_COMMUNICATION_SUPPORTED define is used to track the platforms where the
1009
** communication between processes is supported. This is to avoid repeating the
1010
** platforms in #ifdef clauses in other files.
1011
*/
1012
#define INTERPROCESS_COMMUNICATION_SUPPORTED
1013
#endif
1014
#if !defined(PLATFORM_WIN_APP)
1015
/*
1016
** the THREADS_SUPPORTED define is used to track the platforms where
1017
** threads are supported. This is to avoid repeating the
1018
** platforms in #ifdef clauses in other files.
1019
*/
1020
#define THREADS_SUPPORTED
1021
#endif
1022
1023
#if !defined(PLATFORM_WIN_APP)
1024
/*
1025
** the CAPTIVE_PORTAL_DETECTION_SUPPORTED define is used to track the platforms where
1026
** captive portal detection is supported. This is to avoid repeating the
1027
** platforms in #ifdef clauses in other files.
1028
*/
1029
#define CAPTIVE_PORTAL_DETECTION_SUPPORTED
1030
#endif
1031
1032
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(CAPTIVE_PORTAL_DETECTION_SUPPORTED) && defined(PLATFORM_DESKTOP)
1033
/*
1034
** the SECURE_CAPTIVE_PORTAL_REMEDIATION_SUPPORTED define is used to track the platforms where
1035
** secure/enhanced captive portal remediation is supported.
1036
*/
1037
#define SECURE_CAPTIVE_PORTAL_REMEDIATION_SUPPORTED
1038
1039
/*
1040
** The SCPR_FILTERING_VIA_KDF define tracks the platforms where secure captive
1041
** portal remediation filtering applied via KDF is supported.
1042
*/
1043
#if defined(_WIN32) || defined(PLATFORM_DARWIN)
1044
#define SCPR_FILTERING_VIA_KDF
1045
#endif // _WIN32 || PLATFORM_DARWIN
1046
#endif // (_WIN32 || PLATFORM_DARWIN) && CAPTIVE_PORTAL_DETECTION_SUPPORTED && PLATFORM_DESKTOP
1047
1048
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1049
/*
1050
** The REMOTE_PEER_ACCESS_HARDENING define is used to track the platforms where hardening of access
1051
** to the VPN headend/public proxy is available.
1052
*/
1053
#define REMOTE_PEER_ACCESS_HARDENING
1054
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
1055
1056
#if !defined(PLATFORM_WIN_APP)
1057
/*
1058
** the EVENTS_SUPPORTED define is used to track the platforms where
1059
** events are supported. This is to avoid repeating the
1060
** platforms in #ifdef clauses in other files.
1061
*/
1062
#define EVENTS_SUPPORTED
1063
#endif
1064
1065
#if defined(IPV6_SUPPORTED) && !defined(PLATFORM_WIN_APP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK) && !defined(PLATFORM_APPLE_SSLVPN)
1066
/*
1067
** the MODIFY_HOSTSFILE_SUPPORTED define is used to track the platforms where
1068
** modification of the system's hosts file is supported. This is to avoid repeating the
1069
** platforms in #ifdef clauses in other files.
1070
*/
1071
#define MODIFY_HOSTSFILE_SUPPORTED
1072
#endif
1073
1074
#if !defined(PLATFORM_WIN_APP)
1075
/*
1076
** the HOST_CONFIG_MANAGER_SUPPORTED define is used to track the platforms where
1077
** broad control of the host OS is supported. This is to avoid repeating the
1078
** platforms in #ifdef clauses in other files.
1079
*/
1080
#define HOST_CONFIG_MANAGER_SUPPORTED
1081
#endif
1082
1083
#if defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_WIN_APP) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK) || defined(PLATFORM_APPLE_SSLVPN)
1084
/*
1085
** the FILE_SYNCHRONIZER_SUPPORTED define is used to track the platforms where
1086
** files downloaded directly by VPN API are supported. This is to avoid repeating the
1087
** platforms in #ifdef clauses in other files.
1088
*/
1089
#define FILE_SYNCHRONIZER_SUPPORTED
1090
#endif
1091
1092
#if defined(_WIN32) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK))
1093
/*
1094
** the SAVE_VPNCONFIG_TO_FILE_SUPPORTED define is used to track the platforms where the
1095
** writting of the VPN config to file is supported. This is to avoid repeating the
1096
** platforms in #ifdef clauses in other files.
1097
*/
1098
#define SAVE_VPNCONFIG_TO_FILE_SUPPORTED
1099
#endif
1100
1101
/*
1102
* DSCP preservation is not considered for Downloader. Downloader uses socket transport for IPC.
1103
*/
1104
#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_DARWIN) || defined(_WIN32)) && !defined(_DOWNLOADER) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1105
// Used to enable preservation of Differentiated Services field in the IP packet header.
1106
#define DIFFSERV_PRESERVATION_SUPPORTED
1107
#endif
1108
1109
#if !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1110
/*
1111
** the ROUTE_MANAGER_SUPPORTED define is used to track the platforms
1112
** where RouteMgr is supported. This is to avoid repeating the
1113
** platforms in #ifdef clauses in other files.
1114
*/
1115
#define ROUTE_MANAGER_SUPPORTED
1116
#endif
1117
1118
#if !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1119
/*
1120
** the FILTER_MANAGER_SUPPORTED define is used to track the platforms
1121
** where FilterMgr is supported. This is to avoid repeating the
1122
** platforms in #ifdef clauses in other files.
1123
*/
1124
#define FILTER_MANAGER_SUPPORTED
1125
#endif
1126
1127
#if defined(PLATFORM_APPLE_SSLVPN)
1128
// Used to enable the file logging for Apple plugins.
1129
//#define FILE_LOGGING_SUPPORTED
1130
#endif
1131
1132
/*
1133
** Legacy Single sign on authentication.
1134
** Explicitly disabled on mobile platforms due to session fixation vulnerability, as described in CSCvg65072
1135
** To be removed from desktop platforms in some future AnyConnect release (4.7?)
1136
*/
1137
#if defined(PLATFORM_DESKTOP)
1138
#define SSO_V1_SUPPORTED
1139
#endif
1140
1141
/*
1142
** Single sign on authentication (requires embedded browser).
1143
*/
1144
#if !defined(PLATFORM_WIN_APP)
1145
#define SSO_SUPPORTED
1146
#endif
1147
1148
#if defined (PLATFORM_DESKTOP) || defined(PLATFORM_ANDROID) || (defined(PLATFORM_APPLE_SSLVPN) && defined(SUBPLATFORM_IPHONE))
1149
#define EXTERNAL_SSO_SUPPORTED
1150
#endif
1151
1152
1153
#if !defined(PLATFORM_WIN_APP)
1154
#define MCA_SUPPORTED
1155
#endif
1156
1157
#if !defined(PLATFORM_WIN_APP)
1158
#define TIMERS_SUPPORTED
1159
#endif
1160
1161
#if !defined(PLATFORM_CHROMEBOOK)
1162
#define LOAD_EXTERNAL_MODULES
1163
#endif
1164
1165
#if defined(PLATFORM_ANDROID)
1166
#define SPLIT_DNS_PROXY_SUPPORTED
1167
#endif
1168
1169
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1170
/*
1171
** The MGMT_TUNNEL_SUPPORTED define is used to track the platforms where
1172
** the management tunnel feature is supported.
1173
*/
1174
#define MGMT_TUNNEL_SUPPORTED
1175
#endif
1176
1177
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && defined(PLATFORM_DESKTOP)
1178
/*
1179
** The SPLIT_DNS_EXCLUDE_SUPPORTED define is used to track the platforms where
1180
** split DNS for split exclude tunneling is supported.
1181
** Note: on Linux, due to lack of KDF support, similar to the split include counterpart, only DNS traffic over
1182
** the tunnel is controlled, i.e. the so-called "DNS fallback for split tunneling" (EDCS-792232).
1183
*/
1184
#define SPLIT_DNS_EXCLUDE_SUPPORTED
1185
#endif // (_WIN32 || PLATFORM_DARWIN || PLATFORM_LINUX) && PLATFORM_DESKTOP
1186
1187
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1188
/*
1189
** The BYPASS_VIRTUAL_SUBNETS_ONLY_SUPPORTED define is used to track the platforms where
1190
** limiting the localLAN split exclude to only virtual subnets is supported.
1191
*/
1192
#define BYPASS_VIRTUAL_SUBNETS_ONLY_SUPPORTED
1193
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
1194
1195
#if (defined(_WIN32) && defined(PLATFORM_DESKTOP)) || defined(MGMT_TUNNEL_SUPPORTED)
1196
// Machine certificate authentication SSL tunnel connections via agent are supported
1197
// on Windows desktop, and also on all platforms supporting the management tunnel feature.
1198
//
1199
#define SSL_CONNECT_VIA_AGENT_SUPPORTED
1200
#endif
1201
1202
/*
1203
** Performance optimization for the tunnel packet processing loop to attempt to process
1204
** multiple packets before calling back into select().
1205
*/
1206
#if !defined(_WIN32)
1207
#define MULTI_TUN_PACKET_PROCESSING_SUPPORTED
1208
#endif
1209
1210
#if (defined(_WIN32) && defined(_M_ARM64))
1211
/*
1212
** Disable Hostscan on Windows native ARM64 builds.
1213
*/
1214
#define ANYCONNECT_NO_CSD
1215
#endif
1216
#if defined(_WIN32) && defined(PLATFORM_DESKTOP) && !defined(_M_ARM64) && !defined(X86_FOR_ARM64)
1217
/*
1218
** Connected Standby is supported in Windows desktop but not UWP and not ARM64 (both native ARM64 and the hybrid _WIN32_FOR_ARM64).
1219
*/
1220
#define CONNECTED_STANDBY_SUPPORTED
1221
#endif
1222
1223
#if defined(_WIN32) && defined(PLATFORM_DESKTOP) || defined(PLATFORM_APPLE_SSLVPN)
1224
/*
1225
** This define is used to track platforms where multi-line logs are readable, and hence supported.
1226
*/
1227
#define MULTI_LINE_LOGS_SUPPORTED
1228
#endif
1229
1230
#if defined(PLATFORM_ANDROID)
1231
#define PBR_SUPPORTED
1232
#endif
1233
1234
#if (defined(PBR_SUPPORTED) && defined(PLATFORM_APPLE_SSLVPN) && defined(SUBPLATFORM_IPHONE))
1235
#define USERSPACE_DNS_CACHE_SUPPORTED;
1236
#endif
1237
1238
#if defined (PLATFORM_ANDROID)
1239
#define PCAP_VA_SUPPORTED
1240
#endif
1241
1242
/*
1243
* Platforms that support Unix Domain Socket.
1244
*/
1245
#if defined(PLATFORM_ANDROID)
1246
#define UNIX_DOMAIN_SOCKET_SUPPORTED
1247
#endif
1248
1249
/*
1250
* Platforms that use dynamic port assignment for IPC.
1251
*/
1252
#if defined(PLATFORM_APPLE_SSLVPN)
1253
#define IPC_DYNAMIC_PORT_ASSIGNMENT
1254
#endif
1255
1256
#if !defined(PLATFORM_WIN_APP)
1257
/*
1258
** This define is used to track platforms where the MTU adjustment can be cached
1259
** in a persistent cache (file) and be used across multiple VPN sessions.
1260
*/
1261
#define MTU_ADJUSTMENT_CACHING_SUPPORTED
1262
#endif // !defined(PLATFORM_WIN_APP)
1263
1264
#if defined(PLATFORM_DARWIN)
1265
// On Linux based systems, it is possible for an IPC connection to be blocked or go bad without the
1266
// Agent being made aware, especially on macOS where we set the NOSIGPIPE option. Triggering an
1267
// immediate read on the socket when a failure is suspected will expose any existing socket failure.
1268
// However, this is not appropriate to do on Windows and is currently limited to DARWIN to limit
1269
// testing requirements, so this define is used to enable the functionality. Consideration should
1270
// be given to add PLATFORM_LINUX to the defined condition.
1271
#define IPC_DEPOT_SOCKET_FAILURE_DETECTION
1272
#endif
1273
1274
#if defined(PLATFORM_LINUX) || defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)
1275
/*
1276
** This is to track platforms where OCSP revocation check for server certificate is supported.
1277
*/
1278
#define OCSP_SUPPORTED
1279
#endif
1280
1281
/*
1282
** The PRECONNECT_REMINDER_MSG_SUPPORTED define is used to track the platforms
1283
** support AnyConnect pre-connect reminder message. The message is displayed only
1284
** during the first connection attempt.
1285
**
1286
*/
1287
#if defined(PLATFORM_DESKTOP) && !defined(PLATFORM_DARWIN)
1288
#define PRECONNECT_REMINDER_MSG_SUPPORTED
1289
#endif
1290
#if defined(PLATFORM_ANDROID)
1291
// On Android, it's been observed that with certain CLAT46 networks, the local IPv4 address
1292
// obtained from the native public socket does not match any network interface IP addresses
1293
// enumerated from higher-level Android framework. This native IPv4 address is still valid
1294
// however and corresponds to the pseudo IPv4 address of the CLAT46 interface (e.g. 192.0.0.4).
1295
// This define is a workaround to continue allowing VPN tunnel to function in these cases.
1296
#define ALLOW_INVALID_PUBLIC_INTERFACE_ADDRESS
1297
#endif
1298
1299
/* END OF MACRO HELL */
1300
#endif
/*__GENDEFS_H*/
AnyConnect C++ API Documentation by
Cisco Systems