Partager via


1.3.4 Ports Object

The remote access and site-to-site connection functionality is associated with connectivity. In turn, connectivity is provided by physical devices, such as a modem or ISDN (dial-up), or by virtual devices, such as PPTP, L2TP, PPPoE, IKEv2, and SSTP. For the RRAS server to accept connectivity, the devices (physical or virtual) need to be configured to accept connections. This is specified through the port configuration. A port is associated with each device type supported. The ports can be used for various connectivity purposes like remote access or demand-dial routing connectivity. There can be miscellaneous configurations associated with a specific device type. Configurations of the devices can be set or retrieved through the following methods:

The following request types, used by RasRpcSubmitRequest, also enable these operations:

  • REQTYPE_GETDEVICECONFIGINFO

  • REQTYPE_SETDEVICECONFIGINFO

  • REQTYPE_GETCALLEDID

  • REQTYPE_SETCALLEDID

  • REQTYPE_GETDEVCONFIG

  • REQTYPE_GETNDISWANDRIVERCAPS

Each port is associated with a port handle that can be retrieved using RRasAdminPortEnum or the RasRpcSubmitRequest with REQTYPE_PORTENUM. This handle can be used to perform tasks or queries specific to a port using this handle as reference. For each configured port there are runtime information and statistics obtainable through RRasAdminPortGetInfo. The specific request type REQTYPE_GETINFO of the RasRpcSubmitRequest method also enables these operations. Other than these get and set operations, there are other port-specific operations possible such as RRasAdminPortClearStats, RRasAdminPortReset, and RRasAdminPortDisconnect.