AnyConnect Secure Mobility Client  5.1.14.145
ClientIfcCommon.h
1 /**************************************************************************
2 * Copyright (c) 2022-2023, 2025 Cisco Systems, Inc.
3 * All Rights Reserved. Cisco Highly Confidential.
4 ***************************************************************************
5 *
6 * File: ClientIfcCommon.h
7 * Author: Chris Fitzgerald
8 * Date: 03/2022
9 *
10 ***************************************************************************
11 * Client Interface Common defines for the Client API.
12 ***************************************************************************/
13 #ifndef _CLIENTIFCCOMMON_
14 #define _CLIENTIFCCOMMON_
15 
16 /*
17 * Platforms capable of supporting SNAK.
18 */
19 #if defined(PLATFORM_WIN_APP)
20  #define ANYCONNECT_USE_SNAK
21 #endif
22 
23 /*
24 * Aggregate the compiler directives that together identify desktop platforms into a single define.
25 */
26 #if (defined(_WIN32) || defined(PLATFORM_DARWIN) \
27  || (defined(PLATFORM_LINUX) && !defined(ANYCONNECT_USE_SNAK) && !defined (PLATFORM_ANDROID))) \
28  && !defined(PLATFORM_WIN_APP)
29  #undef PLATFORM_DESKTOP
30  #define PLATFORM_DESKTOP
31 #endif
32 
33 /*
34 * Platforms capable of supporting our standard interprocess communication mechanisms. At present,
35 * all platforms on which the client is deployed support our standard IPC mechanisms.
36 */
37 #define INTERPROCESS_COMMUNICATION_SUPPORTED
38 
39 /*
40 * Platforms capable of supporting host data objects.
41 */
42 #if defined(PLATFORM_ANDROID) || defined(PLATFORM_APPLE_SSLVPN)
43  #define HOST_DATA_SUPPORTED
44 #endif
45 
46 /*
47 * Platforms capable of supporting manual import of PKCS12 certificates.
48 */
49 #if defined(PLATFORM_APPLE_SSLVPN) || defined(PLATFORM_ANDROID) || defined(PLATFORM_WIN_APP)
50  #define MANUAL_PKCS12_IMPORT_SUPPORTED
51 #endif
52 
53 /*
54 * Platforms capable of supporting importing of program data (e.g. localization and profile).
55 */
56 #if defined(PLATFORM_ANDROID)
57  #define PROGRAM_DATA_IMPORT_SUPPORTED
58 #endif
59 
60 /*
61 * Platforms capable of supporting prefilled connection credentials via URI handling or API calls.
62 */
63 #if defined(PLATFORM_ANDROID)
64  #define CREDENTIAL_PREFILL_SUPPORTED
65 #endif
66 
67 /*
68 * Platforms capable of supporting dynamic update of the local policy.
69 */
70 #if defined(PLATFORM_ANDROID)
71  #define DYNAMIC_UPDATE_LOCAL_POLICY
72 #endif // PLATFORM_ANDROID
73 
74 #if defined(MANUAL_PKCS12_IMPORT_SUPPORTED)
75  #if defined(HAVE_STDINT_H)
76  #include <stdint.h>
77  #else
78  typedef unsigned char uint8_t;
79  #endif
80 #endif // MANUAL_PKCS12_IMPORT_SUPPORTED
81 
82 #if defined(PLATFORM_WIN_APP)
83  typedef unsigned char uint8_t;
84 #endif
85 
86 /*
87 * Platforms capable of supporting local policy directory changes.
88 */
89 #if defined(PLATFORM_DESKTOP) && !defined(DYNAMIC_UPDATE_LOCAL_POLICY)
90  #define LOCAL_POLICY_DIR_CHANGE_SUPPORTED
91 #endif
92 
93 /*
94 * Platforms capable of supporting profile file directory changes.
95 */
96 #if defined(PLATFORM_DESKTOP)
97  #define PROFILE_FILES_DIR_CHANGE_SUPPORTED
98 #endif
99 
100 /*
101 * Platforms capable of supporting event notifications to the VPN API.
102 */
103 #if defined(LOCAL_POLICY_DIR_CHANGE_SUPPORTED) || defined(PROFILE_FILES_DIR_CHANGE_SUPPORTED)
104  #define VPNAPI_EVENT_NOTIFICATION_SUPPORTED
105 #endif
106 
107 /*
108 * Platforms capable of supporting the VPN API transmigration functionality.
109 */
110 #if (defined(LOCAL_POLICY_DIR_CHANGE_SUPPORTED) || defined(PROFILE_FILES_DIR_CHANGE_SUPPORTED)) && \
111  defined(VPNAPI_EVENT_NOTIFICATION_SUPPORTED)
112  #define VPNAPI_TRANSMIGRATION_SUPPORTED
113 #endif
114 
115 /*
116 * Platforms capable of supporting the user notifications of an updated local policy file or
117 * updated client profiles.
118 */
119 #if defined(LOCAL_POLICY_DIR_CHANGE_SUPPORTED) || defined(PROFILE_FILES_DIR_CHANGE_SUPPORTED)
120 // #define VPNAPI_NOTIFY_USER_OF_POLICY_OR_PROFILE_CHANGE_SUPPORTED
121 #endif
122 
123 #endif // _CLIENTIFCCOMMON_