AnyConnect Secure Mobility Client 4.7.03052

include/api.h

Go to the documentation of this file.
00001 #ifndef _APISTDHEADER_
00002 #define _APISTDHEADER_
00003 
00004 /**
00005  * @file
00006  * This file contains some basic compiler definitions as well as common enums.
00007  */
00008 
00009 //Not compatible with MIDL
00010 #if !defined(__midl)
00011 #ifdef _WIN32
00012     #pragma warning(disable:4251 4786)
00013 
00014     #ifndef UNICODE
00015         #define UNICODE
00016     #endif // UNICODE
00017 
00018     #ifndef _UNICODE
00019         #define _UNICODE
00020     #endif // _UNICODE
00021 
00022     #ifndef tstring
00023 /** std::wstring */
00024         #define tstring std::wstring    /**< my wstring description */
00025     #endif // tstring
00026 
00027 #else // non-windows
00028 
00029     #ifndef tstring
00030         #define tstring std::string
00031     #endif // tstring
00032 
00033 #endif // _WIN32
00034 
00035 #ifdef _UNICODE
00036     #define tostream std::wostream
00037 #else
00038     #define tostream std::ostream
00039 #endif /* UNICODE */
00040 
00041 
00042 //used when including implementation files directly in an EXE.
00043 #ifdef _NOEXPORTDLL
00044     #define VPN_VPNAPI
00045 #else
00046     #ifdef _WIN32
00047         #ifdef VPN_APIEXPORTS //api
00048             #define VPN_VPNAPI __declspec(dllexport)
00049         #else
00050             #define VPN_VPNAPI __declspec(dllimport)
00051         #endif
00052     #else    
00053         #ifdef VPN_APIEXPORTS
00054             #define VPN_VPNAPI  __attribute__((visibility("default")))
00055         #else
00056             #define VPN_VPNAPI
00057         #endif
00058     #endif //_WIN32
00059 #endif //NOEXPORTDLL
00060 
00061 #ifndef OUT
00062 #define OUT
00063 #endif
00064 
00065 #ifdef __cplusplus //only include if C++ is being used, 
00066                    //C code also includes api.h for COM proxy of enumerators.
00067 #include <string>
00068 #include <map>
00069 #include <list>
00070 
00071 typedef std::map<tstring, tstring> ApiStringMap;
00072 typedef std::map<tstring, std::list<tstring> > ApiStringListMap;
00073 
00074 #endif //__cplusplus
00075 #endif //#if !defined(__midl)
00076 
00077 
00078 /***** PUT ONLY SHARED ENUMS EXPOSED TO USERS OF API FROM THIS POINT UNTIL END *****\
00079 ********* make sure to add the [v1_enum] inside a __midl define to new enums ********
00080 \******************** This is also compiled with IDL compiler **********************/
00081 
00082 #include "GlobalEnums.h"
00083 /**
00084  * MessageType
00085  * presents a level of severity associated with messages that are
00086  * sent to the API.  The severity can be useful for deciding how a message is
00087  * to be shown.  A UI might decide based on type to show a message as
00088  * a modal dialog versus a message written to the status area for an existing UI.
00089  */
00090 #if defined(__midl)
00091 [v1_enum] /*serialize as 32 bits*/
00092 #endif
00093 enum MessageType
00094 {
00095     MsgType_Error,      /**< Issue usually requiring user to acknowledge */
00096     MsgType_Warn,       /**< Less severe, not required to be shown to user */
00097     MsgType_Info,       /**< General message providing status, progress, etc. */
00098     MsgType_Status      /**< Can be used to indicate unexpected tunnel status change. */
00099 };
00100 
00101 
00102 /**
00103  * Identifies the type of token that was used successfully when SDI
00104  * Authentication is in use.
00105  */
00106 #if defined(__midl)
00107 [v1_enum] /*serialize as 32 bits*/
00108 #endif
00109 enum SDITokenType 
00110 { 
00111     SDITT_NONE, 
00112     SDITT_HARDWARE, 
00113     SDITT_SOFTWARE 
00114 };
00115 
00116 /**
00117  * Provides the current state of the VPN tunnel.
00118  */
00119 #if defined(__midl)
00120 [v1_enum] /*serialize as 32 bits*/
00121 #endif
00122 enum VPNState
00123 {
00124     CONNECTED     = STATE_CONNECTED,        /**< VPN is active */
00125     DISCONNECTED  = STATE_DISCONNECTED,     /**< VPN is inactive */
00126     CONNECTING    = STATE_CONNECTING,       /**< VPN is being established */
00127     DISCONNECTING = STATE_DISCONNECTING,    /**< VPN is being terminated */
00128     RECONNECTING  = STATE_RECONNECTING,     /**< VPN is being re-connected.  This state 
00129                                                  can occur due to network or other
00130                                                  temporary problems.  The state
00131                                                  indicates that the VPN is temporarily
00132                                                  unavailable and indicates the
00133                                                  connection is being re-established. */
00134     PAUSING       = STATE_PAUSING,          /**< VPN is being paused. */
00135     PAUSED        = STATE_PAUSED,           /**< VPN is paused. */
00136     SSOPOLLING    = STATE_SSOPOLLING,       /**< API is doing auth-poll, VPN is disconnected. */
00137     UNKNOWN       = ~0
00138 };
00139 
00140 /**
00141  * Provides the current sub-state of the VPN tunnel.
00142  */
00143 #if defined(__midl)
00144 [v1_enum] /*serialize as 32 bits*/
00145 #endif
00146 enum VPNSubState
00147 {
00148     VPNSS_NORMAL                            = VCSS_NORMAL,
00149     VPNSS_INDEFINITE_DELAY                  = VCSS_INDEFINITE_DELAY,
00150     VPNSS_SESSION_EXPIRING                  = VCSS_SESSION_EXPIRING,
00151     VPNSS_MT_DISCONNECTED_DISABLED          = VCSS_MT_DISCONNECTED_DISABLED,
00152     VPNSS_MT_DISCONNECTED_TRUSTED_NW        = VCSS_MT_DISCONNECTED_TRUSTED_NW,
00153     VPNSS_MT_DISCONNECTED_USER_TUNNEL_ACTIVE= VCSS_MT_DISCONNECTED_USER_TUNNEL_ACTIVE,
00154     VPNSS_MT_DISCONNECTED_LAUNCH_FAILED     = VCSS_MT_DISCONNECTED_LAUNCH_FAILED,
00155     VPNSS_MT_DISCONNECTED_CONNECT_FAILED    = VCSS_MT_DISCONNECTED_CONNECT_FAILED,
00156     VPNSS_MT_DISCONNECTED_BAD_VPN_CONFIG    = VCSS_MT_DISCONNECTED_BAD_VPN_CONFIG,
00157     VPNSS_MT_DISCONNECTED_SW_UP_PENDING     = VCSS_MT_DISCONNECTED_SW_UP_PENDING
00158 };
00159 
00160 /**
00161  * WMHint
00162  * provides a hint for the GUI to either minimize or un-minimize.
00163  */
00164 #if defined(__midl)
00165 [v1_enum] /*serialize as 32 bits*/
00166 #endif
00167 enum WMHint
00168 {
00169     MINIMIZE,       /**< hint to minimize GUI */
00170     OPEN,           /**< hint to un-minimize GUI */
00171     QUIT,           /**< hint that GUI should close.  @see WMHintReason */
00172     REFRESHHOSTNAMES,/**< hint to refresh the list of secure gateways */
00173     REFRESHPREFS,   /**< hint to refresh the preferences */
00174     SHOWCONNECTING,  /**< hint to display "connecting" status */
00175     CLOSECREDENTIALPOPUP, /**< hint to close the credentials popup */
00176 };
00177 
00178 
00179 /**
00180  * WMHintReason
00181  * provides a reason indicator for the #WMHint
00182  */
00183 #if defined(__midl)
00184 [v1_enum] /*serialize as 32 bits*/
00185 #endif
00186 enum WMHintReason
00187 {
00188     SECONDGUISTART, /**< Indicates a second GUI has been launched.  This
00189                          indicator is used to suggest that the GUI
00190                          already running be OPENed and that the first one
00191                          should exit. */
00192     PROXYREQUEST,   /**< Proxy credential request can be for web-launch or
00193                          standalone-initiated connections. */
00194     SERVICEFAILURE, /**< This tag is used when the VPN service
00195                          is no longer available. */
00196     DISCONNECT,     /**< Any disconnect notices should be seen by the user. */
00197     SERVICESTOPPED, /**< This tag will be used in cases where the VPN service
00198                          has been stopped. */
00199     CONNECT,        /**< Tag indicating an action to be taken due to connect,
00200                          for example a request to minimize the UI. */
00201     REASONUNKNOWN   /**< */
00202 };
00203 
00204 /**
00205  * provides an indication of the type of credential data being requested.
00206  */
00207 #if defined(__midl)
00208 [v1_enum] /*serialize as 32 bits*/
00209 #endif
00210 enum ConnectPromptType
00211 {
00212     CERTIFICATE,    /**< Indicates a certificate-only type of connection and
00213                          would not normally be sent to client unless a
00214                          post-authentication banner is to be displayed. */
00215     CREDENTIALS,    /**< Indicates that the user is to be prompted for authentication
00216                          credentials */
00217     PROXY,          /**< Indicates that the user is to be prompted for
00218                          proxy-authentication credentials */
00219     MANUAL_PKCS12_IMPORT, /**< Indicates that the user is to be prompted for passwords related
00220                               to PKCS12 import*/
00221     STATUS,         /**< Indicates that status messages are to be displayed to
00222                          the user*/
00223     SINGLESIGNON,   /**< Indicates an embedded browser based single sign-on authentication method is requested. */
00224     SINGLELOGOUT,   /**< Indicates an embedded browser based single sign-on authentication logout is requested. */
00225     LEGACY_SINGLESIGNON,   /**< (deprecated) Indicates a browser based single sign-on authentication method is requested. */
00226 };
00227 
00228 
00229 /**
00230  * Indicates the prompt or credential type.
00231  */
00232 #if defined(__midl)
00233 [v1_enum] /*serialize as 32 bits*/
00234 #endif
00235 enum PromptType { Prompt_Input,     /**< label and value. */
00236                   Prompt_Password,  /**< label and value, indicates user
00237                                          response should be masked. */
00238                   Prompt_Banner,    /**< value (the banner) with no label set. */
00239                   Prompt_Combo,     /**< list with choices options. */
00240                   Prompt_Header,    /**< label intended as header and with
00241                                          value. */
00242                   Prompt_Hidden,    /**< hidden value, should be ignored and
00243                                          left unchanged in response. */
00244                   Prompt_CheckBox,  /**< label and value (contrained to true or false) */
00245                   Prompt_SSO        /**< single sign-on authentication token prompt */
00246 };
00247 
00248 #if defined(__midl)
00249 [v1_enum] /*serialize as 32 bits*/
00250 #endif
00251 
00252 /* 
00253  * ***************** !!! ATTENTION !!! ***********************************
00254  * *
00255  * * When updating this preference enum, you must ensure that the enum in
00256  * * vpn/Api/jni/java/Preference.java is also updated.
00257  * *
00258  * ***************** !!! ATTENTION !!! ***********************************
00259  */
00260 enum PreferenceId 
00261 {
00262     ServiceDisable,             /**< This preference disable the VPN service.  
00263                                  If more than one profile exists and any one
00264                                  profile has VPN enabled, then it will be
00265                                  enabled.  False is the default. */
00266     CertificateStoreOverride,/**< This preference will trigger an alternate 
00267                                  authentication sequence in the API. The 
00268                                  preference is only settable by an 
00269                                  administrator. */
00270     CertificateStore,       /**< This preference indicates which Windows certificate 
00271                                  store AnyConnect should look in for    
00272                                  certificates. The options are All, Machine 
00273                                  and User with a default of All. The preference 
00274                                  is only settable by an administrator. */
00275     CertificateStoreMac,       /**< This preference indicates which macOS keychain
00276                                 AnyConnect should look in for certificates. 
00277                                 The options are All, System and Login with a default of All. 
00278                                 The preference is only settable by an administrator. */
00279     ShowPreConnectMessage,  /**< The ShowPreConnectMessage preference gives the
00280                                  administrator the ability to display an AnyConnect 
00281                                  startup banner message. The message will appear 
00282                                  only once per AnyConnect program start. The  
00283                                  preference is only settable by an 
00284                                  administrator. */
00285     AutoConnectOnStart,     /**< This preference allows the user to select 
00286                                  whether to establish a connection automatically
00287                                  on startup or not. */
00288     MinimizeOnConnect,      /**< This preference allows the user to select if
00289                                  the GUI should minimize when the connection is
00290                                  established */
00291     LocalLanAccess,         /**< This preference will provide a mechanism where 
00292                                  the user can disable access to their Local LAN. */
00293     DisableCaptivePortalDetection, /**<This preference will provide a mechanism where
00294                                    the user can disable captive portal detection.*/
00295     AutoReconnect,          /**< First control of the reconnect behavior. If the 
00296                                  client becomes disconnected for any reason, a 
00297                                  reconnect attempt is made.   */
00298     AutoReconnectBehavior,  /**< Second control of the reconnect behavior. When
00299                                  coming out of suspend/hibernate/standby mode. 
00300                                  Options are disconnect on suspend and reconnect 
00301                                  after suspend. */
00302     SuspendOnConnectedStandby,  /**< This setting allows to control whether the VPN tunnel
00303                                      is suspended when the system enters the Connected Standby 
00304                                      mode. It applies only to Windows 8 and above. */
00305     UseStartBeforeLogon,    /**< This preference allows an administrator to 
00306                                  control the use of the Start Before Logon 
00307                                  feature. The preference can be set to true (on) 
00308                                  or false (off). */
00309     AutoUpdate,             /**< Once the Downloader has loaded the profile, it 
00310                                  can check the AutoUpdate preference to see if 
00311                                  updates are either disabled or enabled */
00312     RSASecurIDIntegration,  /**< This preference will enable the administrator 
00313                                  and possibly end user to select the preferred 
00314                                  method of managing their SDI PIN and PASSCODE 
00315                                  interactions. Options are Automatic (default), 
00316                                  SoftwareTokens and HardwareTokens. */
00317     WindowsLogonEnforcement,/**< This preference allows an administrator to
00318                                  control if more than one user may be logged into
00319                                  the client PC during the VPN connection (Windows
00320                                  only). */
00321     WindowsVPNEstablishment,/**< This preference allows an administrator to
00322                                  control whether or not remote users may initiate
00323                                  a VPN connection (Windows only). */
00324     LinuxLogonEnforcement,  /**< This preference allows an administrator to
00325                                  control if more than one user may be logged into
00326                                  the client PC during the VPN connection (Linux 
00327                                  only). */
00328     LinuxVPNEstablishment,  /**< This preference allows an administrator to
00329                                  control whether or not remote users may initiate
00330                                  a VPN connection (Linux only). */
00331     ProxySettings,          /**< This preference allows an administrator to
00332                                  control how user's proxy setups are handled.*/
00333     AllowLocalProxyConnections, /**< This preference allows the administrator to control
00334                                  whether to allow establishing a connection through
00335                                  a local proxy. */
00336     PPPExclusion,           /**< This preference allows an administrator to control
00337                                  the policy used to exclude routes to
00338                                  PPP servers when connecting over L2TP or PPTP.
00339                                  Options are Automatic (default), Disable,
00340                                  and Override. */
00341     PPPExclusionServerIP,   /**< When PPPExclusion is set to Manual,
00342                                  the value of this preference allows an
00343                                  end user to specify the address of a
00344                                  PPP server that should be excluded
00345                                  from tunnel traffic. */
00346     AutomaticVPNPolicy,     /**< This preference allows an administrator to 
00347                                  define a policy to automatically manage when a 
00348                                  VPN connection should be started or stopped. */
00349     TrustedNetworkPolicy,   /**< This preference allows an administrator to 
00350                                  define a policy for users in trusted networks.
00351                                  The options are: Disconnect or DoNothing. */
00352     UntrustedNetworkPolicy, /**< This preference allows an administrator to 
00353                                  define a policy for users in untrusted networks.
00354                                  The options are: Connect or DoNothing. */
00355     TrustedDNSDomains,      /**< This preference defines a list of comma 
00356                                  separated DNS suffixes that a network interface
00357                                  in a trusted network might have. */
00358     TrustedDNSServers,      /**< This preference defines a list of comma 
00359                                  separated DNS servers that a network interface
00360                                  in a trusted network might have. */
00361     TrustedHttpsServerList,  /**< This preference defines a list of comma separated
00362                                   https servers reachable only via a trusted network.*/
00363     AlwaysOn,               /**< This preference governs VPN reestablishment after
00364                                  interruptions */
00365     ConnectFailurePolicy,   /**< This preference gives the network administrator 
00366                                  the ability to dictate the network access allowed
00367                                  by the client endpoint device following a VPN
00368                                  connection establishment failure. It is a component
00369                                  of AlwaysOn */
00370     AllowCaptivePortalRemediation, /**< This preference gives the network administrator
00371                                     the ability to dictate the network access 
00372                                     allowed by the client endpoint device following
00373                                     a VPN connection establishment failure it is a
00374                                     component of AlwaysOn */
00375     CaptivePortalRemediationTimeout, /**< This preference allows the network administrator
00376                                      the ability to impose a time limit for captive portal 
00377                                      remediation when the ConnectFailurePolicy value is Closed
00378                                      It is a component of AlwaysOn */
00379     ApplyLastVPNLocalResourceRules, /**< This preference gives the network administrator 
00380                                        the ability to allow split routes and firewall rules 
00381                                        to be applied following a VPN connection establishment
00382                                        failure when the ConnectFailurePolicy value is Closed
00383                                        It is a component of AlwaysOn */
00384     AllowVPNDisconnect,     /**< During Always On, this specifies that the user is allowed to
00385                                  disconnect the VPN session. */
00386     EnableScripting,        /**< This preference allows an administrator to 
00387                                  enable scripting (on connect or on
00388                                  disconnect). */
00389     TerminateScriptOnNextEvent,   /**< This preference dictates whether or not
00390                                        AnyConnect will terminate a running script
00391                                        process if a transition to another
00392                                        scriptable event occurs. */
00393     EnablePostSBLOnConnectScript, /**< This preference is used to control whether
00394                                        or not the OnConnect script will be launched
00395                                        from the desktop GUI when a tunnel has been
00396                                        established via SBL. */
00397     AutomaticCertSelection,   /**< This preference dictates whether or not to disable
00398                                    the default automatic certificate selection for user
00399                                    certificates. If disabled, a certificate selection dialog is
00400                                    displayed. This only applies if the GUI is enabled
00401                                    and not SBL. This only applies to Windows (not WinMobile). */
00402     RetainVpnOnLogoff,        /**< First control of the logoff behavior. This preference allows
00403                                    an administrator to control if the VPN is terminated or retained
00404                                    after user logs off.*/
00405     UserEnforcement,          /**< Second control of the logoff behavior. When the VPN connection has
00406                                    been retained after user logged off. Controls what user can log in 
00407                                    and keep the VPN connection. Options are same user only and any user. */
00408     DeviceLockRequired,           /**< This preference indicates whether or not 
00409                                        a Windows Mobile device must be configured
00410                                        with a password or PIN prior to establishing
00411                                        a VPN connection. This configuration is 
00412                                        only valid on Windows Mobile devices that
00413                                        use the Microsoft Default Local 
00414                                        Authentication Provider (LAP). */
00415     DeviceLockMaximumTimeoutMinutes,   /**< When set to a non-negative number, 
00416                                             this preference specifies the maximum
00417                                             number of minutes a device can be 
00418                                             inactive before device lock takes 
00419                                             into effect. (WM5/WM5AKU2+) */
00420     DeviceLockMinimumPasswordLength,   /**< When set to a non-negative number, 
00421                                             this preference specifies that any 
00422                                             PIN/password used for device lock 
00423                                             must be equal to or longer than
00424                                             the specified value, in characters.
00425                                             This setting must be pushed down to
00426                                             the mobile device by syncing with 
00427                                             an Exchange server before it can be 
00428                                             enforced. (WM5AKU2+) */
00429     DeviceLockPasswordComplexity,      /**< This preference checks whether or 
00430                                             not the password belongs to one of
00431                                             three subtypes: alpha, pin, strong */
00432     EnableAutomaticServerSelection,    /**< Automatic server selection will 
00433                                             automatically select the optimal 
00434                                             secure gateway for the endpoint */
00435     AutoServerSelectionImprovement,    /**< During a reconnection attempt after
00436                                             a system resume, this setting 
00437                                             specifies the minimum  estimated
00438                                             performance improvement required to
00439                                             justify transitioning a user to a new server 
00440                                             This value represents percentage in 0..100 */
00441     AutoServerSelectionSuspendTime,    /**< During a reconnection attempt after
00442                                             a system resume, this specifies the
00443                                             minimum time a user must have been 
00444                                             suspended in order to justify a new
00445                                             server selection calculation. Unit is hours */
00446     AuthenticationTimeout,             /**< Time, in seconds, that the client waits
00447                                             for authentication to be completed.*/
00448     SafeWordSofTokenIntegration,  /**< This preference will enable the administrator and possibly
00449                                        the end user to enable SafeWord SofToken integration.
00450                                        Options are Enabled (true) and Disabled (false - default). */
00451     AllowIPsecOverSSL,                      /**< if 'true' then tunneling of IPSEC over SSL
00452                                             is made possible with help from the ASA.
00453                                         */
00454     ClearSmartcardPin,                 /**< This preference controls whether the smartcard pin
00455                                             will be cleared on a successful connection*/
00456     IPProtocolSupport,                 /**< This preference controls which protocol(s) will be 
00457                                             allowed for the connection*/
00458     CaptivePortalRemediationBrowserFailover, /**< This preference is applicable to enhanced captive portal 
00459                                                   remediation and specifies whether the user is allowed to
00460                                                   opt for an external browser for remediation, as opposed to 
00461                                                   the AnyConnect browser. */
00462     AllowManualHostInput,              /**< This preference specifies whether the user
00463                                             is allowed to type a new hostname in the VPN
00464                                             edit box. */
00465     BlockUntrustedServers,             /**< This preference specifies whether the user wants
00466                                             to allow for connections to secure gateways with
00467                                             certificate errors. */
00468     PublicProxyServerAddress,          /**< This preference specifies the public proxy server
00469                                             address to be used. This number is in the format
00470                                             ServerAddr:ServerPort (ex. 101.89.85.444:8080)
00471                                             or just the FQDN. */
00472     CertificatePinning,                /**< This preference specifies whether Certificate Pinning
00473                                             check should be performed during server certificate
00474                                             verification. */
00475     UnknownPreference
00476 }; 
00477 
00478 
00479 /** 
00480  * Indicates the scope of the preferences contained in a PreferenceInfo object 
00481  */
00482 #if defined(__midl)
00483 [v1_enum] /*serialize as 32 bits*/
00484 #endif
00485 enum PreferenceScope    
00486 {
00487     User,               /**< Indicates that the preferences were set by a user */
00488     Global,             /**< Indicates that the preferences are global */
00489     UserAndGlobal       /**< Indicates that we have both user and global preferences */
00490 };
00491 
00492 /** 
00493  * Indicates the client mode of operation. Unlike tunneling mode or other 
00494  * mutually exclusive modes, client operating modes are independent settings,
00495  * several of which can be turned on simultaneously.  
00496  */
00497 #if defined(__midl)
00498 [v1_enum] /*serialize as 32 bits*/
00499 #endif
00500 enum OperatingMode
00501 {
00502     FIPS                     = (1 << 0), /**< Indicates that the client is 
00503                                               running in FIPS mode. */
00504     StartBeforeLogon         = (1 << 1), /**< Indicates that the client is 
00505                                               running in Start Before Login 
00506                                               mode. */
00507     GUI                      = (1 << 2), /**< Indicates that the client is 
00508                                               a GUI client. */
00509     TrustedNetworkDetection  = (1 << 3), /**< Indicates that a Trusted Network
00510                                               Detection policy is enabled for
00511                                               the client. */
00512     AlwaysOnVpn              = (1 << 4), /**< Indicates that the Always On 
00513                                               policy is enabled for the client. */
00514     NetworkIssue             = (1 << 5), /**< For user notifications only.
00515                                               Indication by API to the UI that
00516                                               there is a network condition. */
00517     Quarantined              = (1 << 6), /**< Indicates that the VPN session is being 
00518                                               Quarantined by the secure gateway. */
00519     AutomaticHeadendSelection= (1 << 7), /**< Indicates that Automatic Headend
00520                                               is enabled. */
00521     DisconnectAllowed        = (1 << 8), /**< Indicates that the user is allowed
00522                                               to disconnect the VPN based on 
00523                                               policy. */
00524     VPNDisabled              = (1 << 9), /**< Indicates that the VPN service is
00525                                               to be marked as disabled. */
00526     SCEPMode                 = (1 << 10), /**< Indicates that the client is
00527                                                performing a SCEP cert enrollment. */
00528     OnTrustedNetwork         = (1 << 11), /**< Indicates that at last check, the
00529                                                client detected that it was on
00530                                                a trusted network. */
00531     ManualHostInputAllowed   = (1 << 12), /**< Indicates that the user is allowed
00532                                                to add a new host by typing its name
00533                                                in the VPN edit box. */
00534     ErrorSuppressed          = (1 << 13), /**< Indicates a connection error has
00535                                                been returned fronm the agent, but
00536                                                was suppressed to warning to 
00537                                                prevent popup dialog in the UI. */
00538     StrictMode               = (1 << 14), /**< Indicates that the client is 
00539                                                running in strict certificate trust mode. */
00540     CLI                      = (1 << 15), /**< Indicates that the client is
00541                                                a CLI client. */
00542     Management               = (1 << 16)  /**< Indicates that the client is strictly
00543                                                used for initiating a management tunnel. */
00544 };
00545 
00546 /**
00547  * Indicates the last error seen by the API in this connection attempt.
00548  */
00549 #if defined(__midl)
00550 [v1_enum] /*serialize as 32 bits*/
00551 #endif
00552 enum VPNError
00553 {
00554     VPNSuccess = 0,                      /**< No error has occurred. */
00555     VPNError_Generic_FatalError = 1,     /**< An error of unknown type has
00556                                               occured */
00557 
00558     VPNError_Connection_Error = 100,     /**< An unknown connection error has
00559                                               occured, such as bad hostname, bad
00560                                               group, etc. */
00561     VPNError_Connection_InvalidGroupURL, /**< Invalid Group URL specified in the 
00562                                               server address */
00563 
00564     VPNError_Network_Error = 200,        /**< An unknown network error has
00565                                               occured, such as DNS resolution
00566                                               error, unable to open socket,
00567                                               routing error, captive portal,
00568                                               etc. */
00569 
00570     VPNError_Authentication_Error = 300, /**< An unknown user authenication
00571                                               error has occured. */
00572 
00573     VPNError_Authentication_DAP_Terminate, /**< Access Denied: Your system does 
00574                                                 not meet policy requirements (DAP). */
00575 
00576     VPNError_ClientCertificate_UnknownError = 400, /**< An unknown client
00577                                                         certificate error has
00578                                                         occured. */
00579     VPNError_ClientCertificate_Missing,  /**< A client certificate is required
00580                                               but no client certificate has been
00581                                               found on the system. */
00582     VPNError_ClientCertificate_Expired,  /**< The client certificate has expired */
00583     VPNError_ClientCertificate_NotYetValid, /**< The client certificate is not
00584                                                  yet valid. */
00585 
00586     VPNError_ServerCertificate_UnknownError = 500, /**< An unknown error has
00587                                                         occured when validating
00588                                                         the server certificate. */
00589     VPNError_ServerCertificate_Expired,    /**< The server certificate has
00590                                                 expired. */
00591     VPNError_ServerCertificate_NotYetValid /**< The server certificate is not
00592                                                 yet valid. */
00593 };
00594 
00595 enum CertAuthMode
00596 {
00597     CertAuth_Automatic, /**< Will try each available certificate in succession
00598                              until authentication is obtained or we run out of 
00599                              available certificates */
00600     CertAuth_Disabled,  /**< Will disable Certificate Based Authentication */
00601     CertAuth_Manual     /**< Will only use preconfigured certificate to attempt
00602                              Certificate Based Authentication */
00603 };
00604 
00605 enum CertificateType
00606 {
00607     CertificateType_Client,
00608     CertificateType_SystemTrusted,
00609     CertificateType_Server
00610 };
00611 
00612 enum CertConfirmReason
00613 {
00614     CertConfirmReason_Unspecified,
00615     CertConfirmReason_NameMismatch,
00616     CertConfirmReason_Expired,
00617     CertConfirmReason_NotValidYet,
00618     CertConfirmReason_UntrustedSource,
00619     CertConfirmReason_InvalidUse,
00620     CertConfirmReason_Revoked,
00621     CertConfirmReason_Malformed,
00622     CertConfirmReason_NotFipsCompliant,
00623     CertConfirmReason_InvalidateDate,
00624     CertConfirmReason_SignatureAlgorithm,
00625     CertConfirmReason_KeySize
00626 };
00627 
00628 enum UserResponseError
00629 {
00630     UserResponseError_None,
00631     UserResponseError_Unspecified,
00632     UserResponseError_BadServerCert,
00633     UserResponseError_SsoNavigation,
00634     UserResponseError_SsoGettingCookie,
00635     UserResponseError_SsoTimeout,
00636     UserResponseError_SsoMissingDependency,
00637     UserResponseError_SsoClientCertRequest
00638 };
00639 
00640 #if defined(__midl)
00641 [v1_enum] /*serialize as 32 bits*/
00642 #endif
00643 enum ClientType
00644 {
00645     ClientType_GUI,
00646     ClientType_GUI_SBL,
00647     ClientType_CLI,
00648     ClientType_MGMT
00649 };
00650 
00651 #endif // _APISTDHEADER_