![]() |
AnyConnect Secure Mobility Client 4.8.02045
|
00001 /************************************************************************** 00002 * Copyright (c) 2006, Cisco Systems, All Rights Reserved 00003 *************************************************************************** 00004 * 00005 * File: VpnStats.h 00006 * Date: 08/2006 00007 * 00008 *************************************************************************** 00009 * 00010 * VPN Statistics class implementation for the Client API. 00011 * 00012 ***************************************************************************/ 00013 #ifndef _VPNSTATS_ 00014 #define _VPNSTATS_ 00015 00016 #include "VPNStatsBase.h" 00017 00018 00019 /** 00020 * Use this class to retrieve statistics related to the tunnel and 00021 * protocol being used. 00022 * 00023 * The class has two uses: it provides a consistent localized label 00024 * definition mechanism and it uses this label mechanism to do 00025 * values lookups. 00026 * 00027 * Labels are automatically localized at application startup. 00028 * See the AnyConnect Release notes for additional information on localization. 00029 * 00030 * To retrieve a value for one of the labels, use the method getStatValue(). 00031 * For example, to get Time connected use: getStatValue(VPNStats::TimeConnected) 00032 */ 00033 00034 00035 class VPN_VPNAPI VPNStats : public VPNStatsBase 00036 { 00037 public: 00038 00039 /** 00040 * Get a list of Secure Routes. 00041 * Method returns a list of RouteInfo pointers 00042 */ 00043 const std::list<RouteInfo *> &getSecureRoutes(); 00044 00045 /** 00046 * Get a list of Nonsecure Routes. 00047 * Method returns a list of RouteInfo pointers 00048 */ 00049 const std::list<RouteInfo *> &getNonsecureRoutes(); 00050 00051 /** 00052 * Get a list of protocol Info objects. 00053 * Method returns a list of ProtocolInfo pointers 00054 */ 00055 const std::list<ProtocolInfo *> &getProtocolInfo(); 00056 00057 /** 00058 * Get a list of firewall Info objects. 00059 * Method returns a list of FirewallInfo pointers 00060 */ 00061 const std::list<FirewallInfo *> &getFirewallInfo(); 00062 00063 /** 00064 * Method used to retrieve statistics by name. 00065 */ 00066 const tstring &getStatValue(tstring &label); 00067 00068 /** 00069 * Alias for getStatValue. 00070 */ 00071 const tstring &getValue(tstring &label) { return getStatValue(label); } 00072 00073 /** 00074 * Return a translated stats label. As an example, passing 00075 * VPNStats::State will return a translated label for State text. 00076 * 00077 * NOTE: Do not use this translated label to retrieve stats 00078 * values; it is meant only as a label translation mechanism. 00079 */ 00080 static tstring getTranslatedLabel(tstring &label); 00081 00082 // 00083 // These static localized strings can be used in conjunction with the 00084 // getStatValue method to retrieve VPN statisitics. 00085 // 00086 static tstring State; /**< Current state (see ::VPNState) of 00087 the VPN tunnel. */ 00088 static tstring MgmtTunState; /**< Current state (see ::VPNState) of 00089 the management VPN tunnel. */ 00090 static tstring TimeConnected; /**< Time hh:mm:ss the VPN tunnel has 00091 been active. */ 00092 static tstring SessionDisconnect; /**< Estimate of time left until VPN session is 00093 disconnected due to ASA configured timeout. */ 00094 00095 // 00096 // Data byte/packet counts, does not include encap/encrypt overhead 00097 // 00098 static tstring BytesSent; /**< Bytes sent to the remote network. */ 00099 static tstring BytesReceived; /**< Bytes received from the remote 00100 network. */ 00101 static tstring PacketsSent; /**< Packets sent to the remote 00102 network. */ 00103 static tstring PacketsReceived; /**< Packets received from the remote 00104 network. */ 00105 00106 // 00107 // Control byte/packet count include size of DPD/Keepalive/etc 00108 // 00109 static tstring ControlBytesSent; /**< Control bytes sent to the 00110 remote gateway. */ 00111 static tstring ControlBytesReceived; /**< Control bytes received 00112 from the remote gateway. */ 00113 static tstring ControlPacketsSent; /**< Control packets sent to the 00114 remote gateway. */ 00115 static tstring ControlPacketsReceived; /**< Control packets received 00116 from the remote gateway. */ 00117 00118 // 00119 // Encrypted byte counts include both control and data, as well as 00120 // encryption and encapsulation headers 00121 // 00122 static tstring EncryptedBytesSent; /**< Encrypted bytes sent to the 00123 remote network. */ 00124 static tstring EncryptedBytesReceived; /**< Encrypted bytes received 00125 from the remote network. */ 00126 static tstring EncryptedPacketsSent; /**< Encrypted packets sent to the 00127 remote network. */ 00128 static tstring EncryptedPacketsReceived;/**< Encrypted packets received 00129 from the remote network. */ 00130 00131 // 00132 // Encrypted byte counts include both control and data (if protocol 00133 // is TLS), as well as encryption and encapsulation headers 00134 // 00135 static tstring CompressedBytesSent; /**< Compressed bytes sent 00136 to the remote network. */ 00137 static tstring CompressedBytesReceived; /**< Compressed bytes received 00138 from the remote network. */ 00139 static tstring CompressedPacketsSent; /**< Compressed packets sent 00140 to the remote network. */ 00141 static tstring CompressedPacketsReceived;/**< Compressed packets 00142 received from the remote 00143 network. */ 00144 00145 static tstring InboundDiscarded; /**< Incoming discarded bytes. */ 00146 static tstring OutboundDiscarded; /**< Outgoing discarded bytes. */ 00147 static tstring InboundBypassed; /**< Incoming skipped bytes. */ 00148 static tstring OutboundBypassed; /**< Outgoing skipped bytes. */ 00149 00150 static tstring ClientAddress; /**< Client IPv4 address. */ 00151 static tstring ServerAddress; /**< Remote gateway IP address. */ 00152 static tstring ClientAddressV6; /**< Client IPv6 address. */ 00153 00154 static tstring ServerHostName; /**< Host name of the remote gateway. */ 00155 static tstring ProxyAddress; /**< Proxy server IP address. */ 00156 static tstring ProxyHostName; /**< Proxy server host name. */ 00157 static tstring ProxyPort; /**< Port used for communicating with 00158 proxy server. */ 00159 static tstring TunnelingMode; /**< Mode IPv4 traffic is being passed over 00160 the tunnel. Values are "Tunnel All Traffic", 00161 "Split Include", "Split Exclude", "Application Tunnel", 00162 "Drop All Traffic" or "Bypass All Traffic". */ 00163 static tstring TunnelingModeV6; /**< Mode IPv6 traffic is being passed over 00164 the tunnel. Values are "Tunnel All Traffic", 00165 "Split Include", "Split Exclude", 00166 "Drop All Traffic" or "Bypass All Traffic". */ 00167 static tstring DynamicTunnelExclusion; /**< Domain names dynamically excluded from tunneling */ 00168 static tstring DynamicTunnelInclusion; /**< Domain names dynamically added to tunnel */ 00169 00170 static tstring Enabled; /**< */ 00171 static tstring Disabled; /**< */ 00172 static tstring Unconfirmed; /**< Used for Secure Mobility Solution. If the 00173 WSA is not reachable from the agent, it might be 00174 due to private side proxy configuration. In such a case 00175 report Unconfirmed to the UI */ 00176 00177 static tstring FipsMode; /**< FIPS mode (Federal security standard). 00178 Values are "Enabled" or "Disabled" */ 00179 00180 static tstring TrustedNetworkDetectionMode; /** < Trusted Network Detection. 00181 Values are "Enabled" or "Disabled" */ 00182 static tstring AlwaysOnMode; /**< Always On. Values are "Enabled" or 00183 "Disabled" */ 00184 00185 static tstring NetworkStatus; /**< Network Status. 00186 Values include are: "No Networks Detected", 00187 "DNS Services Unavailable", 00188 "Web Authentication Required", 00189 "Proxy Authentication Required", 00190 "Access Restricted", 00191 "Access Unrestricted" */ 00192 00193 static tstring DAPMessage; /**< DAP message received from gateway. Used for Quarantine 00194 mode, etc. */ 00195 00196 static tstring MUSHost; /**< MUS Host delivered from secure gateway. */ 00197 static tstring MUSStatus; /**< MUS Status: Enabled, Disabled. */ 00198 00199 static tstring AdministrativeDomain; /**<Administrative Domain Name: 00200 - domain name of the SG that the user connects to for the first time 00201 - "Admin Defined" if there are authorized SGs specified in 00202 the local policy file 00203 - "Not Applicable" otherwise. */ 00204 00205 static tstring ProfileName; /**< Active profile name. */ 00206 00207 VPNStats(); 00208 00209 virtual ~VPNStats(); 00210 00211 }; 00212 00213 00214 #endif // _VPNSATS_