|
AnyConnect Secure Mobility Client 3.1.11004
|
00001 /************************************************************************** 00002 * Copyright (c) 2000, Cisco Systems, All Rights Reserved 00003 *************************************************************************** 00004 * 00005 * File: GenDefs.h 00006 * Date: 8/23/00 00007 * 00008 *************************************************************************** 00009 * NOTE* This file is for PORTABILITY related defines ONLY. 00010 *************************************************************************** 00011 * defines base types to be used by all CVC client components 00012 ***************************************************************************/ 00013 #ifndef __GENDEFS_H 00014 #define __GENDEFS_H 00015 00016 #ifndef _WIN32 00017 00018 #ifndef USES_CONVERSION 00019 #define USES_CONVERSION 00020 #endif 00021 00022 #define PRELIM_UNIX_PORT 00023 00024 #ifdef HAVE_CONFIG_H 00025 #include "config.h" 00026 #endif 00027 00028 #ifdef HAVE_STDINT_H 00029 #ifndef CNI_LINUX_INTERFACE 00030 #include <stdint.h> 00031 #endif 00032 #elif HAVE_INTTYPES_H 00033 #include <inttypes.h> 00034 #endif 00035 00036 #ifdef HAVE_SYS_TYPES_H 00037 #ifndef CNI_LINUX_INTERFACE 00038 #include <sys/types.h> 00039 #else 00040 #include <linux/types.h> 00041 #undef _UINTPTR_T_DEFINED 00042 #undef _INTPTR_T_DEFINED 00043 #endif 00044 #endif 00045 00046 #undef FAR 00047 #define FAR 00048 #undef PASCAL 00049 #define PASCAL 00050 00051 #else //_WIN32 00052 00053 #undef HAVE_CONFIG_H 00054 #undef HAVE_STDINT_H 00055 #undef HAVE_SYS_TYPES_H 00056 #define WORDS_BIGENDIAN 0 00057 00058 #endif //_WIN32 00059 00060 00061 #undef TRUE 00062 #define TRUE 1 00063 00064 #undef FALSE 00065 #define FALSE 0 00066 00067 #ifdef DDKBUILD //building with the DDK as the source. 00068 #include <crtdefs.h> 00069 #endif 00070 00071 // it'd be nice if we could switch to the C99 standard types at some point... 00072 #if defined(HAVE_STDINT_H) || defined(HAVE_INTTYPES_H) 00073 typedef uint8_t bool8; 00074 typedef uint16_t bool16; 00075 typedef uint32_t bool32; 00076 00077 typedef int8_t int8; 00078 typedef int16_t int16; 00079 00080 #if (!defined(CNI_LINUX_INTERFACE) || !defined(CONFIG_ISDN_PPP) || !defined(CONFIG_ISDN_PPP_VJ) || !defined(_SLHC_H)) && !defined(PROTYPES_H) 00081 typedef int32_t int32; 00082 #endif 00083 00084 typedef uint8_t uint8; 00085 typedef uint16_t uint16; 00086 00087 #if !defined(CSSMAPI) && !defined(PROTYPES_H) 00088 typedef uint32_t uint32; 00089 #endif 00090 00091 typedef uint64_t uint64; 00092 #else 00093 //original windows definitions (32 bit) 00094 typedef unsigned char bool8; 00095 typedef unsigned short bool16; 00096 typedef unsigned long bool32; 00097 typedef unsigned char bool8_t; 00098 typedef unsigned short bool16_t; 00099 typedef unsigned long bool32_t; 00100 00101 typedef signed char int8; 00102 typedef signed short int16; 00103 typedef signed long int32; 00104 typedef signed char int8_t; 00105 typedef signed short int16_t; 00106 #if defined(_WIN32) && !defined (HS_TYPES_H_) 00107 typedef signed long int32_t; 00108 #endif 00109 00110 typedef unsigned char uint8; 00111 typedef unsigned short uint16; 00112 #ifndef CSSMAPI 00113 typedef unsigned long uint32; 00114 #endif 00115 typedef unsigned char uint8_t; 00116 typedef unsigned short uint16_t; 00117 #ifdef _WIN32 00118 typedef unsigned long uint32_t; 00119 #endif 00120 00121 #ifdef _WIN32 00122 typedef __int64 int64; 00123 typedef unsigned __int64 uint64; 00124 typedef __int64 int64_t; 00125 typedef unsigned __int64 uint64_t; 00126 #else 00127 typedef long long int64; 00128 typedef unsigned long long int uint64; 00129 typedef long long int64_t; 00130 typedef unsigned long long int uint64_t; 00131 #endif 00132 #endif 00133 00134 // integer types for doing pointer arithmetic, they should be the 00135 // same size as a pointer. Part of the C99 standard, but they aren't 00136 // available everywhere yet. 00137 // These defs should work with IA32 (x86), ILP32 (sparcv8) and LP64 (sparcv9). 00138 // These types are protected with the WIN32 macros (_INTPTR_T_DEFINED), since 00139 // some, but not all of the WIN32 SDK's define these types. 00140 #ifdef _WIN32 00141 #ifndef _INTPTR_T_DEFINED 00142 #if defined(_LP64) 00143 #warning 64 bit 00144 typedef int64 intptr_t; 00145 #else 00146 typedef int32 intptr_t; 00147 #endif 00148 #define _INTPTR_T_DEFINED 00149 #endif 00150 00151 #ifndef _UINTPTR_T_DEFINED 00152 #if defined(_LP64) 00153 #warning 64 bit 00154 typedef uint64 uintptr_t; 00155 #else 00156 typedef uint32 uintptr_t; 00157 #endif 00158 #define _UINTPTR_T_DEFINED 00159 #endif 00160 #endif 00161 00162 #ifndef __OBJC__ /* Mac OS X defines this in ObjectiveC land... */ 00163 typedef int BOOL; 00164 #endif 00165 00166 #ifndef _WIN32 00167 typedef int BOOLEAN; 00168 #endif 00169 00170 #ifdef _WIN32 00171 typedef int mode_t; 00172 #endif 00173 00174 typedef unsigned char uchar; 00175 #ifndef HAVE_SYS_TYPES_H 00176 typedef unsigned int uint; 00177 typedef unsigned short ushort; 00178 typedef unsigned long ulong; 00179 #endif 00180 00181 #ifndef PLATFORM_ANDROID 00182 typedef ulong ULONG; 00183 typedef ulong* PULONG; 00184 #endif 00185 00186 typedef uint32 DWORD; 00187 typedef uint32* PDWORD; 00188 typedef long LONG; 00189 typedef long* PLONG; 00190 typedef int INT; 00191 typedef int* PINT; 00192 typedef uint UINT; 00193 typedef uint* PUINT; 00194 typedef uint16 USHORT; 00195 typedef uint16* PUSHORT; 00196 typedef int16 SHORT; 00197 typedef int16* PSHORT; 00198 typedef uint16 WORD; 00199 typedef uint16* PWORD; 00200 typedef char CHAR; 00201 typedef uchar UCHAR; 00202 typedef char* PCHAR; 00203 typedef uint8 BYTE; 00204 typedef uint8* PBYTE; 00205 #define VOID void 00206 typedef void* PVOID; 00207 #ifdef _WIN32 00208 typedef void* HANDLE; 00209 #else 00210 typedef int HANDLE; 00211 typedef int SOCKET; 00212 typedef const char* LPCTSTR; 00213 typedef const char* LPCSTR; 00214 typedef const char* PCTSTR; 00215 typedef char* LPTSTR; 00216 typedef void* LPVOID; 00217 typedef char* LPSTR; 00218 typedef long* LPLONG; 00219 typedef DWORD* LPDWORD; 00220 typedef signed int INT32; 00221 00222 00223 typedef struct __WSABUF 00224 { 00225 unsigned long len; 00226 char *buf; 00227 } WSABUF, *LPWSABUF; 00228 00229 typedef struct OVERLAPPED 00230 { 00231 void *data; 00232 int fd; 00233 } OVERLAPPED,*LPOVERLAPPED; 00234 00235 typedef struct sockaddr_in SOCKADDR_IN; 00236 typedef struct sockaddr_in6 SOCKADDR_IN6; 00237 00238 #endif //!_WIN32 00239 00240 typedef HANDLE* PHANDLE; 00241 typedef uint8 KIRQL; 00242 00243 typedef long STATUSCODE; 00244 00245 /* function parameter context */ 00246 #undef IN 00247 #define IN 00248 00249 #undef OUT 00250 #define OUT 00251 00252 #undef INOUT 00253 #define INOUT 00254 00255 #undef packed 00256 #define packed 00257 00258 #ifndef CLEAR 00259 #define CLEAR(a) memset(&a,0,sizeof(a)) 00260 #endif 00261 00262 #ifndef POINT_BEYOND 00263 #define POINT_BEYOND(a,t) (t) &((&a)[1]) 00264 #endif 00265 00266 #ifndef MAX 00267 #define MAX(a,b) ((a) > (b) ? (a) : (b)) 00268 #endif 00269 #ifndef MIN 00270 #define MIN(a,b) ((a) < (b) ? (a) : (b)) 00271 #endif 00272 00273 #ifndef _WIN32 00274 #define _ftime ftime 00275 #define _timeb timeb 00276 #define __cdecl 00277 #define __stdcall 00278 #define __fastcall 00279 #ifndef WINAPI 00280 #define WINAPI 00281 #endif 00282 #ifndef CALLBACK 00283 #define CALLBACK 00284 #endif 00285 #endif 00286 00287 #ifndef _WIN32 00288 #undef INVALID_SOCKET 00289 #define INVALID_SOCKET -1 00290 #undef INVALID_FD 00291 #define INVALID_FD -1 00292 #undef SOCKET_ERROR 00293 #define SOCKET_ERROR -1 00294 #undef SOCKADDR 00295 #define SOCKADDR sockaddr 00296 #undef SOCKADDR_IN 00297 #define SOCKADDR_IN sockaddr_in 00298 #undef SOCKADDR_IN6 00299 #define SOCKADDR_IN6 sockaddr_in6 00300 00301 #if defined(PLATFORM_DARWIN) || defined(PLATFORM_APPLE_SSLVPN) || defined(APPLE_IOS) 00302 #define s6_words __u6_addr.__u6_addr16 00303 #elif defined(PLATFORM_LINUX) 00304 #define s6_words s6_addr16 00305 #endif 00306 00307 #endif 00308 00309 #ifndef _CRT_SECURE_NO_DEPRECATE 00310 #define _CRT_SECURE_NO_DEPRECATE 00311 #endif 00312 00313 00314 #if !defined(_WIN32) && !defined(_WIN32_WCE) 00315 00316 #ifndef ZeroMemory 00317 #define ZEROMEM(ptr,cnt) \ 00318 if ( NULL != ptr ) { memset(ptr,0,cnt); } 00319 #define ZeroMemory ZEROMEM 00320 #endif /* ZeroMemory */ 00321 00322 #ifndef SecureZeroMemory 00323 #define SECUREZEROMEM(ptr, cnt) \ 00324 do { \ 00325 size_t size = (size_t)cnt; \ 00326 volatile char *vptr = (volatile char *)ptr; \ 00327 while (size) { \ 00328 *vptr = 0; \ 00329 vptr++; \ 00330 size--; \ 00331 } \ 00332 } while(0); 00333 #define SecureZeroMemory SECUREZEROMEM 00334 #endif /* SecureZeroMemory */ 00335 #endif /* Windows */ 00336 00337 00338 00339 #ifndef _WIN32 00340 #define _strnicmp strncasecmp 00341 #define _stricmp strcasecmp 00342 #endif 00343 00344 #ifndef ARRAY_SIZE 00345 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) 00346 #endif 00347 00348 #if !defined(TO_STR) && !defined(TO_TSTR) && !defined(SYMBOL_TO_STR) && !defined(SYMBOL_TO_TSTR) 00349 00350 // use TO_STR(x)/TO_TSTR(x) to stringize (put double quotes around) x 00351 // example: 00352 // std::string foo = TO_STR(15); 00353 // tstring bar = TO_TSTR(15); 00354 // becomes 00355 // std::string foo = "15"; 00356 // tstring bar = _T("15"); 00357 #define TO_STR(x) #x 00358 #define TO_TSTR(x) _T(#x) 00359 00360 // use SYMBOL_TO_STR(x)/SYMBOL_TO_TSTR(x) to stringize 00361 // the definition of symbol x 00362 // example: 00363 // #define MAX_LEN 15 00364 // std::string foo = SYMBOL_TO_STR(MAX_LEN); 00365 // tstring bar = SYMBOL_TO_TSTR(MAX_LEN); 00366 // becomes 00367 // std::string foo = "15"; 00368 // tstring bar = _T("15"); 00369 // 00370 // Note that TO_STR(MAX_LEN) results in "MAX_LEN". The double macro is required in 00371 // order to strinigize the *definition* of a symbol (as opposed to the symbol itself) 00372 #define SYMBOL_TO_STR(x) TO_STR(x) 00373 #define SYMBOL_TO_TSTR(x) TO_TSTR(x) 00374 00375 #endif 00376 00377 #ifdef _WIN32 00378 #define systemtime_t __time64_t 00379 #define getSystemTimeInSeconds() _time64(NULL) 00380 #else 00381 #define systemtime_t time_t 00382 #define getSystemTimeInSeconds() time(NULL) 00383 #endif 00384 00385 #ifndef _WIN32 00386 #ifndef INFINITE 00387 #define INFINITE 0xFFFFFFFF 00388 #endif 00389 #endif 00390 00391 #define ANY_PATHNAME_DELIMITER "/\\" 00392 #ifdef _WIN32 00393 #define PATHNAME_DELIMITER '\\' 00394 #define PATHNAME_DELIMITER_STR "\\" 00395 #else 00396 #define PATHNAME_DELIMITER '/' 00397 #define PATHNAME_DELIMITER_STR "/" 00398 #endif 00399 #define URL_URI_DELIMITER '/' 00400 #define URL_URI_DELIMITER_STR "/" 00401 00402 #ifdef _WIN32 00403 #define NEWLINE "\r\n" 00404 #else 00405 #define NEWLINE "\n" 00406 #endif 00407 00408 #if defined(_WIN32) 00409 #define HOSTSFILE_LOCATION _T("drivers\\etc\\hosts") 00410 #else 00411 #define HOSTSFILE_LOCATION _T("/etc/hosts") 00412 #endif 00413 00414 #ifdef _WIN32 00415 #define DebugWriteFile(_handle_,_buffer_,_length_,_refCharsWritten_) \ 00416 WriteFile((_handle_),(_buffer_),(_length_),(_refCharsWritten_),NULL) 00417 #else 00418 #ifndef INVALID_HANDLE_VALUE 00419 #define INVALID_HANDLE_VALUE NULL 00420 #endif 00421 #define DebugWriteFile(_handle_,_buffer_,_length_,_refCharsWritten_) \ 00422 fprintf((_handle_), "%s", (_buffer_)); \ 00423 fflush((_handle_)) 00424 #endif 00425 00426 typedef uint8_t MAC_ADDR[6]; 00427 00428 #if !defined(_WIN32) || defined(_WIN32_WCE) 00429 #ifndef ADDRESS_FAMILY 00430 typedef unsigned short ADDRESS_FAMILY; 00431 #endif 00432 #endif 00433 00434 #if ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA) 00435 /* 00436 ** the FIREWALL_SUPPORTED define is used to track the platforms 00437 ** where the firewall feature is supported. This is to avoid repeating the 00438 ** platforms in #ifdef clauses in other files. 00439 ** Also, when Firewall feature expands to other platforms, they only need to be added in 00440 ** one place. 00441 */ 00442 #define FIREWALL_SUPPORTED 00443 #endif 00444 00445 #if !defined(PRODUCT_TYPE_SSA) && ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN)) 00446 /* 00447 ** the TRUSTED_NETWORK_DETECTION define is used to track the platforms 00448 ** where Trusted Network Detection is performed. This is to avoid repeating the 00449 ** platforms in #ifdef clauses in other files. 00450 ** Also, when TND support expands to other platforms, they only need to be added in 00451 ** one place. 00452 */ 00453 #define TRUSTED_NETWORK_DETECTION 00454 #endif 00455 00456 #if ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(TRUSTED_NETWORK_DETECTION)) && !defined(PRODUCT_TYPE_SSA) 00457 /* 00458 ** the LOGIN_UTILITIES_SUPPORTED define is used to track the platforms 00459 ** that support AnyConnect action triggered by user login. This is to avoid 00460 ** repeating the platforms in #ifdef clauses in other files. 00461 ** Also, when login support expands to other platforms, they only need to be added in 00462 ** one place. 00463 */ 00464 #define LOGIN_UTILITIES_SUPPORTED 00465 #endif 00466 00467 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PRODUCT_TYPE_SSA) 00468 /* 00469 ** The DNS_PLUGIN_SUPPORTED define is used to track the platforms where the DNS KDF plugin is 00470 ** available. This is to avoid repeating the platforms in #ifdef clauses in other files. 00471 ** Also, when support expands to other platforms, they only need to be added in one place. 00472 */ 00473 #define DNS_PLUGIN_SUPPORTED 00474 #endif 00475 00476 #if !(defined(PLATFORM_APPLE_SSLVPN) && TARGET_CPU_ARMV6) 00477 /* 00478 ** A bug was discovered in iPhone testing wherein virtual inline functions do 00479 ** not work correctly on ARMv6 processors. To work around this, virtual inline 00480 ** function need to be made standard virtual functions on ARMv6. To prevent 00481 ** differences in runtime behavior, the VIRTUAL_INLINES_SUPPORTED define is used 00482 ** to define some virtual inlines in the header files, letting the functions be 00483 ** defined without the inline type in the cpp file for non-supported platforms. 00484 */ 00485 #define VIRTUAL_INLINES_SUPPORTED 00486 #endif 00487 00488 /* 00489 * When changing the SCRIPTING_SUPPORTED definition, you MUST also update the 00490 * ClientIfcBase.h! We duplicate this definition there due to the manner in 00491 * which we distribute our code to partners; we cannot include this header from 00492 * ClientIfcBase.h. 00493 */ 00494 #if !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_ANDROID) 00495 /* 00496 ** the SCRIPTING_SUPPORTED define is used to enable the script manager for launching 00497 ** customer provided scripts on events like connection establishment, completion of 00498 ** disconnect, and captive portal detection. 00499 */ 00500 #define SCRIPTING_SUPPORTED 00501 #endif 00502 00503 #if !defined(PRODUCT_TYPE_SSA) && ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN)) 00504 /* 00505 ** the NETWORK_ENVIRONMENT_STATE define is used to track the platforms 00506 ** where NETWORK_ENVIRONMENT_STATE check is performed. This is to avoid repeating the 00507 ** platforms in #ifdef clauses in other files. 00508 ** Also, when NES support expands to other platforms, they only need to be added in 00509 ** one place. 00510 */ 00511 #define NETWORK_ENVIRONMENT_STATE 00512 #endif 00513 00514 00515 #if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) 00516 /* 00517 ** The AUTOMATIC_HEADEND_SELECTION define is used to track the platforms 00518 ** where Automatic Headend Selection is performed. This is to avoid repeating the 00519 ** platforms in #ifdef clauses in other files. 00520 ** Also, when AHS support expands to other platforms, they only need to be added in 00521 ** one place. 00522 */ 00523 #define AUTOMATIC_HEADEND_SELECTION 00524 #endif 00525 00526 #if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) 00527 /* 00528 ** the MUS_HOST_SERVICES define is used to track the platforms 00529 ** where MUS Host Status check is performed. This is to avoid repeating the 00530 ** platforms in #ifdef clauses in other files. 00531 */ 00532 #define MUS_HOST_SERVICES 00533 #endif 00534 00535 // BUGBUG - initially only enable code signing for Windows 00536 #if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_LINUX_EMBEDDED_PPC) && !defined(PLATFORM_LINUX_EMBEDDED_ARM)) 00537 /* 00538 ** the CODE_SIGNING_SUPPORTED define is used to track the platforms 00539 ** where code sign verification is support. This is to avoid repeating the 00540 ** platforms in #ifdef clauses in other files. 00541 ** 00542 */ 00543 #define CODE_SIGNING_SUPPORTED 00544 #endif 00545 00546 #if defined(_WIN32) && !defined(_WIN32_WCE) 00547 #define RSA_SECURID_SUPPORTED 00548 #endif 00549 00550 #if defined(_WIN32) && !defined(_WIN32_WCE) 00551 #define SAFEWORD_SOFTOKEN_SUPPORTED 00552 #endif 00553 00554 #if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || ( defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) ) 00555 /* 00556 ** the IPSEC_SUPPORTED define is used to track the platforms 00557 ** where the IPSec protocol is supported. This is to avoid repeating the 00558 ** platforms in #ifdef clauses in other files. 00559 */ 00560 #define IPSEC_SUPPORTED 00561 #endif 00562 00563 #if ((defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN)) && !defined(ANYCONNECT_USE_SNAK) 00564 /* 00565 ** The IPV6_SUPPORTED define is used to track the platforms 00566 ** where full IPv6 capability is supported. This is to avoid repeating the 00567 ** platforms in #ifdef clauses in other files. 00568 ** Note that this is further narrowed down by method CIPv6Util::IsIPv6FullCapabilitySupported. 00569 */ 00570 #define IPV6_SUPPORTED 00571 #endif 00572 00573 #if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || ( defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) ) 00574 /* 00575 ** the PLUGIN_PROTOCOL_SUPPORTED define is used to track the platforms 00576 ** where modular protocol Plugins are supported. This is to avoid repeating the 00577 ** platforms in #ifdef clauses in other files. 00578 */ 00579 #define PLUGIN_PROTOCOL_SUPPORTED 00580 #endif 00581 00582 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(PRODUCT_TYPE_SSA) 00583 /* 00584 ** The IPSEC_OVER_SSL define is used to track the platforms 00585 ** where the feature "IPsec tunneling over SSL for Oracle" (EDCS-852737) is supported. 00586 ** This is to avoid repeating the platforms in #ifdef clauses in other files. 00587 ** Also, when the support expands to other platforms, they only need to be added in 00588 ** one place. 00589 */ 00590 #define IPSEC_OVER_SSL 00591 #endif 00592 00593 #if (defined(_WIN32) && !defined(_WIN32_WCE)) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) || defined(APPLE_IOS) 00594 /* 00595 ** the DATA_OBFUSCATING_SUPPORTED define is used to track the platforms 00596 ** where data obfuscation using key exchanges are supported. This is to 00597 ** avoid repeating the platforms in #ifdef clauses in other files. 00598 */ 00599 #define DATA_OBFUSCATING_SUPPORTED 00600 #endif 00601 00602 00603 #if !defined(PLATFORM_APPLE_SSLVPN) && !defined(_WIN32_WCE) && !defined(PRODUCT_TYPE_SSA) 00604 /* 00605 ** the HOSTFILE_MODIFICATION_SUPPORTED define is used to track the platforms 00606 ** where hosts file modification is performed. This is to avoid repeating the 00607 ** platforms in #ifdef clauses in other files. 00608 */ 00609 #define HOSTSFILE_MODIFICATION_SUPPORTED 00610 #endif 00611 00612 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX) 00613 /* 00614 ** the SCEP_CERTIFICATE_ENROLLMENT_SUPPORTED define is used to track the platforms 00615 ** where SCEP enrollment can be performed. This is to avoid repeating the 00616 ** platforms in #ifdef clauses in other files. 00617 */ 00618 #define SCEP_CERTIFICATE_ENROLLMENT_SUPPORTED 00619 #endif 00620 #if !defined(_WIN32_WCE) && !defined(PLATFORM_ANDROID) && !defined(APPLE_IOS) 00621 /* 00622 ** The SUITEB_SUPPORTED define is used to track the platforms where SuiteB 00623 ** algorithms and certififcates are supported. This is to avoid repeating the 00624 ** platforms in #ifdef clauses in other files. 00625 */ 00626 #define SUITEB_SUPPORTED 00627 #endif 00628 00629 #if (defined(_WIN32) && !defined(_WIN32_WCE)) 00630 /* 00631 ** these XXX_PROFILE_SUPPORTED defines are used to track the platforms where 00632 ** Service Profiles for optional modules are supported. 00633 ** All platforms: VPN 00634 ** Windows: NAM, Telemetry and Web Security 00635 */ 00636 #define NAM_PROFILE_SUPPORTED 00637 #define TELEMETRY_PROFILE_SUPPORTED 00638 #define WEBSEC_PROFILE_SUPPORTED 00639 #elif defined(PLATFORM_DARWIN) 00640 /* 00641 ** OS X: Web Security 00642 */ 00643 #define WEBSEC_PROFILE_SUPPORTED 00644 #endif 00645 00646 #if defined(_WIN32) || defined(PLATFORM_DARWIN) || (defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID)) 00647 /* 00648 ** The exportStats call is only supported on the Desktop Platforms, 00649 ** it should not be included or supported if it is not a Desktop Plat 00650 */ 00651 #define EXPORT_STATS_SUPPORTED 00652 #endif 00653 00654 #if (defined(_WIN32) || defined(PLATFORM_DARWIN) || defined(PLATFORM_LINUX)) && !defined(PLATFORM_ANDRIOD) && !defined(PLATFORM_APPLE_SSLVPN) 00655 #define AC_CERTIFICATE_POLICY_SUPPORTED 00656 #endif 00657 00658 #ifndef _TRSTRING 00659 #define _tr(String) String 00660 #define _TRSTRING 00661 #endif 00662 00663 #ifndef _C_MYASSERT 00664 #define C_MYASSERT(e) typedef char __C_MYASSERT__[(e)?1:-1] 00665 #define _C_MYASSERT 00666 #endif 00667 00668 #if defined(PLATFORM_APPLE_SSLVPN) || defined(APPLE_IOS) 00669 #define NETWORK_ORDER_LOOPBACK_INTF_ADDR htonl(0x7f000001) // 127.0.0.1 00670 #endif 00671 00672 #if !defined(BITS_PER_BYTE) 00673 #define BITS_PER_BYTE 8 00674 #endif 00675 00676 #if !defined(_WIN32_WCE) && !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_LINUX_EMBEDDED_PPC) && !defined(PLATFORM_WEBOS_ARM) && !defined(PLATFORM_WEBOS_X86) && !defined(PLATFORM_ANDROID) && !defined(APPLE_IOS) 00677 #define FIPS_SUPPORTED 00678 #endif 00679 00680 #if !defined(_WIN32_WCE) && !defined(PLATFORM_APPLE_SSLVPN) && !defined(PLATFORM_LINUX_EMBEDDED_PPC) && !defined(PLATFORM_WEBOS_ARM) && !defined(PLATFORM_WEBOS_X86) && !defined(PLATFORM_ANDROID) && !defined(APPLE_IOS) && !defined(PRODUCT_TYPE_SSA) 00681 #define LEAF_SUPPORTED 00682 #endif 00683 00684 #if !defined(PRODUCT_TYPE_SSA) && ( defined(_WIN32) || ( defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) ) || defined(PLATFORM_DARWIN) ) 00685 #define ENFORCE_MULTIPLE_LOGON 00686 #endif 00687 00688 #if !defined(PLATFORM_ANDROID) // More platforms need to be added 00689 #define WIDE_CHAR_SUPPORTED 00690 #endif 00691 00692 #if defined(_WIN32) && !defined(PRODUCT_TYPE_SSA) 00693 #define TUNNEL_PROXY_SETTINGS_SUPPORTED 00694 #endif 00695 00696 /* 00697 ** Public Proxy support is only implemented on Windows and Linux desktop platforms 00698 */ 00699 #if (defined(_WIN32) || defined(PLATFORM_LINUX)) && !defined(PRODUCT_TYPE_SSA) 00700 #define PUBLIC_PROXY_SUPPORTED 00701 #endif 00702 00703 /* 00704 ** NTLM support is only implemented on Windows desktop platforms 00705 */ 00706 #if defined(_WIN32) && defined(PUBLIC_PROXY_SUPPORTED) 00707 #define PROXYAUTH_NTLM_SUPPORTED 00708 #endif 00709 00710 #if defined(PLATFORM_ANDROID) || (defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS)) 00711 #define IMPORT_API_SUPPORTED 00712 #endif 00713 00714 #if defined(PRODUCT_TYPE_SSA) && !defined(PLATFORM_ANDROID) 00715 /* 00716 ** This serves to tell the IPsec plugin interface to explicitly 00717 ** exclude it's global namespace entry points, leaving the only 00718 ** plugin interface as a set of static class methods, which the 00719 ** loading code will look for directly. 00720 */ 00721 #define IPSEC_AS_INTERNAL_MODULE 00722 #endif 00723 00724 #if defined(PLATFORM_ANDROID) // More platforms need to be added 00725 #define dynamic_cast reinterpret_cast 00726 #endif 00727 00728 #if defined(PRODUCT_TYPE_SSA) && defined(APPLE_IOS) && !defined(PLATFORM_APPLE_SSLVPN) 00729 #define CONFIGURE_REMOTE_WAKEUP_SUPPORTED 00730 #endif 00731 00732 /* 00733 ** The SMARTCARD_REMOVAL_SUPPORTED define is used to track the platforms where smartcard 00734 ** removal monitoring is supported. This is to avoid repeating the 00735 ** platforms in #ifdef clauses in other files. 00736 */ 00737 #if defined(_WIN32) 00738 #define SMARTCARD_REMOVAL_SUPPORTED 00739 #endif 00740 00741 #if defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK) && !defined(PRODUCT_TYPE_SSA) 00742 /* 00743 ** The CIRCUMVENT_HOST_FILTERING_SUPPORTED define is used to track the platforms 00744 ** where AnyConnect can control whether or not pre-existing host filtering is 00745 ** circumvented upon applying AnyConnect filtering (only applicable to split-tunneling). 00746 */ 00747 #define CIRCUMVENT_HOST_FILTERING_SUPPORTED 00748 #endif 00749 00750 #if defined(PLUGIN_PROTOCOL_SUPPORTED) && !defined(PRODUCT_TYPE_SSA) 00751 #if (defined(_WIN32) && !defined(_WIN32_WCE)) 00752 // support Service Control Plugins if defined 00753 #define SERVICE_PLUGIN 00754 // support Telemetry Plugin if defined 00755 #define TELEMETRY_PLUGIN 00756 // support PhoneHome Plugin if defined 00757 #define PHONEHOME_PLUGIN 00758 #elif defined(PLATFORM_DARWIN) 00759 // support Service Control Plugins if defined 00760 #define SERVICE_PLUGIN 00761 // support PhoneHome Plugin if defined 00762 #define PHONEHOME_PLUGIN 00763 #elif defined(PLATFORM_LINUX) 00764 #define PHONEHOME_PLUGIN 00765 #endif 00766 00767 #endif 00768 /* 00769 * Platforms that support ACIDEX. 00770 */ 00771 #if defined(_WIN32) || defined(PLATFORM_DARWIN)|| defined(PLATFORM_LINUX) 00772 #define ACIDEX_SUPPORTED 00773 #endif 00774 00775 /* 00776 * TLS 1.2 is not supported in 3.x versions of AnyConnect. Support shall begin in the 4.0 release. 00777 */ 00778 #if defined(ANYCONNECT_RELEASE_4_OR_HIGHER) 00779 #define TLS_1_2_SUPPORTED 00780 #endif 00781 00782 /* END OF MACRO HELL */ 00783 #endif /*__GENDEFS_H*/