RAS_CONNECTION_EX structure (mprapi.h)
The RAS_CONNECTION_EX structure contains specific information for the connection that includes: the user name, domain, and Globally Unique Identifier (GUID) associated with the connection, its Network Access Protection (NAP) quarantine state, its packet statistics, as well as its Point-to-Point(PPP) and Internet Key Exchange version 2 (IKEv2) related information.
The RAS_CONNECTION_EX structure contains most of the same information as the RAS_CONNECTION_0, RAS_CONNECTION_1, RAS_CONNECTION_2, and RAS_CONNECTION_3 combined structures.
Syntax
typedef struct _RAS_CONNECTION_EX {
MPRAPI_OBJECT_HEADER Header;
DWORD dwConnectDuration;
ROUTER_INTERFACE_TYPE dwInterfaceType;
DWORD dwConnectionFlags;
WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN + 1];
WCHAR wszUserName[UNLEN + 1];
WCHAR wszLogonDomain[DNLEN + 1];
WCHAR wszRemoteComputer[NETBIOS_NAME_LEN + 1];
GUID guid;
RAS_QUARANTINE_STATE rasQuarState;
FILETIME probationTime;
DWORD dwBytesXmited;
DWORD dwBytesRcved;
DWORD dwFramesXmited;
DWORD dwFramesRcved;
DWORD dwCrcErr;
DWORD dwTimeoutErr;
DWORD dwAlignmentErr;
DWORD dwHardwareOverrunErr;
DWORD dwFramingErr;
DWORD dwBufferOverrunErr;
DWORD dwCompressionRatioIn;
DWORD dwCompressionRatioOut;
DWORD dwNumSwitchOvers;
WCHAR wszRemoteEndpointAddress[MAXIPADRESSLEN + 1];
WCHAR wszLocalEndpointAddress[MAXIPADRESSLEN + 1];
PROJECTION_INFO ProjectionInfo;
HANDLE hConnection;
HANDLE hInterface;
} RAS_CONNECTION_EX, *PRAS_CONNECTION_EX;
Members
Header
A MPRAPI_OBJECT_HEADER structure that specifies the version of the RAS_CONNECTION_EX structure.
dwConnectDuration
A value that represent the duration of the connection, in seconds.
dwInterfaceType
A ROUTER_INTERFACE_TYPE enumeration that identifies the type of connection interface.
dwConnectionFlags
A bitmap of flags that specify connection attributes. dwConnectionFlags must contain at least one of the following values:
Value | Meaning |
---|---|
|
The connection is using Point-to-Point Protocol (PPP). |
|
The messenger service is active on the client and messages can be sent to the client using MprAdminSendUserMessage. |
|
The connection is currently in quarantine. For information on how to remove the connection from quarantine, please see MprAdminConnectionRemoveQuarantine. |
|
The connection is using AppleTalk Remote Access Protocol (ARAP). |
|
The connection is using IKEv2. |
|
The connection is using IKEv2 and the server is not reachable. |
wszInterfaceName[MAX_INTERFACE_NAME_LEN + 1]
A null-terminated Unicode string that contains the name of the interface for this connection.
wszUserName[UNLEN + 1]
A null-terminated Unicode string that contains the name of the user logged on to the connection.
wszLogonDomain[DNLEN + 1]
A null-terminated Unicode string that contains the domain on which the connected user is authenticated.
wszRemoteComputer[NETBIOS_NAME_LEN + 1]
A null-terminated Unicode string that contains the name of the remote computer.
guid
A GUID that identifies the connection. For incoming connections, this GUID is valid only as long as the connection is active.
rasQuarState
A RAS_QUARANTINE_STATE structure that specifies the NAP quarantine state of the connection.
probationTime
A FILETIME structure that specifies the time required for the connection to come out of quarantine after which the connection will be dropped. This value is valid only if rasQuarState has a value of RAS_QUAR_STATE_PROBATION.
dwBytesXmited
A value that specifies the number of bytes transmitted on the connection.
dwBytesRcved
A value that specifies the number of bytes received on the connection.
dwFramesXmited
A value that specifies the number of frames transmitted on the connection.
dwFramesRcved
A value that specifies the number of frames received on the connection.
dwCrcErr
A value that specifies the number of Cyclic Redundancy Check (CRC) errors on the connection.
dwTimeoutErr
A value that specifies the number of time-out errors on the connection.
dwAlignmentErr
A value that specifies the number of alignment errors on the connection.
dwHardwareOverrunErr
A value that specifies the number of hardware overrun errors on the connection.
dwFramingErr
A value that specifies the number of framing errors on the connection.
dwBufferOverrunErr
A value that specifies the number of buffer overrun errors on the connection.
dwCompressionRatioIn
A value that specifies the percentage by which data received on this connection is compressed. dwCompressionRatioIn is the size of the compressed data divided by the size of the same data in an uncompressed state.
dwCompressionRatioOut
A value that specifies the percentage by which data transmitted on this connection is compressed. The ratio is the size of the compressed data divided by the size of the same data in an uncompressed state.
dwNumSwitchOvers
A value that specifies the number of IKEv2 Mobility and Multihoming Protocol (MOBIKE) switches that have occurred on the connection as defined in RFC4555. dwNumSwitchOvers is only valid if dwConnectionFlags is RAS_FLAGS_IKEV2_CONNECTION.
wszRemoteEndpointAddress[MAXIPADRESSLEN + 1]
A null-terminated Unicode string that contains the IP address of the remote computer in the connection. This string is of the form "a.b.c.d".
wszLocalEndpointAddress[MAXIPADRESSLEN + 1]
A null-terminated Unicode string that contains the IP address of the local computer in the connection. This string is of the form "a.b.c.d".
ProjectionInfo
A PROJECTION_INFO structure that contains either a PPP_PROJECTION_INFO or IKEV2_PROJECTION_INFO structure.
hConnection
A handle to the RAS connection.
hInterface
A handle to the RAS connection interface.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Header | mprapi.h |