Prev Next

RAS_PORT_0 info  Overview  Group

The RAS_PORT_0 structure contains information that describes a RAS port.

typedef struct _RAS_PORT_0 {

    WCHAR wszPortName[RASSAPI_MAX_PORT_NAME];

    WCHAR wszDeviceType[RASSAPI_MAX_DEVICETYPE_NAME];

    WCHAR wszDeviceName[RASSAPI_MAX_DEVICE_NAME];

    WCHAR wszMediaName[RASSAPI_MAX_MEDIA_NAME];

    DWORD reserved;

    DWORD Flags;

    WCHAR wszUserName[UNLEN + 1];

    WCHAR wszComputer[NETBIOS_NAME_LEN];

    DWORD dwStartSessionTime;

    WCHAR wszLogonDomain[DNLEN + 1];

    BOOL fAdvancedServer;

} RAS_PORT_0, *PRAS_PORT_0;

 

Members

wszPortName
A null-terminated Unicode string that specifies the name of the port, such as “COM1”.
wszDeviceType
A null-terminated Unicode string that specifies the type of the device on which the connection was made, such as “Modem” or “ISDN”. The list of device types that might be specified in this member includes all the device types installed on the server, including third-party devices.
wszDeviceName
A null-terminated Unicode string that specifies the name of the device on which the connection was made, such as “Hayes 9600” or “PCIMACISDN1”.
wszMediaName
A null-terminated Unicode string that specifies the name of the media used for the connection, such as “rasser” or “rastapi”.
reserved
This member is reserved.
Flags
A set of bit flags that specify the nature of the connection made on this port. This member can be a combination of the following flags.

Value

Meaning

GATEWAY_ACTIVE

If this flag is set, the NetBIOS gateway is active on the server.

MESSENGER_PRESENT

If this flag is set, the Windows NT messenger service is running on the remote client.

PORT_MULTILINKED

If this flag is set, the port is multilinked with other ports. You can use this information for displaying the connection status as a multilinked port.

For a multilinked port, the RAS_PORT_STATISTICS structure contains two sets of statistics: one for the port alone, and another for the combined ports in the multilink connection.

PPP_CLIENT

If this flag is set, the remote client connected using PPP. If this flag is not set, the remote client connected using the AMB protocol.

REMOTE_LISTEN

If this flag is set, the RemoteListen parameter of the NetBIOS gateway is set to 1 on the server.

  USER_AUTHENTICATED

If this flag is set, a remote client is connected to the server and the user has been authenticated. You can check this flag to ensure that a client is actually connected to a port.

If the MESSENGER_PRESENT, GATEWAY_ACTIVE, and REMOTE_LISTEN flags are set, you can use the Windows NT messenger service to send an administrative message to the remote client. If MESSENGER_PRESENT and REMOTE_LISTEN are set, but GATEWAY_ACTIVE is not, you can send a message to the client only if you send the message from the RAS server the client is dialed in to.

If the MESSENGER_PRESENT, GATEWAY_ACTIVE, and REMOTE_LISTEN flags are set, you can use the Windows NT messenger service to send an administrative message to the remote client. If MESSENGER_PRESENT and REMOTE_LISTEN are set, but GATEWAY_ACTIVE is not, you can send a message to the client only if you send the message from the RAS server the client is dialed in to.

wszUserName
A null-terminated Unicode string that specifies the name of the remote user connected to this port.
wszComputer
A null-terminated Unicode string that specifies the name of the remote client computer.
dwStartSessionTime
Specifies the time, in seconds from January 1, 1970, that the client connected to the RAS server on this port. You can use the standard Win32 time routines to format this value for display.
wszLogonDomain
A null-terminated Unicode string that specifies the name of the Windows NT domain on which the remote user was authenticated. This string is the domain name only, with no “\\” prefix.
fAdvancedServer
A flag that is nonzero if the RAS server associated with this port is a Windows NT Advanced Server. You can use this information to determine the name of the server that has the user account database. If the RAS server is an Advanced Server, you can get the name of the user account server by concatenating the prefix “\\” to the name returned in the wszLogonDomain member. This is because for an Advanced Server the local logon domain name is the same as the server name. If the RAS server is a Windows NT Workstation, you can use the RasAdminGetUserAccountServer function to get the name of the user account server.

See Also

RAS_PORT_1, RAS_PORT_STATISTICS, RasAdminGetUserAccountServer, RasAdminPortEnum