4.9 Retrieving Specific Port Information

This example illustrates the use of the Rasrpc Interface method RasRpcSubmitRequest with ReqTypes REQTYPE_GETINFO as defined in this specification. The method is used to query the information of a specific port with port identifier 2 which is a SSTP port.

The client calls the RPC method RasRpcSubmitRequest (section 3.3.4.5) with the following parameters:

  • The handle to the Rasrpc Server where the call is to be executed that the client obtains during initialization (section 3.3.3)

  • pReqBuffer parameter is updated as follows:

    • The pReqBuffer buffer is allocated the size of the sum of the size of RequestBuffer and 5000.

    • pReqBuffer.RB_PCBIndex is set to 2. (Port identifier information for all the available ports on the server can be retrieved using the RasRpcSubmitRequest with ReqTypes as REQTYPE_PORTENUM. The RASMAN_PORT_32.P_Port contains the unique port identier for the port.)

    • pReqBuffer.RB_Reqtype is set to 22 (REQTYPE_GETINFO)

    • pReqBuffer.RB_Dummy is set to the size of ULONG.

    • pReqBuffer.Done is set to zero (0).

    • pReqBuffer.Alignment is set to zero (0).            

  • The dwcbBufSize is set to the size of pReqBuffer.

When the client calls the RPC method as previously described, the server returns ERROR_SUCCESS. pReqBuffer.RB_Buffer is interpreted as Info structure and contains the port information of the port with port ID 2.