|
Function
|
Synopsis
|
Arguments
|
Returns
|
|
NVCStart (LPWSTR commandline)
|
Start a VPN tunnel using the nvc.exe client.
|
Long Pointer to Wide String (LPWSTR) commandline -A null-terminated string with the command line options for nvc.exe. Do not type the program name, for example, nvc.exe. Type only the command switches.
|
0 - Successfully started tunnel.
-1 - Error starting nvc.exe.
other - Error starting tunnel. Error code can be interpreted by NVCGetErrorString()
|
|
NVCStop ()
|
Stops the VPN tunnel.
|
None
|
-1 - NVC is not running.
0 - Success, stop command is issued.
|
|
NVCTunnelStatus ()
|
Returns the current status of the VPN tunnel.
|
None
|
-1 - NVC is not running.
0 - Tunnel is DOWN.
1 - Tunnel is UP.
|
|
NVCTunnelStats (NVC_TUNNELSTATS *statsBuffer)
|
Returns the tunnel current statistics.
|
statsBuffer - Points to a NVC_TUNNELSTATS structure that contains the current statistics.
The GetSystemTime() is the UTC time when the system collects statistics.
The total items are total numbers of bytes and errors the VPN driver processes from the VPN start time. (total for all tunnels).
The conn items are the totals for the latest tunnel connection. These items are mirrored in the Nortel VPN Client monitor.
|
0 - Success
other - A Microsoft Window's RPC_STATUS code.
|
|
NVCGetErrorString (int errorCode| LPWSTR errorString| DWORD len)
|
Converts an error code returned by NVCStart() to a readable string.
|
int errorCode - The error code returned by NVCStart().
LPWSTR errorString- A character buffer where the error string is written upon successfull completion of this call.
DWORD len - The length, in bytes, of the errorString buffer.
|
Positive value - Success with string length.
0 - String not available.
|