AnyConnect Secure Mobility Client  3.1.07021
include/GlobalEnums.h
00001 /*******************************************************************************
00002 *                   COPYRIGHT 2007 - Cisco Systems 
00003 *                   All Rights Reserved
00004 ********************************************************************************
00005 **
00006 **  GlobalEnums.h
00007 **  
00008 **  Contains enumerations used in the API and TLV classes.
00009 **
00010 *********************************************************************************/
00011 
00012 #ifndef __GLOBALENUMS_H
00013 #define __GLOBALENUMS_H
00014 
00015 /*****    PUT ONLY ENUMS IN THIS FILE AS IT IS ALSO USED BY THE MIDL COMPILER  *****\
00016 \******************** This is also compiled with IDL compiler **********************/
00017 
00018 enum ConnectProtocolType
00019 {
00020     PROTOCOL_TYPE_UNKNOWN = 0,
00021     PROTOCOL_TYPE_SSL,
00022     PROTOCOL_TYPE_IPSEC,
00023 };
00024 
00025 enum ProtocolVersion 
00026 {
00027     PROTO_VERSION_UNKNOWN           = 0,
00028     PROTO_VERSION_TLS10             = 1,
00029     PROTO_VERSION_SSL30             = 2,
00030     PROTO_VERSION_DTLS10            = 3,
00031     PROTO_VERSION_IPSEC             = 4,
00032     PROTO_VERSION_IPSEC_NAT_T       = 5
00033 };
00034 
00035 enum ProtocolCipher
00036 {
00037     PROTO_CIPHER_UNKNOWN            =  0,
00038     PROTO_CIPHER_RSA_RC4_128_MD5    =  1,
00039     PROTO_CIPHER_RSA_RC4_128_SHA1   =  2,
00040     PROTO_CIPHER_RSA_DES_56_SHA1    =  3,
00041     PROTO_CIPHER_RSA_3DES_168_SHA1  =  4,
00042     PROTO_CIPHER_RSA_AES_128_SHA1   =  5,
00043     PROTO_CIPHER_RSA_AES_256_SHA1   =  6,
00044     PROTO_CIPHER_ENC_NULL_MD5       =  7,
00045     PROTO_CIPHER_ENC_NULL_SHA1      =  8,
00046     PROTO_CIPHER_RC4_128            =  9,
00047     PROTO_CIPHER_RC4_128_MD5        = 10,
00048     PROTO_CIPHER_RC4_128_SHA1       = 11,
00049     PROTO_CIPHER_DES_56             = 12,
00050     PROTO_CIPHER_DES_56_MD5         = 13,
00051     PROTO_CIPHER_DES_56_SHA1        = 14,
00052     PROTO_CIPHER_DES_56_SHA256      = 15,
00053     PROTO_CIPHER_DES_56_SHA384      = 16,
00054     PROTO_CIPHER_DES_56_SHA512      = 17,
00055     PROTO_CIPHER_3DES_168           = 18,
00056     PROTO_CIPHER_3DES_168_MD5       = 19,
00057     PROTO_CIPHER_3DES_168_SHA1      = 20,
00058     PROTO_CIPHER_3DES_168_SHA256    = 21,
00059     PROTO_CIPHER_3DES_168_SHA384    = 22,
00060     PROTO_CIPHER_3DES_168_SHA512    = 23,
00061     PROTO_CIPHER_AES_128            = 24,
00062     PROTO_CIPHER_AES_128_MD5        = 25,
00063     PROTO_CIPHER_AES_128_SHA1       = 26,
00064     PROTO_CIPHER_AES_128_SHA256     = 27,
00065     PROTO_CIPHER_AES_128_SHA384     = 28,
00066     PROTO_CIPHER_AES_128_SHA512     = 29,
00067     PROTO_CIPHER_AES_192            = 30,
00068     PROTO_CIPHER_AES_192_MD5        = 31,
00069     PROTO_CIPHER_AES_192_SHA1       = 32,
00070     PROTO_CIPHER_AES_192_SHA256     = 33,
00071     PROTO_CIPHER_AES_192_SHA384     = 34,
00072     PROTO_CIPHER_AES_192_SHA512     = 35,
00073     PROTO_CIPHER_AES_256            = 36,
00074     PROTO_CIPHER_AES_256_MD5        = 37,
00075     PROTO_CIPHER_AES_256_SHA1       = 38,
00076     PROTO_CIPHER_AES_256_SHA256     = 39,
00077     PROTO_CIPHER_AES_256_SHA384     = 40,
00078     PROTO_CIPHER_AES_256_SHA512     = 41,
00079     PROTO_CIPHER_AES_128_GCM        = 42,
00080     PROTO_CIPHER_AES_192_GCM        = 43,
00081     PROTO_CIPHER_AES_256_GCM        = 44,
00082     PROTO_CIPHER_RSA_AES_128_SHA256 = 45,   // TLS 1.2
00083     PROTO_CIPHER_RSA_AES_256_SHA256 = 46,
00084     PROTO_CIPHER_DHE_RSA_AES_128_SHA256 = 47,
00085     PROTO_CIPHER_DHE_RSA_AES_256_SHA256 = 48
00086 };
00087 
00088 typedef enum
00089 {
00090     COMPR_NONE = 0,
00091     COMPR_DEFLATE = 1,
00092     COMPR_LZS = 2
00093 } COMPR_ALGORITHM;   
00094 
00095 /*
00096 ** Tunnel states
00097 **  New states must be added to the end of the list.
00098 **  Downloader tests states, so altering existing states requires verification
00099 **  that there won't be backward compability issues with downloader.
00100 */
00101 //BUGBUG  Suggested by Marc: Rename the STATE enum and its values.
00102 //BUGBUG  We should probably change the enum name from STATE to VPNCON_STATE and
00103 //BUGBUG  the prefixes on the values from STATE_ to VCS_ (for VPN connection state).
00104 //BUGBUG  The API and GUI code have to deal with a number of different states, and the 
00105 //BUGBUG  generically named STATE is not very self documenting.
00106 //BUGBUG  It's a throw back from the very earliest code for SSL VPN.
00107 typedef enum
00108 {
00109     STATE_CONNECTING,
00110     STATE_CONNECTED,
00111     STATE_RECONNECTING,
00112     STATE_DISCONNECTING,
00113     STATE_DISCONNECTED,
00114     STATE_PAUSING,
00115     STATE_PAUSED,
00116     STATE_AUTHENTICATING,
00117     STATE_UNDEFINED,
00118 } STATE;
00119 
00120 /*
00121 ** Tunnel sub-states
00122 **  New sub-states must be added to the end of the list.
00123 **  Sub-states are meant to provide additional details, if necessary, about 
00124 **  any of the VPN connection states.
00125 */
00126 typedef enum
00127 {
00128     VCSS_NORMAL,
00129     VCSS_INDEFINITE_DELAY
00130 } VPNCON_SUBSTATE;
00131 
00132 typedef enum
00133 {
00134     NCS_RESTRICTED = 0, //a client configuration has been applied to the endpoints 
00135                         //operating system configuration
00136     NCS_PARTIAL_RESTRICTED_CAPTIVE_PORTAL, //a client configuration has been applied to the 
00137                                            //endpoints operating system configuration to allow
00138                                            //captive portal remediation
00139     NCS_UNRESTRICTED    //the endpoints operating system configuration is not currently altered by the client
00140 } NETCTRL_STATE;
00141 
00142 
00143 // Note that while these values are defined like a bitmap, the network environment state
00144 // is not used as a bitmap. No two values are ever combined.  They are used like linear
00145 // values. The bitmap arrangement of values is to enable testing for many possible values
00146 // all at once in a single compare without having to do a series of compares against
00147 // different linear values.
00148 //
00149 typedef enum
00150 {
00151     NES_NO_NETWORK_INTERFACE        = (1 << 0),
00152     NES_NO_PUBLIC_INTERFACE         = (1 << 1),
00153     NES_NO_DNS_CONNECTIVITY         = (1 << 2),
00154     NES_CAPTIVE_PORTAL_DETECTED     = (1 << 3),
00155     NES_AUTH_PROXY_DETECTED         = (1 << 4),
00156     NES_NETWORK_ACCESSIBLE          = (1 << 5),
00157     NES_SECURE_GATEWAY_ACCESSIBLE   = (1 << 6)
00158 } NETENV_STATE;
00159 
00160 
00161 // Trusted Network Detection types.
00162 typedef enum
00163 {
00164     NT_TRUSTED,
00165     NT_UNTRUSTED,
00166     NT_UNDEFINED
00167 } NETWORK_TYPE;
00168 
00169 // Firewall enums
00170 typedef enum
00171 {   FW_PERMISSION_UNKNOWN,
00172     FW_PERMISSION_PERMIT,
00173     FW_PERMISSION_DENY
00174 } FW_Permission;
00175 
00176 typedef enum
00177 {   FW_PROTOCOL_UNKNOWN,
00178     FW_PROTOCOL_TCP,
00179     FW_PROTOCOL_UDP,
00180     FW_PROTOCOL_ICMP,
00181     FW_PROTOCOL_ANY
00182 } FW_Protocol;
00183 
00184 typedef enum
00185 {
00186     FW_INTERFACE_UNKNOWN,
00187     FW_INTERFACE_PUBLIC,
00188     FW_INTERFACE_PRIVATE
00189 } FW_Interface;
00190 
00191 typedef enum
00192 {
00193     FW_RULE_DIRECTION_IN,
00194     FW_RULE_DIRECTION_OUT,
00195     FW_RULE_DIRECTION_BOTH
00196 } FW_Rule_Direction;
00197 
00198 typedef enum
00199 {
00200     MUS_STATUS_UNKNOWN = 0,
00201     MUS_STATUS_ENABLED,
00202     MUS_STATUS_DISABLED,
00203     MUS_STATUS_UNCONFIRMED
00204 } MUS_STATUS;
00205 
00206 // These can be used to get/set an automatic preference value using the
00207 // generic UserPreferences.getAutomaticPreferenceValue() and
00208 // setAutomaticPreferenceValue() methods, rather than using the individual
00209 // getters/setters.
00210 typedef enum 
00211 {   
00212     HeadendSelectionCacheId = 0,
00213     DefaultUserId,
00214     DefaultSecondUserId,
00215     DefaultHostId,
00216     DefaultGroupId,
00217     ProxyHostId,
00218     ProxyPortId,
00219     SDITokenTypeId,
00220     NoSDITokenId,
00221     ClientCertThumbprintId,
00222     ServerCertThumbprintId,
00223     UnknownAutomaticPreference
00224 }  AutoPreferenceId ;
00225 
00226 // Used to determine if CPublicProxies, CPrivateProxies or no proxies should be used.
00227 typedef enum
00228 {
00229     TRANSPORT_PROXY_NONE,
00230     TRANSPORT_PROXY_PUBLIC,
00231     TRANSPORT_PROXY_CURRENT
00232 } TRANSPORT_PROXY_TYPE;
00233 
00234 // user authentication methods
00235 // these are shared between Agent and API
00236 //
00237 // Note that IKE PSK is supported for reconnects only.  The API can never
00238 // initiate an IPsec connection using IKE PSK authentication.
00239 typedef enum
00240 {
00241     USER_AUTH_UNKNOWN = 0,
00242     USER_AUTH_SSL_MACHINE_STORE_CERT,
00243     USER_AUTH_IKE_PSK,
00244     USER_AUTH_IKE_RSA,
00245     USER_AUTH_IKE_ECDSA,
00246     USER_AUTH_IKE_EAP_MD5,
00247     USER_AUTH_IKE_EAP_MSCHAPv2,
00248     USER_AUTH_IKE_EAP_GTC,
00249     USER_AUTH_IKE_EAP_ANYCONNECT,  // Default
00250 } USER_AUTH_METHOD;
00251 
00252 typedef enum
00253 {
00254     CFR_NONE = 0,
00255     CFR_HOST_UNREACHABLE,
00256 } CONNECT_FAILURE_REASON;
00257 
00258 #endif // __GLOBALENUMS_H