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