AnyConnect Secure Mobility Client
4.10.06090
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(_WIN32) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
898
#define TUNNEL_PROXY_SETTINGS_SUPPORTED
899
#endif
900
901
/*
902
** Public Proxy support is only implemented on Windows, Linux and Mac desktop platforms
903
*/
904
#if defined(PLATFORM_DESKTOP)
905
#define PUBLIC_PROXY_SUPPORTED
906
#endif
907
908
/*
909
** NTLM support is only implemented on Windows desktop platforms
910
*/
911
#if defined(_WIN32) && defined(PUBLIC_PROXY_SUPPORTED)
912
#define PROXYAUTH_NTLM_SUPPORTED
913
#endif
914
915
#if defined(PLATFORM_ANDROID) || defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_APPLE_SSLVPN)
916
#define IMPORT_API_SUPPORTED
917
#endif
918
919
#if defined(PLATFORM_APPLE_SSLVPN) || (defined(PRODUCT_TYPE_SSA) && !(defined(PLATFORM_ANDROID) || defined(APPLE_IOS))) || defined(PLATFORM_CHROMEBOOK)
920
/*
921
** This serves to tell the IPsec plugin interface to explicitly
922
** exclude it's global namespace entry points, leaving the only
923
** plugin interface as a set of static class methods, which the
924
** loading code will look for directly.
925
*/
926
#define IPSEC_AS_INTERNAL_MODULE
927
#endif
928
929
#if defined(PLATFORM_ANDROID) // More platforms need to be added
930
#define dynamic_cast reinterpret_cast
931
#endif
932
933
#if defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) && !defined(PLATFORM_APPLE_SSLVPN)
934
#define CONFIGURE_REMOTE_WAKEUP_SUPPORTED
935
#endif
936
937
/*
938
** The SMARTCARD_SUPPORTED define is used to track the platforms where smartcard
939
** certificate authentication is supported. This is to avoid repeating the
940
** platforms in #ifdef clauses in other files.
941
*/
942
#if (defined(_WIN32) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN)
943
#define SMARTCARD_SUPPORTED
944
/*
945
** The SMARTCARD_REMOVAL_SUPPORTED define is used to track the platforms where smartcard
946
** removal monitoring is supported. This is to avoid repeating the
947
** platforms in #ifdef clauses in other files.
948
*/
949
#if defined(_WIN32)
950
#define SMARTCARD_REMOVAL_SUPPORTED
951
#endif
952
#endif // (_WIN32 && !PLATFORM_WIN_APP) || PLATFORM_DARWIN
953
954
#if (defined(PLATFORM_LINUX) || defined(PLATFORM_DARWIN)) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
955
/*
956
** The CIRCUMVENT_HOST_FILTERING_SUPPORTED define is used to track the platforms
957
** where AnyConnect can control whether or not pre-existing host filtering is
958
** circumvented upon applying AnyConnect filtering (only applicable to split-tunneling).
959
*/
960
#define CIRCUMVENT_HOST_FILTERING_SUPPORTED
961
#endif
962
963
#if defined(PLATFORM_LINUX) && defined(PLATFORM_DESKTOP)
964
/*
965
** The TUNNEL_FROM_ANY_SOURCE_SUPPORTED define is used to track the platforms
966
** where admin can control whether or not to allow packets from any source addresses
967
** being tunneled.
968
*/
969
#define TUNNEL_FROM_ANY_SOURCE_SUPPORTED
970
#endif
971
972
#if defined(_WIN32) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
973
/*
974
** The SKIP_DHCP_SERVER_ROUTE_SUPPORTED define is used to track the platforms
975
** where the admin can control whether or not the public DHCP server route is created
976
** upon establishing the VPN tunnel.
977
*/
978
#define SKIP_DHCP_SERVER_ROUTE_SUPPORTED
979
#endif
980
981
#if defined(PLUGIN_PROTOCOL_SUPPORTED) && !defined(PRODUCT_TYPE_SSA)
982
#if (defined(_WIN32) && !defined(_WIN32_WCE))
983
// support Service Control Plugins if defined
984
#define SERVICE_PLUGIN
985
// support PhoneHome Plugin if defined
986
#define PHONEHOME_PLUGIN
987
#elif defined(PLATFORM_DARWIN)
988
// support Service Control Plugins if defined
989
#define SERVICE_PLUGIN
990
// support PhoneHome Plugin if defined
991
#define PHONEHOME_PLUGIN
992
#elif defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK)
993
#define PHONEHOME_PLUGIN
994
#define SERVICE_PLUGIN
995
#endif
996
#endif
997
998
#if (defined (PLATFORM_DARWIN) || defined (PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK) || (defined (PLATFORM_LINUX) && !defined (ANYCONNECT_USE_SNAK)))
999
#define FILE_STORE_SUPPORTED
1000
#endif
1001
1002
#if !defined(PLATFORM_WIN_APP)
1003
/*
1004
** the INTERPROCESS_COMMUNICATION_SUPPORTED define is used to track the platforms where the
1005
** communication between processes is supported. This is to avoid repeating the
1006
** platforms in #ifdef clauses in other files.
1007
*/
1008
#define INTERPROCESS_COMMUNICATION_SUPPORTED
1009
#endif
1010
#if !defined(PLATFORM_WIN_APP)
1011
/*
1012
** the THREADS_SUPPORTED define is used to track the platforms where
1013
** threads are supported. This is to avoid repeating the
1014
** platforms in #ifdef clauses in other files.
1015
*/
1016
#define THREADS_SUPPORTED
1017
#endif
1018
1019
#if !defined(PLATFORM_WIN_APP)
1020
/*
1021
** the CAPTIVE_PORTAL_DETECTION_SUPPORTED define is used to track the platforms where
1022
** captive portal detection is supported. This is to avoid repeating the
1023
** platforms in #ifdef clauses in other files.
1024
*/
1025
#define CAPTIVE_PORTAL_DETECTION_SUPPORTED
1026
#endif
1027
1028
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(CAPTIVE_PORTAL_DETECTION_SUPPORTED) && defined(PLATFORM_DESKTOP)
1029
/*
1030
** the SECURE_CAPTIVE_PORTAL_REMEDIATION_SUPPORTED define is used to track the platforms where
1031
** secure/enhanced captive portal remediation is supported.
1032
*/
1033
#define SECURE_CAPTIVE_PORTAL_REMEDIATION_SUPPORTED
1034
1035
/*
1036
** The SCPR_FILTERING_VIA_KDF define tracks the platforms where secure captive
1037
** portal remediation filtering applied via KDF is supported.
1038
*/
1039
#if defined(_WIN32) || defined(PLATFORM_DARWIN)
1040
#define SCPR_FILTERING_VIA_KDF
1041
#endif // _WIN32 || PLATFORM_DARWIN
1042
#endif // (_WIN32 || PLATFORM_DARWIN) && CAPTIVE_PORTAL_DETECTION_SUPPORTED && PLATFORM_DESKTOP
1043
1044
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1045
/*
1046
** The REMOTE_PEER_ACCESS_HARDENING define is used to track the platforms where hardening of access
1047
** to the VPN headend/public proxy is available.
1048
*/
1049
#define REMOTE_PEER_ACCESS_HARDENING
1050
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
1051
1052
#if !defined(PLATFORM_WIN_APP)
1053
/*
1054
** the EVENTS_SUPPORTED define is used to track the platforms where
1055
** events are supported. This is to avoid repeating the
1056
** platforms in #ifdef clauses in other files.
1057
*/
1058
#define EVENTS_SUPPORTED
1059
#endif
1060
1061
#if defined(IPV6_SUPPORTED) && !defined(PLATFORM_WIN_APP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK) && !defined(PLATFORM_APPLE_SSLVPN)
1062
/*
1063
** the MODIFY_HOSTSFILE_SUPPORTED define is used to track the platforms where
1064
** modification of the system's hosts file is supported. This is to avoid repeating the
1065
** platforms in #ifdef clauses in other files.
1066
*/
1067
#define MODIFY_HOSTSFILE_SUPPORTED
1068
#endif
1069
1070
#if !defined(PLATFORM_WIN_APP)
1071
/*
1072
** the HOST_CONFIG_MANAGER_SUPPORTED define is used to track the platforms where
1073
** broad control of the host OS is supported. This is to avoid repeating the
1074
** platforms in #ifdef clauses in other files.
1075
*/
1076
#define HOST_CONFIG_MANAGER_SUPPORTED
1077
#endif
1078
1079
#if defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_WIN_APP) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK) || defined(PLATFORM_APPLE_SSLVPN)
1080
/*
1081
** the FILE_SYNCHRONIZER_SUPPORTED define is used to track the platforms where
1082
** files downloaded directly by VPN API are supported. This is to avoid repeating the
1083
** platforms in #ifdef clauses in other files.
1084
*/
1085
#define FILE_SYNCHRONIZER_SUPPORTED
1086
#endif
1087
1088
#if defined(_WIN32) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK))
1089
/*
1090
** the SAVE_VPNCONFIG_TO_FILE_SUPPORTED define is used to track the platforms where the
1091
** writting of the VPN config to file is supported. This is to avoid repeating the
1092
** platforms in #ifdef clauses in other files.
1093
*/
1094
#define SAVE_VPNCONFIG_TO_FILE_SUPPORTED
1095
#endif
1096
1097
/*
1098
* DSCP preservation is not considered for Downloader. Downloader uses socket transport for IPC.
1099
*/
1100
#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_DARWIN) || defined(_WIN32)) && !defined(_DOWNLOADER) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1101
// Used to enable preservation of Differentiated Services field in the IP packet header.
1102
#define DIFFSERV_PRESERVATION_SUPPORTED
1103
#endif
1104
1105
#if !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1106
/*
1107
** the ROUTE_MANAGER_SUPPORTED define is used to track the platforms
1108
** where RouteMgr is supported. This is to avoid repeating the
1109
** platforms in #ifdef clauses in other files.
1110
*/
1111
#define ROUTE_MANAGER_SUPPORTED
1112
#endif
1113
1114
#if !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1115
/*
1116
** the FILTER_MANAGER_SUPPORTED define is used to track the platforms
1117
** where FilterMgr is supported. This is to avoid repeating the
1118
** platforms in #ifdef clauses in other files.
1119
*/
1120
#define FILTER_MANAGER_SUPPORTED
1121
#endif
1122
1123
#if defined(PLATFORM_APPLE_SSLVPN)
1124
// Used to enable the file logging for Apple plugins.
1125
//#define FILE_LOGGING_SUPPORTED
1126
#endif
1127
1128
/*
1129
** Legacy Single sign on authentication.
1130
** Explicitly disabled on mobile platforms due to session fixation vulnerability, as described in CSCvg65072
1131
** To be removed from desktop platforms in some future AnyConnect release (4.7?)
1132
*/
1133
#if defined(PLATFORM_DESKTOP)
1134
#define SSO_V1_SUPPORTED
1135
#endif
1136
1137
/*
1138
** Single sign on authentication (requires embedded browser).
1139
*/
1140
#if !defined(PLATFORM_WIN_APP)
1141
#define SSO_SUPPORTED
1142
#endif
1143
1144
#if defined (PLATFORM_DESKTOP) || defined(PLATFORM_ANDROID) || (defined(PLATFORM_APPLE_SSLVPN) && defined(SUBPLATFORM_IPHONE))
1145
#define EXTERNAL_SSO_SUPPORTED
1146
#endif
1147
1148
1149
#if !defined(PLATFORM_WIN_APP)
1150
#define MCA_SUPPORTED
1151
#endif
1152
1153
#if !defined(PLATFORM_WIN_APP)
1154
#define TIMERS_SUPPORTED
1155
#endif
1156
1157
#if !defined(PLATFORM_CHROMEBOOK)
1158
#define LOAD_EXTERNAL_MODULES
1159
#endif
1160
1161
#if defined(PLATFORM_ANDROID)
1162
#define SPLIT_DNS_PROXY_SUPPORTED
1163
#endif
1164
1165
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1166
/*
1167
** The MGMT_TUNNEL_SUPPORTED define is used to track the platforms where
1168
** the management tunnel feature is supported.
1169
*/
1170
#define MGMT_TUNNEL_SUPPORTED
1171
#endif
1172
1173
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && defined(PLATFORM_DESKTOP)
1174
/*
1175
** The SPLIT_DNS_EXCLUDE_SUPPORTED define is used to track the platforms where
1176
** split DNS for split exclude tunneling is supported.
1177
** Note: on Linux, due to lack of KDF support, similar to the split include counterpart, only DNS traffic over
1178
** the tunnel is controlled, i.e. the so-called "DNS fallback for split tunneling" (EDCS-792232).
1179
*/
1180
#define SPLIT_DNS_EXCLUDE_SUPPORTED
1181
#endif // (_WIN32 || PLATFORM_DARWIN || PLATFORM_LINUX) && PLATFORM_DESKTOP
1182
1183
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1184
/*
1185
** The BYPASS_VIRTUAL_SUBNETS_ONLY_SUPPORTED define is used to track the platforms where
1186
** limiting the localLAN split exclude to only virtual subnets is supported.
1187
*/
1188
#define BYPASS_VIRTUAL_SUBNETS_ONLY_SUPPORTED
1189
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
1190
1191
#if (defined(_WIN32) && defined(PLATFORM_DESKTOP)) || defined(MGMT_TUNNEL_SUPPORTED)
1192
// Machine certificate authentication SSL tunnel connections via agent are supported
1193
// on Windows desktop, and also on all platforms supporting the management tunnel feature.
1194
//
1195
#define SSL_CONNECT_VIA_AGENT_SUPPORTED
1196
#endif
1197
1198
/*
1199
** Performance optimization for the tunnel packet processing loop to attempt to process
1200
** multiple packets before calling back into select().
1201
*/
1202
#if !defined(_WIN32)
1203
#define MULTI_TUN_PACKET_PROCESSING_SUPPORTED
1204
#endif
1205
1206
#if (defined(_WIN32) && defined(_M_ARM64))
1207
/*
1208
** Disable Hostscan on Windows native ARM64 builds.
1209
*/
1210
#define ANYCONNECT_NO_CSD
1211
#endif
1212
#if defined(_WIN32) && defined(PLATFORM_DESKTOP) && !defined(_M_ARM64) && !defined(X86_FOR_ARM64)
1213
/*
1214
** Connected Standby is supported in Windows desktop but not UWP and not ARM64 (both native ARM64 and the hybrid _WIN32_FOR_ARM64).
1215
*/
1216
#define CONNECTED_STANDBY_SUPPORTED
1217
#endif
1218
1219
#if defined(_WIN32) && defined(PLATFORM_DESKTOP) || defined(PLATFORM_APPLE_SSLVPN)
1220
/*
1221
** This define is used to track platforms where multi-line logs are readable, and hence supported.
1222
*/
1223
#define MULTI_LINE_LOGS_SUPPORTED
1224
#endif
1225
1226
#if defined(PLATFORM_ANDROID)
1227
#define PBR_SUPPORTED
1228
#endif
1229
1230
#if (defined(PBR_SUPPORTED) && defined(PLATFORM_APPLE_SSLVPN) && defined(SUBPLATFORM_IPHONE))
1231
#define USERSPACE_DNS_CACHE_SUPPORTED;
1232
#endif
1233
1234
#if defined (PLATFORM_ANDROID)
1235
#define PCAP_VA_SUPPORTED
1236
#endif
1237
1238
/*
1239
* Platforms that support Unix Domain Socket.
1240
*/
1241
#if defined(PLATFORM_ANDROID)
1242
#define UNIX_DOMAIN_SOCKET_SUPPORTED
1243
#endif
1244
1245
/*
1246
* Platforms that use dynamic port assignment for IPC.
1247
*/
1248
#if defined(PLATFORM_APPLE_SSLVPN)
1249
#define IPC_DYNAMIC_PORT_ASSIGNMENT
1250
#endif
1251
1252
#if !defined(PLATFORM_WIN_APP)
1253
/*
1254
** This define is used to track platforms where the MTU adjustment can be cached
1255
** in a persistent cache (file) and be used across multiple VPN sessions.
1256
*/
1257
#define MTU_ADJUSTMENT_CACHING_SUPPORTED
1258
#endif // !defined(PLATFORM_WIN_APP)
1259
1260
#if defined(PLATFORM_DARWIN)
1261
// On Linux based systems, it is possible for an IPC connection to be blocked or go bad without the
1262
// Agent being made aware, especially on macOS where we set the NOSIGPIPE option. Triggering an
1263
// immediate read on the socket when a failure is suspected will expose any existing socket failure.
1264
// However, this is not appropriate to do on Windows and is currently limited to DARWIN to limit
1265
// testing requirements, so this define is used to enable the functionality. Consideration should
1266
// be given to add PLATFORM_LINUX to the defined condition.
1267
#define IPC_DEPOT_SOCKET_FAILURE_DETECTION
1268
#endif
1269
1270
#if defined(PLATFORM_LINUX) || defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)
1271
/*
1272
** This is to track platforms where OCSP revocation check for server certificate is supported.
1273
*/
1274
#define OCSP_SUPPORTED
1275
#endif
1276
1277
/*
1278
** The PRECONNECT_REMINDER_MSG_SUPPORTED define is used to track the platforms
1279
** support AnyConnect pre-connect reminder message. The message is displayed only
1280
** during the first connection attempt.
1281
**
1282
*/
1283
#if defined(PLATFORM_DESKTOP) && !defined(PLATFORM_DARWIN)
1284
#define PRECONNECT_REMINDER_MSG_SUPPORTED
1285
#endif
1286
#if defined(PLATFORM_ANDROID)
1287
// On Android, it's been observed that with certain CLAT46 networks, the local IPv4 address
1288
// obtained from the native public socket does not match any network interface IP addresses
1289
// enumerated from higher-level Android framework. This native IPv4 address is still valid
1290
// however and corresponds to the pseudo IPv4 address of the CLAT46 interface (e.g. 192.0.0.4).
1291
// This define is a workaround to continue allowing VPN tunnel to function in these cases.
1292
#define ALLOW_INVALID_PUBLIC_INTERFACE_ADDRESS
1293
#endif
1294
1295
/* END OF MACRO HELL */
1296
#endif
/*__GENDEFS_H*/
AnyConnect C++ API Documentation by
Cisco Systems