3.1.4.1 GetTelnetSessions (Opnum 7)
The GetTelnetSessions method is used to query the telnet server for information about all active telnet sessions.
-
HRESULT GetTelnetSessions( [out, retval] BSTR* pszSessionData );
pszSessionData: A string pointer to PSZSESSIONDATA string that contains information about telnet sessions in the server.<1>
-
The server must fill various fields of PSZSESSIONDATA as below.
NumberofSessions: The server MUST set the value for this field to the number of current active telnet session in Telnet Server. The server MUST ensure that the value of this field matches the number of instances of SessionInformation strings.
SessionInformation: The server MUST have one SessionInformation string per active session and the number of SessionInformation strings MUST be the same as the value of NumberofSessions field.
ID: ID of the session. The server must fill this filed with the unique identifier of the session. The server can reuse unique identifiers assigned to a session, but the server MUST ensure that at any given point in time only one telnet session exists with a particular ID. Refer to Section 3.1.1 for an abstract data model that the server can maintain.
Userdomain: The server MUST set the value for this field to the domain of which the user that established the telnet session is a member. If the user account is not a member of any domain then the server MUST fill this field with the computer name of the server.
UserName: The server MUST set the value for this field to the user name of the user that established the telnet session.
Computername: The server MUST set the value for this field to either the IPv4 or IPv6 address of the client. <2>
Year: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Month: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Dayofweek: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Day: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Hour: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Minute: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Second: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Milliseconds: The server MUST determine the value for this field from the time of logon expressed in Coordinated Universal Time (UTC).
Idletime: The server MUST set the value of this field to the time for which there has been no exchange of any communication between telnet client and server.
Return Values: The server MUST return zero if the method is successful. The server MUST return 0x01 if processing fails and set output parameters to NULL. These are in addition to the values that can be returned by the underlying [MS-DCOM] implementation.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying DCOM protocol [MS-DCOM].