AnyConnect Secure Mobility Client  5.1.2.42
VPNStats.h
1 /**************************************************************************
2 * Copyright (c) 2006, Cisco Systems, All Rights Reserved
3 ***************************************************************************
4 *
5 * File: VpnStats.h
6 * Date: 08/2006
7 *
8 ***************************************************************************
9 *
10 * VPN Statistics class implementation for the Client API.
11 *
12 ***************************************************************************/
13 #ifndef _VPNSTATS_
14 #define _VPNSTATS_
15 
16 #include "VPNStatsBase.h"
17 
18 
19 /**
20  * Use this class to retrieve statistics related to the tunnel and
21  * protocol being used.
22  *
23  * The class has two uses: it provides a consistent localized label
24  * definition mechanism and it uses this label mechanism to do
25  * values lookups.
26  *
27  * Labels are automatically localized at application startup.
28  * See the AnyConnect Release notes for additional information on localization.
29  *
30  * To retrieve a value for one of the labels, use the method getStatValue().
31  * For example, to get Time connected use: getStatValue(VPNStats::TimeConnected)
32  */
33 
34 
35 class VPN_VPNAPI VPNStats : public VPNStatsBase
36 {
37  public:
38 
39  /**
40  * Get a list of Secure Routes.
41  * Method returns a list of RouteInfo pointers
42  */
43  const std::list<RouteInfo *> &getSecureRoutes();
44 
45  /**
46  * Get a list of Nonsecure Routes.
47  * Method returns a list of RouteInfo pointers
48  */
49  const std::list<RouteInfo *> &getNonsecureRoutes();
50 
51  /**
52  * Get a list of protocol Info objects.
53  * Method returns a list of ProtocolInfo pointers
54  */
55  const std::list<ProtocolInfo *> &getProtocolInfo();
56 
57  /**
58  * Get a list of firewall Info objects.
59  * Method returns a list of FirewallInfo pointers
60  */
61  const std::list<FirewallInfo *> &getFirewallInfo();
62 
63  /**
64  * Method used to retrieve statistics by name.
65  */
66  const tstring &getStatValue(tstring &label);
67 
68  /**
69  * Alias for getStatValue.
70  */
71  const tstring &getValue(tstring &label) { return getStatValue(label); }
72 
73  /**
74  * Return a translated stats label. As an example, passing
75  * VPNStats::State will return a translated label for State text.
76  *
77  * NOTE: Do not use this translated label to retrieve stats
78  * values; it is meant only as a label translation mechanism.
79  */
80  static tstring getTranslatedLabel(tstring &label);
81 
82  //
83  // These static localized strings can be used in conjunction with the
84  // getStatValue method to retrieve VPN statisitics.
85  //
86  static tstring State; /**< Current state (see ::VPNState) of
87  the VPN tunnel. */
88  static tstring MgmtTunState; /**< Current state (see ::VPNState) of
89  the management VPN tunnel. */
90  static tstring TimeConnected; /**< Time hh:mm:ss the VPN tunnel has
91  been active. */
92  static tstring SessionDisconnect; /**< Estimate of time left until VPN session is
93  disconnected due to ASA configured timeout. */
94 
95  //
96  // Data byte/packet counts, does not include encap/encrypt overhead
97  //
98  static tstring BytesSent; /**< Bytes sent to the remote network. */
99  static tstring BytesReceived; /**< Bytes received from the remote
100  network. */
101  static tstring PacketsSent; /**< Packets sent to the remote
102  network. */
103  static tstring PacketsReceived; /**< Packets received from the remote
104  network. */
105 
106  //
107  // Control byte/packet count include size of DPD/Keepalive/etc
108  //
109  static tstring ControlBytesSent; /**< Control bytes sent to the
110  remote gateway. */
111  static tstring ControlBytesReceived; /**< Control bytes received
112  from the remote gateway. */
113  static tstring ControlPacketsSent; /**< Control packets sent to the
114  remote gateway. */
115  static tstring ControlPacketsReceived; /**< Control packets received
116  from the remote gateway. */
117 
118  //
119  // Encrypted byte counts include both control and data, as well as
120  // encryption and encapsulation headers
121  //
122  static tstring EncryptedBytesSent; /**< Encrypted bytes sent to the
123  remote network. */
124  static tstring EncryptedBytesReceived; /**< Encrypted bytes received
125  from the remote network. */
126  static tstring EncryptedPacketsSent; /**< Encrypted packets sent to the
127  remote network. */
128  static tstring EncryptedPacketsReceived;/**< Encrypted packets received
129  from the remote network. */
130 
131  //
132  // Encrypted byte counts include both control and data (if protocol
133  // is TLS), as well as encryption and encapsulation headers
134  //
135  static tstring CompressedBytesSent; /**< Compressed bytes sent
136  to the remote network. */
137  static tstring CompressedBytesReceived; /**< Compressed bytes received
138  from the remote network. */
139  static tstring CompressedPacketsSent; /**< Compressed packets sent
140  to the remote network. */
141  static tstring CompressedPacketsReceived;/**< Compressed packets
142  received from the remote
143  network. */
144 
145  static tstring InboundDiscarded; /**< Incoming discarded bytes. */
146  static tstring OutboundDiscarded; /**< Outgoing discarded bytes. */
147  static tstring InboundBypassed; /**< Incoming skipped bytes. */
148  static tstring OutboundBypassed; /**< Outgoing skipped bytes. */
149 
150  static tstring ClientAddress; /**< Client IPv4 address. */
151  static tstring ServerAddress; /**< Remote gateway IP address. */
152  static tstring ClientAddressV6; /**< Client IPv6 address. */
153 
154  static tstring ServerHostName; /**< Host name of the remote gateway. */
155  static tstring ProxyAddress; /**< Proxy server IP address. */
156  static tstring ProxyHostName; /**< Proxy server host name. */
157  static tstring ProxyPort; /**< Port used for communicating with
158  proxy server. */
159  static tstring TunnelingMode; /**< Mode IPv4 traffic is being passed over
160  the tunnel. Values are "Tunnel All Traffic",
161  "Split Include", "Split Exclude", "Application Tunnel",
162  "Drop All Traffic" or "Bypass All Traffic". */
163  static tstring TunnelingModeV6; /**< Mode IPv6 traffic is being passed over
164  the tunnel. Values are "Tunnel All Traffic",
165  "Split Include", "Split Exclude",
166  "Drop All Traffic" or "Bypass All Traffic". */
167  static tstring DynamicTunnelExclusion; /**< Domain names dynamically excluded from tunneling */
168  static tstring DynamicTunnelInclusion; /**< Domain names dynamically added to tunnel */
169 
170  static tstring Enabled; /**< */
171  static tstring Disabled; /**< */
172  static tstring Unconfirmed; /**< Used for Secure Mobility Solution. If the
173  WSA is not reachable from the agent, it might be
174  due to private side proxy configuration. In such a case
175  report Unconfirmed to the UI */
176 
177  static tstring FipsMode; /**< FIPS mode (Federal security standard).
178  Values are "Enabled" or "Disabled" */
179 
180  static tstring TrustedNetworkDetectionMode; /** < Trusted Network Detection.
181  Values are "Enabled" or "Disabled" */
182  static tstring AlwaysOnMode; /**< Always On. Values are "Enabled" or
183  "Disabled" */
184 
185  static tstring NetworkStatus; /**< Network Status.
186  Values include are: "No Networks Detected",
187  "DNS Services Unavailable",
188  "Web Authentication Required",
189  "Proxy Authentication Required",
190  "Access Restricted",
191  "Access Unrestricted" */
192 
193  static tstring DAPMessage; /**< DAP message received from gateway. Used for Quarantine
194  mode, etc. */
195 
196  static tstring MUSHost; /**< MUS Host delivered from secure gateway. */
197  static tstring MUSStatus; /**< MUS Status: Enabled, Disabled. */
198 
199  static tstring AdministrativeDomain; /**<Administrative Domain Name:
200  - domain name of the SG that the user connects to for the first time
201  - "Admin Defined" if there are authorized SGs specified in
202  the local policy file
203  - "Not Applicable" otherwise. */
204 
205  static tstring ProfileName; /**< Active profile name. */
206 
207  VPNStats();
208 
209  virtual ~VPNStats();
210 
211 };
212 
213 
214 #endif // _VPNSATS_
static tstring ProfileName
Definition: VPNStats.h:205
static tstring BytesSent
Definition: VPNStats.h:98
static tstring MUSHost
Definition: VPNStats.h:196
static tstring DynamicTunnelExclusion
Definition: VPNStats.h:167
static tstring EncryptedPacketsReceived
Definition: VPNStats.h:128
static tstring CompressedBytesReceived
Definition: VPNStats.h:137
static tstring ServerHostName
Definition: VPNStats.h:154
static tstring OutboundBypassed
Definition: VPNStats.h:148
static tstring DAPMessage
Definition: VPNStats.h:193
static tstring BytesReceived
Definition: VPNStats.h:99
const tstring & getValue(tstring &label)
Definition: VPNStats.h:71
static tstring FipsMode
Definition: VPNStats.h:177
static tstring InboundDiscarded
Definition: VPNStats.h:145
static tstring ControlBytesSent
Definition: VPNStats.h:109
static tstring TimeConnected
Definition: VPNStats.h:90
static tstring SessionDisconnect
Definition: VPNStats.h:92
#define tstring
Definition: api.h:35
static tstring AdministrativeDomain
Definition: VPNStats.h:199
static tstring AlwaysOnMode
Definition: VPNStats.h:182
static tstring EncryptedBytesReceived
Definition: VPNStats.h:124
static tstring OutboundDiscarded
Definition: VPNStats.h:146
static tstring ControlBytesReceived
Definition: VPNStats.h:111
static tstring TunnelingModeV6
Definition: VPNStats.h:163
static tstring ControlPacketsReceived
Definition: VPNStats.h:115
static tstring CompressedPacketsReceived
Definition: VPNStats.h:141
static tstring CompressedPacketsSent
Definition: VPNStats.h:139
static tstring PacketsReceived
Definition: VPNStats.h:103
static tstring ServerAddress
Definition: VPNStats.h:151
static tstring NetworkStatus
Definition: VPNStats.h:185
static tstring ClientAddress
Definition: VPNStats.h:150
static tstring MUSStatus
Definition: VPNStats.h:197
static tstring CompressedBytesSent
Definition: VPNStats.h:135
static tstring ProxyAddress
Definition: VPNStats.h:155
static tstring ProxyHostName
Definition: VPNStats.h:156
static tstring TunnelingMode
Definition: VPNStats.h:159
static tstring ProxyPort
Definition: VPNStats.h:157
static tstring MgmtTunState
Definition: VPNStats.h:88
static tstring EncryptedBytesSent
Definition: VPNStats.h:122
static tstring ClientAddressV6
Definition: VPNStats.h:152
static tstring InboundBypassed
Definition: VPNStats.h:147
Definition: VPNStats.h:35
static tstring Unconfirmed
Definition: VPNStats.h:172
static tstring DynamicTunnelInclusion
Definition: VPNStats.h:168
static tstring ControlPacketsSent
Definition: VPNStats.h:113
static tstring EncryptedPacketsSent
Definition: VPNStats.h:126
static tstring PacketsSent
Definition: VPNStats.h:101
static tstring State
Definition: VPNStats.h:86
Definition: VPNStatsBase.h:40