AnyConnect Secure Mobility Client
5.0.00556
Main Page
Related Pages
Classes
Files
File List
File Members
GenDefs.h
1
/**************************************************************************
2
* Copyright (c) 2000, 2021-2022 Cisco Systems, Inc.
3
* All Rights Reserved. Cisco Highly Confidential.
4
***************************************************************************
5
*
6
* File: GenDefs.h
7
* Date: 08/2000
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_ELEMENT_BYTES
372
// Yields the number of bytes in an element of the array.
373
#define ARRAY_ELEMENT_BYTES(a) (sizeof(a[0]))
374
#endif
375
376
#ifndef ARRAY_SIZE
377
// Yields the number of elements in the array.
378
#define ARRAY_SIZE(a) (sizeof(a)/ARRAY_ELEMENT_BYTES(a))
379
#endif
380
381
#if !defined(TO_STR) && !defined(TO_TSTR) && !defined(SYMBOL_TO_STR) && !defined(SYMBOL_TO_TSTR)
382
383
// use TO_STR(x)/TO_TSTR(x) to stringize (put double quotes around) x
384
// example:
385
// std::string foo = TO_STR(15);
386
// tstring bar = TO_TSTR(15);
387
// becomes
388
// std::string foo = "15";
389
// tstring bar = _T("15");
390
#define TO_STR(x) #x
391
#define TO_TSTR(x) _T(#x)
392
393
// use SYMBOL_TO_STR(x)/SYMBOL_TO_TSTR(x) to stringize
394
// the definition of symbol x
395
// example:
396
// #define MAX_LEN 15
397
// std::string foo = SYMBOL_TO_STR(MAX_LEN);
398
// tstring bar = SYMBOL_TO_TSTR(MAX_LEN);
399
// becomes
400
// std::string foo = "15";
401
// tstring bar = _T("15");
402
//
403
// Note that TO_STR(MAX_LEN) results in "MAX_LEN". The double macro is required in
404
// order to strinigize the *definition* of a symbol (as opposed to the symbol itself)
405
#define SYMBOL_TO_STR(x) TO_STR(x)
406
#define SYMBOL_TO_TSTR(x) TO_TSTR(x)
407
408
#endif
409
410
#ifdef _WIN32
411
#define systemtime_t __time64_t
412
#define getSystemTimeInSeconds() _time64(NULL)
413
#else
414
#define systemtime_t time_t
415
#define getSystemTimeInSeconds() time(NULL)
416
#endif
417
418
#ifndef _WIN32
419
#ifndef INFINITE
420
#define INFINITE 0xFFFFFFFF
421
#endif
422
#endif
423
424
#ifdef _WIN32
425
#define ANY_PATHNAME_DELIMITER "/\\"
426
#define PATHNAME_DELIMITER '\\'
427
#define PATHNAME_DELIMITER_STR "\\"
428
#else
429
#define ANY_PATHNAME_DELIMITER "/"
430
#define PATHNAME_DELIMITER '/'
431
#define PATHNAME_DELIMITER_STR "/"
432
#endif
433
#define URL_URI_DELIMITER '/'
434
#define URL_URI_DELIMITER_STR "/"
435
436
#ifdef _WIN32
437
#define NEWLINE "\r\n"
438
#else
439
#define NEWLINE "\n"
440
#endif
441
442
#if defined(_WIN32)
443
#define HOSTSFILE_LOCATION _T("drivers\\etc\\hosts")
444
#else
445
#define HOSTSFILE_LOCATION _T("/etc/hosts")
446
#endif
447
448
#ifdef _WIN32
449
#define DebugWriteFile(_handle_,_buffer_,_length_,_refCharsWritten_) \
450
WriteFile((_handle_),(_buffer_),(_length_),(_refCharsWritten_),NULL)
451
#else
452
#ifndef INVALID_HANDLE_VALUE
453
#define INVALID_HANDLE_VALUE NULL
454
#endif
455
#define DebugWriteFile(_handle_,_buffer_,_length_,_refCharsWritten_) \
456
fprintf((_handle_), "%s", (_buffer_)); \
457
fflush((_handle_))
458
#endif
459
460
typedef
uint8_t MAC_ADDR[6];
461
462
#if !defined(_WIN32) || defined(_WIN32_WCE)
463
#ifndef ADDRESS_FAMILY
464
typedef
unsigned
short
ADDRESS_FAMILY;
465
#endif
466
#endif
467
468
#if __cplusplus >= 201103L
469
#define CPP_11_SUPPORTED
470
#endif
471
#if __cplusplus >= 201402L
472
#define CPP_14_SUPPORTED
473
#endif
474
#if __cplusplus >= 201703L
475
#define CPP_17_SUPPORTED
476
#endif
477
478
#if ((defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
479
/*
480
** the FIREWALL_SUPPORTED define is used to track the platforms
481
** where the firewall feature is supported. This is to avoid repeating the
482
** platforms in #ifdef clauses in other files.
483
** Also, when Firewall feature expands to other platforms, they only need to be added in
484
** one place.
485
*/
486
#define FIREWALL_SUPPORTED
487
#endif
488
489
#if !defined(PRODUCT_TYPE_SSA) && ((defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_CHROMEBOOK)))
490
/*
491
** the TRUSTED_NETWORK_DETECTION define is used to track the platforms
492
** where Trusted Network Detection is performed. This is to avoid repeating the
493
** platforms in #ifdef clauses in other files.
494
** Also, when TND support expands to other platforms, they only need to be added in
495
** one place.
496
*/
497
#define TRUSTED_NETWORK_DETECTION
498
499
/*
500
* Android only uses TND to report state to NVM.
501
* Policy-based actions are not supported.
502
*/
503
#if !defined(PLATFORM_ANDROID)
504
#define TND_ACTIONS_SUPPORTED
505
#endif
506
#endif
507
508
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK) && !defined(PLATFORM_WIN_APP))
509
#define INTER_MODULE_STATE_NOTIFY
510
#endif
511
512
#if ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(TRUSTED_NETWORK_DETECTION)) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_ANDROID)
513
/*
514
** the LOGIN_UTILITIES_SUPPORTED define is used to track the platforms
515
** that support AnyConnect action triggered by user login. This is to avoid
516
** repeating the platforms in #ifdef clauses in other files.
517
** Also, when login support expands to other platforms, they only need to be added in
518
** one place.
519
*/
520
#define LOGIN_UTILITIES_SUPPORTED
521
#endif
522
523
#if !(defined(PLATFORM_APPLE_SSLVPN) && TARGET_CPU_ARMV6)
524
/*
525
** A bug was discovered in iPhone testing wherein virtual inline functions do
526
** not work correctly on ARMv6 processors. To work around this, virtual inline
527
** function need to be made standard virtual functions on ARMv6. To prevent
528
** differences in runtime behavior, the VIRTUAL_INLINES_SUPPORTED define is used
529
** to define some virtual inlines in the header files, letting the functions be
530
** defined without the inline type in the cpp file for non-supported platforms.
531
*/
532
#define VIRTUAL_INLINES_SUPPORTED
533
#endif
534
535
/*
536
* When changing the SCRIPTING_SUPPORTED definition, you MUST also update the
537
* ClientIfcBase.h! We duplicate this definition there due to the manner in
538
* which we distribute our code to partners; we cannot include this header from
539
* ClientIfcBase.h.
540
*/
541
#if !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_WIN_APP)
542
/*
543
** the SCRIPTING_SUPPORTED define is used to enable the script manager for launching
544
** customer provided scripts on events like connection establishment, completion of
545
** disconnect, and captive portal detection.
546
*/
547
#define SCRIPTING_SUPPORTED
548
#endif
549
550
#if defined(PLATFORM_ANDROID)
551
#define DYNAMIC_UPDATE_LOCAL_POLICY
552
#endif // PLATFORM_ANDROID
553
554
#if !defined(PRODUCT_TYPE_SSA) && ((defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK)))
555
/*
556
** the NETWORK_ENVIRONMENT_STATE define is used to track the platforms
557
** where NETWORK_ENVIRONMENT_STATE check is performed. This is to avoid repeating the
558
** platforms in #ifdef clauses in other files.
559
** Also, when NES support expands to other platforms, they only need to be added in
560
** one place.
561
*/
562
#define NETWORK_ENVIRONMENT_STATE
563
#endif
564
565
566
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK))
567
/*
568
** The AUTOMATIC_HEADEND_SELECTION define is used to track the platforms
569
** where Automatic Headend Selection is performed. This is to avoid repeating the
570
** platforms in #ifdef clauses in other files.
571
** Also, when AHS support expands to other platforms, they only need to be added in
572
** one place.
573
*/
574
#define AUTOMATIC_HEADEND_SELECTION
575
#endif
576
577
#if (defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN)
578
/*
579
** the MUS_HOST_SERVICES define is used to track the platforms
580
** where MUS Host Status check is performed. This is to avoid repeating the
581
** platforms in #ifdef clauses in other files.
582
*/
583
#define MUS_HOST_SERVICES
584
#endif
585
586
// BUGBUG - initially only enable code signing for Windows
587
#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))
588
/*
589
** the CODE_SIGNING_SUPPORTED define is used to track the platforms
590
** where code sign verification is support. This is to avoid repeating the
591
** platforms in #ifdef clauses in other files.
592
**
593
*/
594
#define CODE_SIGNING_SUPPORTED
595
#endif
596
597
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)
598
#define RSA_SECURID_SUPPORTED
599
#endif
600
601
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP)
602
#define SAFEWORD_SOFTOKEN_SUPPORTED
603
#endif
604
605
#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) )
606
/*
607
** the IPSEC_SUPPORTED define is used to track the platforms
608
** where the IPSec protocol is supported. This is to avoid repeating the
609
** platforms in #ifdef clauses in other files.
610
*/
611
#define IPSEC_SUPPORTED
612
#endif
613
614
#if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_CHROMEBOOK)) || defined(PLATFORM_APPLE_SSLVPN) || defined (PLATFORM_ANDROID)
615
/*
616
** The IPV6_SUPPORTED define is used to track the platforms
617
** where full IPv6 capability is supported. This is to avoid repeating the
618
** platforms in #ifdef clauses in other files.
619
** Note that this is further narrowed down by method CIPv6Util::IsIPv6FullCapabilitySupported.
620
*/
621
#define IPV6_SUPPORTED
622
#endif
623
624
#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) )
625
/*
626
** the PLUGIN_PROTOCOL_SUPPORTED define is used to track the platforms
627
** where modular protocol Plugins are supported. This is to avoid repeating the
628
** platforms in #ifdef clauses in other files.
629
*/
630
#define PLUGIN_PROTOCOL_SUPPORTED
631
#endif
632
633
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP) && !defined(PRODUCT_TYPE_SSA)
634
/*
635
** The IPSEC_OVER_SSL define is used to track the platforms
636
** where the feature "IPsec tunneling over SSL for Oracle" (EDCS-852737) is supported.
637
** This is to avoid repeating the platforms in #ifdef clauses in other files.
638
** Also, when the support expands to other platforms, they only need to be added in
639
** one place.
640
*/
641
#define IPSEC_OVER_SSL
642
#endif
643
644
#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)
645
/*
646
** the DATA_OBFUSCATING_SUPPORTED define is used to track the platforms
647
** where data obfuscation using key exchanges are supported. This is to
648
** avoid repeating the platforms in #ifdef clauses in other files.
649
*/
650
#define DATA_OBFUSCATING_SUPPORTED
651
#endif
652
653
#if !defined(PLATFORM_APPLE_SSLVPN) && !defined(_WIN32_WCE) && !defined(PLATFORM_WIN_APP) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK)
654
/*
655
** the HOSTFILE_MODIFICATION_SUPPORTED define is used to track the platforms
656
** where hosts file modification is performed. This is to avoid repeating the
657
** platforms in #ifdef clauses in other files.
658
*/
659
#define HOSTSFILE_MODIFICATION_SUPPORTED
660
#endif
661
662
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)|| defined(PLATFORM_WIN_APP)
663
/*
664
** the SCEP_CERTIFICATE_ENROLLMENT_SUPPORTED define is used to track the platforms
665
** where SCEP enrollment can be performed. This is to avoid repeating the
666
** platforms in #ifdef clauses in other files.
667
*/
668
#define SCEP_CERTIFICATE_ENROLLMENT_SUPPORTED
669
#endif
670
671
#if (defined(_WIN32) && !defined(_WIN32_WCE))
672
/*
673
** these XXX_PROFILE_SUPPORTED defines are used to track the platforms where
674
** Service Profiles for optional modules are supported.
675
** All platforms: VPN
676
** Windows: NAM, Web Security, ISE Posture, FireAMP, NVM and OpenDNS
677
*/
678
#define NAM_PROFILE_SUPPORTED
679
#define WEBSEC_PROFILE_SUPPORTED
680
#define ISEPOSTURE_PROFILE_SUPPORTED
681
#define FIREAMP_PROFILE_SUPPORTED
682
#define NVM_PROFILE_SUPPORTED
683
#define OPENDNS_PROFILE_SUPPORTED
684
#elif defined(PLATFORM_DARWIN)
685
/*
686
** OS X: Web Security, ISE Posture, FireAMP, NVM and OpenDNS
687
*/
688
#define WEBSEC_PROFILE_SUPPORTED
689
#define ISEPOSTURE_PROFILE_SUPPORTED
690
#define FIREAMP_PROFILE_SUPPORTED
691
#define NVM_PROFILE_SUPPORTED
692
#define OPENDNS_PROFILE_SUPPORTED
693
#elif defined(PLATFORM_LINUX)
694
#define NVM_PROFILE_SUPPORTED
695
#define ISEPOSTURE_PROFILE_SUPPORTED
696
#endif
697
698
#if defined(_WIN32) || defined(PLATFORM_DARWIN)
699
/*
700
** the CLOUD_UPDATE_SUPPORTED define is used to track the platforms
701
** that support cloud updates (currently from OpenDNS). This is to avoid repeating the
702
** platforms in #ifdef clauses in other files.
703
*/
704
#define CLOUD_UPDATE_SUPPORTED
705
#endif
706
707
/*
708
** The PLATFORM_DESKTOP define is used to track AnyConnect desktop platforms.
709
*/
710
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK) && !defined (PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK))) \
711
&& !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
712
#define PLATFORM_DESKTOP
713
#endif
714
715
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
716
/*
717
** The DNS_PLUGIN_SUPPORTED define is used to track the platforms where the DNS KDF plugin is
718
** available. This is to avoid repeating the platforms in #ifdef clauses in other files.
719
** Also, when support expands to other platforms, they only need to be added in one place.
720
*/
721
#define DNS_PLUGIN_SUPPORTED
722
#if defined(_WIN32)
723
/*
724
** The DNS_PLUGIN_DNS_REQ_HANDLING_SUPPORTED define is used to track the platforms where the DNS KDF plugin is
725
** available and supports handling of DNS requests during the VPN tunnel (e.g. for split-DNS or tunnel-all-DNS enforcement).
726
**/
727
#define DNS_PLUGIN_DNS_REQ_HANDLING_SUPPORTED
728
#endif // _WIN32
729
/*
730
** The DYNAMIC_SPLIT_TUNNELING_SUPPORTED define is used to track the platforms where dynamic split tunneling is supported.
731
**/
732
#define DYNAMIC_SPLIT_TUNNELING_SUPPORTED
733
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
734
735
#if defined(PLATFORM_DESKTOP)
736
/*
737
** The exportStats call is only supported on the Desktop Platforms,
738
** it should not be included or supported if it is not a Desktop Plat
739
*/
740
#define EXPORT_STATS_SUPPORTED
741
#endif
742
743
#if defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_APPLE_SSLVPN)
744
#define AC_CERTIFICATE_POLICY_SUPPORTED
745
#endif
746
747
#ifndef _TRSTRING
748
#define _tr(String) String
749
#define _TRSTRING
750
#endif
751
752
#ifndef _C_MYASSERT
753
#define C_MYASSERT(e) typedef char __C_MYASSERT__[(e)?1:-1]
754
#define _C_MYASSERT
755
#endif
756
757
#if defined(PLATFORM_APPLE_SSLVPN) || defined(APPLE_IOS)
758
#define NETWORK_ORDER_LOOPBACK_INTF_ADDR htonl(0x7f000001) // 127.0.0.1
759
#endif
760
761
#if !defined(BITS_PER_BYTE)
762
#define BITS_PER_BYTE 8
763
#endif
764
765
#if defined(PLATFORM_DESKTOP) && defined(PLATFORM_LINUX)
766
#define STATIC_THREAD_LOCAL static __thread
767
#else
768
#define STATIC_THREAD_LOCAL thread_local
769
#endif
770
771
/*
772
** The MANUAL_PKCS12_IMPORT_SUPPORTED define is used to track the platforms
773
** where the manual import of PKCS12 certificates is supported. This is to avoid
774
** repeating the platforms in #ifdef clauses in other files.
775
776
** NOTE: When changing the MANUAL_PKCS12_IMPORT_SUPPORTED definition, you MUST also
777
** update the ClientIfcBase.h! We duplicate this definition there due to the manner
778
** in which we distribute our code to partners; we cannot include this header from
779
** ClientIfcBase.h.
780
*/
781
#if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK)|| defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_WIN_APP)
782
#define MANUAL_PKCS12_IMPORT_SUPPORTED
783
#endif
784
785
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK)
786
// Zlib is statically linked.
787
#define STATIC_ZLIB
788
#endif
789
790
#if (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID)) || defined(PLATFORM_DARWIN)
791
// Use zlib dynamic library on the system.
792
#define USE_SYSTEM_ZLIB
793
#endif
794
795
796
/*
797
* Platforms that support a single profile.
798
*/
799
#if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK)
800
#define USE_SINGLE_PROFILE
801
#endif
802
803
804
/*
805
* Platforms that support ACIDEX.
806
*/
807
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(PLATFORM_CHROMEBOOK)
808
#define ACIDEX_SUPPORTED
809
#endif
810
811
/*
812
* Platforms that support PerApp.
813
*/
814
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)
815
#define PERAPP_SUPPORTED
816
#endif
817
818
819
/*
820
* Platforms that support HOSTDATA.
821
*/
822
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK)
823
#define HOST_DATA_SUPPORTED
824
#endif
825
826
827
/*
828
* Platforms that support scripting.
829
*
830
* When changing the SCRIPTING_SUPPORTED definition, you MUST also update the
831
* ClientIfcBase.h! We duplicate this definition there due to the manner in
832
* which we distribute our code to partners; we cannot include this header from
833
* ClientIfcBase.h.
834
835
*/
836
#if !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_WIN_APP)
837
#define SCRIPTING_SUPPORTED
838
#endif
839
840
#if defined(PLATFORM_ANDROID)
841
// On Android, modifying the default route may break system network services.
842
#define DONT_TOUCH_IPV4_DEFAULT_ROUTE
843
#endif
844
845
#if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK)
846
#define SNAK_NO_ROUTE_TABLE_ACCESS
847
#endif
848
849
#if defined(ANYCONNECT_USE_SNAK) || defined(PLATFORM_APPLE_SSLVPN)
850
#define GLOBAL_SNAK_PLUGIN_VER 2
851
#endif
852
853
/*
854
** Supports API for integrating program data (e.g. localization and profile).
855
**
856
** NOTE: When changing the PROGRAM_DATA_IMPORT_SUPPORTED definition, you MUST also
857
** update the ClientIfcBase.h! We duplicate this definition there due to the manner
858
** in which we distribute our code to partners; we cannot include this header from
859
** ClientIfcBase.h.
860
*/
861
#if defined(PLATFORM_ANDROID)
862
#define PROGRAM_DATA_IMPORT_SUPPORTED
863
#endif
864
865
/*
866
** Credentials for a connection can be prefilled via uri handling or API calls
867
** if you add a new platform, you need to add it in ClientIfcBase.h and ConnectPromptInfoBase.h
868
**
869
** NOTE: When changing the CREDENTIAL_PREFILL_SUPPORTED definition, you MUST also
870
** update the ClientIfcBase.h! We duplicate this definition there due to the manner
871
** in which we distribute our code to partners; we cannot include this header from
872
** ClientIfcBase.h.
873
*/
874
#if defined(PLATFORM_ANDROID)
875
#define CREDENTIAL_PREFILL_SUPPORTED
876
#endif
877
878
#if !(defined(_WIN32_WCE) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK))
879
// support for automatic reconnects
880
#define AUTORECONNECT_SUPPORTED
881
#endif
882
883
#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)
884
#define FIPS_SUPPORTED
885
#endif
886
887
#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)
888
#define LEAF_SUPPORTED
889
#endif
890
891
#if defined(PLATFORM_DESKTOP) && (defined(_WIN32) || defined(PLATFORM_LINUX))
892
/*
893
** This define is used to track platforms where user logon
894
** related preferences in client profile are supported.
895
*/
896
#define ENFORCE_USER_LOGON_SETTINGS
897
#endif
898
899
#if !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK) // More platforms need to be added
900
#define WIDE_CHAR_SUPPORTED
901
#endif
902
903
#if defined(_WIN32) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
904
#define TUNNEL_PROXY_SETTINGS_SUPPORTED
905
#endif
906
907
/*
908
** Public Proxy support is only implemented on Windows, Linux and Mac desktop platforms
909
*/
910
#if defined(PLATFORM_DESKTOP)
911
#define PUBLIC_PROXY_SUPPORTED
912
#endif
913
914
/*
915
** NTLM support is only implemented on Windows desktop platforms
916
*/
917
#if defined(_WIN32) && defined(PUBLIC_PROXY_SUPPORTED)
918
#define PROXYAUTH_NTLM_SUPPORTED
919
#endif
920
921
#if defined(PLATFORM_ANDROID) || defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_APPLE_SSLVPN)
922
#define IMPORT_API_SUPPORTED
923
#endif
924
925
#if defined(PLATFORM_APPLE_SSLVPN) || (defined(PRODUCT_TYPE_SSA) && !(defined(PLATFORM_ANDROID) || defined(APPLE_IOS))) || defined(PLATFORM_CHROMEBOOK)
926
/*
927
** This serves to tell the IPsec plugin interface to explicitly
928
** exclude it's global namespace entry points, leaving the only
929
** plugin interface as a set of static class methods, which the
930
** loading code will look for directly.
931
*/
932
#define IPSEC_AS_INTERNAL_MODULE
933
#endif
934
935
#if defined(PLATFORM_ANDROID) // More platforms need to be added
936
#define dynamic_cast reinterpret_cast
937
#endif
938
939
#if defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) && !defined(PLATFORM_APPLE_SSLVPN)
940
#define CONFIGURE_REMOTE_WAKEUP_SUPPORTED
941
#endif
942
943
/*
944
** The SMARTCARD_SUPPORTED define is used to track the platforms where smartcard
945
** certificate authentication is supported. This is to avoid repeating the
946
** platforms in #ifdef clauses in other files.
947
*/
948
#if (defined(_WIN32) && !defined(PLATFORM_WIN_APP)) || defined(PLATFORM_DARWIN)
949
#define SMARTCARD_SUPPORTED
950
/*
951
** The SMARTCARD_REMOVAL_SUPPORTED define is used to track the platforms where smartcard
952
** removal monitoring is supported. This is to avoid repeating the
953
** platforms in #ifdef clauses in other files.
954
*/
955
#if defined(_WIN32)
956
#define SMARTCARD_REMOVAL_SUPPORTED
957
#endif
958
#endif // (_WIN32 && !PLATFORM_WIN_APP) || PLATFORM_DARWIN
959
960
#if (defined(PLATFORM_LINUX) || defined(PLATFORM_DARWIN)) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
961
/*
962
** The CIRCUMVENT_HOST_FILTERING_SUPPORTED define is used to track the platforms
963
** where AnyConnect can control whether or not pre-existing host filtering is
964
** circumvented upon applying AnyConnect filtering (only applicable to split-tunneling).
965
*/
966
#define CIRCUMVENT_HOST_FILTERING_SUPPORTED
967
#endif
968
969
#if defined(PLATFORM_LINUX) && defined(PLATFORM_DESKTOP)
970
/*
971
** The TUNNEL_FROM_ANY_SOURCE_SUPPORTED define is used to track the platforms
972
** where admin can control whether or not to allow packets from any source addresses
973
** being tunneled.
974
*/
975
#define TUNNEL_FROM_ANY_SOURCE_SUPPORTED
976
#endif
977
978
#if defined(_WIN32) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA)
979
/*
980
** The SKIP_DHCP_SERVER_ROUTE_SUPPORTED define is used to track the platforms
981
** where the admin can control whether or not the public DHCP server route is created
982
** upon establishing the VPN tunnel.
983
*/
984
#define SKIP_DHCP_SERVER_ROUTE_SUPPORTED
985
#endif
986
987
#if defined(PLUGIN_PROTOCOL_SUPPORTED) && !defined(PRODUCT_TYPE_SSA)
988
#if (defined(_WIN32) && !defined(_WIN32_WCE))
989
// support Service Control Plugins if defined
990
#define SERVICE_PLUGIN
991
// support PhoneHome Plugin if defined
992
#define PHONEHOME_PLUGIN
993
#elif defined(PLATFORM_DARWIN)
994
// support Service Control Plugins if defined
995
#define SERVICE_PLUGIN
996
// support PhoneHome Plugin if defined
997
#define PHONEHOME_PLUGIN
998
#elif defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK)
999
#define PHONEHOME_PLUGIN
1000
#define SERVICE_PLUGIN
1001
#endif
1002
#endif
1003
1004
#if (defined (PLATFORM_DARWIN) || defined (PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_CHROMEBOOK) || (defined (PLATFORM_LINUX) && !defined (ANYCONNECT_USE_SNAK)))
1005
#define FILE_STORE_SUPPORTED
1006
#endif
1007
1008
#if !defined(PLATFORM_WIN_APP)
1009
/*
1010
** the INTERPROCESS_COMMUNICATION_SUPPORTED define is used to track the platforms where the
1011
** communication between processes is supported. This is to avoid repeating the
1012
** platforms in #ifdef clauses in other files.
1013
*/
1014
#define INTERPROCESS_COMMUNICATION_SUPPORTED
1015
#endif
1016
#if !defined(PLATFORM_WIN_APP)
1017
/*
1018
** the THREADS_SUPPORTED define is used to track the platforms where
1019
** threads are supported. This is to avoid repeating the
1020
** platforms in #ifdef clauses in other files.
1021
*/
1022
#define THREADS_SUPPORTED
1023
#endif
1024
1025
#if !defined(PLATFORM_WIN_APP)
1026
/*
1027
** the CAPTIVE_PORTAL_DETECTION_SUPPORTED define is used to track the platforms where
1028
** captive portal detection is supported. This is to avoid repeating the
1029
** platforms in #ifdef clauses in other files.
1030
*/
1031
#define CAPTIVE_PORTAL_DETECTION_SUPPORTED
1032
#endif
1033
1034
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(CAPTIVE_PORTAL_DETECTION_SUPPORTED) && defined(PLATFORM_DESKTOP)
1035
/*
1036
** the SECURE_CAPTIVE_PORTAL_REMEDIATION_SUPPORTED define is used to track the platforms where
1037
** secure/enhanced captive portal remediation is supported.
1038
*/
1039
#define SECURE_CAPTIVE_PORTAL_REMEDIATION_SUPPORTED
1040
1041
/*
1042
** The SCPR_FILTERING_VIA_KDF define tracks the platforms where secure captive
1043
** portal remediation filtering applied via KDF is supported.
1044
*/
1045
#if defined(_WIN32) || defined(PLATFORM_DARWIN)
1046
#define SCPR_FILTERING_VIA_KDF
1047
#endif // _WIN32 || PLATFORM_DARWIN
1048
#endif // (_WIN32 || PLATFORM_DARWIN) && CAPTIVE_PORTAL_DETECTION_SUPPORTED && PLATFORM_DESKTOP
1049
1050
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1051
/*
1052
** The REMOTE_PEER_ACCESS_HARDENING define is used to track the platforms where hardening of access
1053
** to the VPN headend/public proxy is available.
1054
*/
1055
#define REMOTE_PEER_ACCESS_HARDENING
1056
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
1057
1058
#if !defined(PLATFORM_WIN_APP)
1059
/*
1060
** the EVENTS_SUPPORTED define is used to track the platforms where
1061
** events are supported. This is to avoid repeating the
1062
** platforms in #ifdef clauses in other files.
1063
*/
1064
#define EVENTS_SUPPORTED
1065
#endif
1066
1067
#if defined(IPV6_SUPPORTED) && !defined(PLATFORM_WIN_APP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK) && !defined(PLATFORM_APPLE_SSLVPN)
1068
/*
1069
** the MODIFY_HOSTSFILE_SUPPORTED define is used to track the platforms where
1070
** modification of the system's hosts file is supported. This is to avoid repeating the
1071
** platforms in #ifdef clauses in other files.
1072
*/
1073
#define MODIFY_HOSTSFILE_SUPPORTED
1074
#endif
1075
1076
#if !defined(PLATFORM_WIN_APP)
1077
/*
1078
** the HOST_CONFIG_MANAGER_SUPPORTED define is used to track the platforms where
1079
** broad control of the host OS is supported. This is to avoid repeating the
1080
** platforms in #ifdef clauses in other files.
1081
*/
1082
#define HOST_CONFIG_MANAGER_SUPPORTED
1083
#endif
1084
1085
#if defined(PRODUCT_TYPE_SSA) || defined(PLATFORM_WIN_APP) || defined(PLATFORM_ANDROID) || defined(PLATFORM_CHROMEBOOK) || defined(PLATFORM_APPLE_SSLVPN)
1086
/*
1087
** the FILE_SYNCHRONIZER_SUPPORTED define is used to track the platforms where
1088
** files downloaded directly by VPN API are supported. This is to avoid repeating the
1089
** platforms in #ifdef clauses in other files.
1090
*/
1091
#define FILE_SYNCHRONIZER_SUPPORTED
1092
#endif
1093
1094
#if defined(_WIN32) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_CHROMEBOOK))
1095
/*
1096
** the SAVE_VPNCONFIG_TO_FILE_SUPPORTED define is used to track the platforms where the
1097
** writting of the VPN config to file is supported. This is to avoid repeating the
1098
** platforms in #ifdef clauses in other files.
1099
*/
1100
#define SAVE_VPNCONFIG_TO_FILE_SUPPORTED
1101
#endif
1102
1103
/*
1104
* DSCP preservation is not considered for Downloader. Downloader uses socket transport for IPC.
1105
*/
1106
#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_DARWIN) || defined(_WIN32)) && !defined(_DOWNLOADER) && !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1107
// Used to enable preservation of Differentiated Services field in the IP packet header.
1108
#define DIFFSERV_PRESERVATION_SUPPORTED
1109
#endif
1110
1111
#if !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1112
/*
1113
** the ROUTE_MANAGER_SUPPORTED define is used to track the platforms
1114
** where RouteMgr is supported. This is to avoid repeating the
1115
** platforms in #ifdef clauses in other files.
1116
*/
1117
#define ROUTE_MANAGER_SUPPORTED
1118
#endif
1119
1120
#if !defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_WIN_APP)
1121
/*
1122
** the FILTER_MANAGER_SUPPORTED define is used to track the platforms
1123
** where FilterMgr is supported. This is to avoid repeating the
1124
** platforms in #ifdef clauses in other files.
1125
*/
1126
#define FILTER_MANAGER_SUPPORTED
1127
#endif
1128
1129
#if defined(PLATFORM_APPLE_SSLVPN)
1130
// Used to enable the file logging for Apple plugins.
1131
//#define FILE_LOGGING_SUPPORTED
1132
#endif
1133
1134
/*
1135
** Legacy Single sign on authentication.
1136
** Explicitly disabled on mobile platforms due to session fixation vulnerability, as described in CSCvg65072
1137
** To be removed from desktop platforms in some future AnyConnect release (4.7?)
1138
*/
1139
#if defined(PLATFORM_DESKTOP)
1140
#define SSO_V1_SUPPORTED
1141
#endif
1142
1143
/*
1144
** Single sign on authentication (requires embedded browser).
1145
*/
1146
#if !defined(PLATFORM_WIN_APP)
1147
#define SSO_SUPPORTED
1148
#endif
1149
1150
#if defined (PLATFORM_DESKTOP) || defined(PLATFORM_ANDROID) || (defined(PLATFORM_APPLE_SSLVPN) && defined(SUBPLATFORM_IPHONE))
1151
#define EXTERNAL_SSO_SUPPORTED
1152
#endif
1153
1154
1155
#if !defined(PLATFORM_WIN_APP)
1156
#define MCA_SUPPORTED
1157
#endif
1158
1159
#if !defined(PLATFORM_WIN_APP)
1160
#define TIMERS_SUPPORTED
1161
#endif
1162
1163
#if !defined(PLATFORM_CHROMEBOOK)
1164
#define LOAD_EXTERNAL_MODULES
1165
#endif
1166
1167
#if defined(PLATFORM_ANDROID)
1168
#define SPLIT_DNS_PROXY_SUPPORTED
1169
#endif
1170
1171
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1172
/*
1173
** The MGMT_TUNNEL_SUPPORTED define is used to track the platforms where
1174
** the management tunnel feature is supported.
1175
*/
1176
#define MGMT_TUNNEL_SUPPORTED
1177
#endif
1178
1179
#if (defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && defined(PLATFORM_DESKTOP)
1180
/*
1181
** The SPLIT_DNS_EXCLUDE_SUPPORTED define is used to track the platforms where
1182
** split DNS for split exclude tunneling is supported.
1183
** Note: on Linux, due to lack of KDF support, similar to the split include counterpart, only DNS traffic over
1184
** the tunnel is controlled, i.e. the so-called "DNS fallback for split tunneling" (EDCS-792232).
1185
*/
1186
#define SPLIT_DNS_EXCLUDE_SUPPORTED
1187
#endif // (_WIN32 || PLATFORM_DARWIN || PLATFORM_LINUX) && PLATFORM_DESKTOP
1188
1189
#if (defined(_WIN32) || defined(PLATFORM_DARWIN)) && defined(PLATFORM_DESKTOP)
1190
/*
1191
** The BYPASS_VIRTUAL_SUBNETS_ONLY_SUPPORTED define is used to track the platforms where
1192
** limiting the localLAN split exclude to only virtual subnets is supported.
1193
*/
1194
#define BYPASS_VIRTUAL_SUBNETS_ONLY_SUPPORTED
1195
#endif // (_WIN32 || PLATFORM_DARWIN) && PLATFORM_DESKTOP
1196
1197
#if (defined(_WIN32) && defined(PLATFORM_DESKTOP)) || defined(MGMT_TUNNEL_SUPPORTED)
1198
// Machine certificate authentication SSL tunnel connections via agent are supported
1199
// on Windows desktop, and also on all platforms supporting the management tunnel feature.
1200
//
1201
#define SSL_CONNECT_VIA_AGENT_SUPPORTED
1202
#endif
1203
1204
/*
1205
** Performance optimization for the tunnel packet processing loop to attempt to process
1206
** multiple packets before calling back into select().
1207
*/
1208
#if !defined(_WIN32)
1209
#define MULTI_TUN_PACKET_PROCESSING_SUPPORTED
1210
#endif
1211
1212
#if (defined(_WIN32) && defined(_M_ARM64))
1213
/*
1214
** Disable Hostscan on Windows native ARM64 builds.
1215
*/
1216
#define ANYCONNECT_NO_CSD
1217
#endif
1218
#if defined(_WIN32) && defined(PLATFORM_DESKTOP) && !defined(_M_ARM64) && !defined(X86_FOR_ARM64)
1219
/*
1220
** Connected Standby is supported in Windows desktop but not UWP and not ARM64 (both native ARM64 and the hybrid _WIN32_FOR_ARM64).
1221
*/
1222
#define CONNECTED_STANDBY_SUPPORTED
1223
#endif
1224
1225
#if defined(_WIN32) && defined(PLATFORM_DESKTOP) || defined(PLATFORM_APPLE_SSLVPN)
1226
/*
1227
** This define is used to track platforms where multi-line logs are readable, and hence supported.
1228
*/
1229
#define MULTI_LINE_LOGS_SUPPORTED
1230
#endif
1231
1232
#if defined(PLATFORM_ANDROID)
1233
#define PBR_SUPPORTED
1234
#endif
1235
1236
#if (defined(PBR_SUPPORTED) && defined(PLATFORM_APPLE_SSLVPN) && defined(SUBPLATFORM_IPHONE))
1237
#define USERSPACE_DNS_CACHE_SUPPORTED;
1238
#endif
1239
1240
#if defined (PLATFORM_ANDROID)
1241
#define PCAP_VA_SUPPORTED
1242
#endif
1243
1244
/*
1245
* Platforms that support Unix Domain Socket.
1246
*/
1247
#if defined(PLATFORM_ANDROID)
1248
#define UNIX_DOMAIN_SOCKET_SUPPORTED
1249
#endif
1250
1251
/*
1252
* Platforms that use dynamic port assignment for IPC.
1253
*/
1254
#if defined(PLATFORM_APPLE_SSLVPN)
1255
#define IPC_DYNAMIC_PORT_ASSIGNMENT
1256
#endif
1257
1258
#if !defined(PLATFORM_WIN_APP)
1259
/*
1260
** This define is used to track platforms where the MTU adjustment can be cached
1261
** in a persistent cache (file) and be used across multiple VPN sessions.
1262
*/
1263
#define MTU_ADJUSTMENT_CACHING_SUPPORTED
1264
#endif // !defined(PLATFORM_WIN_APP)
1265
1266
#if defined(PLATFORM_DARWIN)
1267
// On Linux based systems, it is possible for an IPC connection to be blocked or go bad without the
1268
// Agent being made aware, especially on macOS where we set the NOSIGPIPE option. Triggering an
1269
// immediate read on the socket when a failure is suspected will expose any existing socket failure.
1270
// However, this is not appropriate to do on Windows and is currently limited to DARWIN to limit
1271
// testing requirements, so this define is used to enable the functionality. Consideration should
1272
// be given to add PLATFORM_LINUX to the defined condition.
1273
#define IPC_DEPOT_SOCKET_FAILURE_DETECTION
1274
#endif
1275
1276
#if defined(PLATFORM_LINUX) || defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)
1277
/*
1278
** This is to track platforms where OCSP revocation check for server certificate is supported.
1279
*/
1280
#define OCSP_SUPPORTED
1281
#endif
1282
1283
/*
1284
** The PRECONNECT_REMINDER_MSG_SUPPORTED define is used to track the platforms
1285
** support AnyConnect pre-connect reminder message. The message is displayed only
1286
** during the first connection attempt.
1287
**
1288
*/
1289
#if defined(PLATFORM_DESKTOP) && !defined(PLATFORM_DARWIN)
1290
#define PRECONNECT_REMINDER_MSG_SUPPORTED
1291
#endif
1292
1293
// LOCAL_POLICY_DIR_CHANGE_SUPPORTED involves the Agent detecting the local policy file has been
1294
// changed (by SecureX or other external means) and notifying the API with message
1295
// MESSAGE_ID_EVENT_NOTIFICATION.
1296
//
1297
// Note: DYNAMIC_UPDATE_LOCAL_POLICY is a case where the VPN API makes the update to the local
1298
// policy file and informs the Agent of the change. If these two opposite sides of the same
1299
// coin ever need to coexist in the product, further investigation and testing is required to
1300
// determine what additional changes may be necessary.
1301
//
1302
#if defined(PLATFORM_DESKTOP) && !defined(DYNAMIC_UPDATE_LOCAL_POLICY)
1303
//#define LOCAL_POLICY_DIR_CHANGE_SUPPORTED
1304
#endif
1305
1306
#if defined(PLATFORM_ANDROID)
1307
// On Android, it's been observed that with certain CLAT46 networks, the local IPv4 address
1308
// obtained from the native public socket does not match any network interface IP addresses
1309
// enumerated from higher-level Android framework. This native IPv4 address is still valid
1310
// however and corresponds to the pseudo IPv4 address of the CLAT46 interface (e.g. 192.0.0.4).
1311
// This define is a workaround to continue allowing VPN tunnel to function in these cases.
1312
#define ALLOW_INVALID_PUBLIC_INTERFACE_ADDRESS
1313
#endif
1314
1315
/* END OF MACRO HELL */
1316
#endif
/*__GENDEFS_H*/
AnyConnect C++ API Documentation by
Cisco Systems