3.1.4.16 RRouterInterfaceDelete (Opnum 15)

The RRouterInterfaceDelete method<266> deletes an interface on a specified server. The interface MUST have been created with the RRouterInterfaceCreate (section 3.1.4.13) method. 

 DWORD RRouterInterfaceDelete(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD hInterface
 );

hDimServer: A handle to the RRASM server where the call is to be executed, see section 3.1.3.

hInterface: A unique identifier of an interface. This can be obtained from RRouterInterfaceCreate or RRouterInterfaceGetHandle (section 3.1.4.12). Because the RRASM server does not maintain the interface handles, the RRAS server SHOULD check to ensure that this handle is a valid interface handle. 

Return Values: A 32-bit, unsigned integer value that indicates the return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully; otherwise, the value contains an error code, as specified in [MS-ERREF] or in section 2.2.4. All values that are not listed in the table that follows MUST be treated the same by the RRASM client.

Return value/code

Description

ERROR_SUCCESS

0x00000000

The call was successful.

ERROR_ACCESS_DENIED

0x00000005

The calling application does not have sufficient privileges, as specified in section 2.1.1.1.

ERROR_INTERFACE_CONNECTED

0x0000038C

The interface is connected and therefore cannot be deleted. This error is returned if the interface is of type ROUTER_IF_TYPE_CLIENT, ROUTER_IF_TYPE_HOME_ROUTER, or ROUTER_IF_TYPE_FULL_ROUTER.

The opnum field value for this method is 15.

When processing this call, the RRASM server MUST do the following:

  • Validate, as specified in section 2.1.1.1, whether this method was called by a client that has access to the method. If the client does not have access, then return error ERROR_ACCESS_DENIED (0x00000005).

  • If the interface is of type ROUTER_IF_TYPE_CLIENT, ROUTER_IF_TYPE_HOME_ROUTER, or ROUTER_IF_TYPE_FULL_ROUTER, and if the interface is not connected, the RRAS implementation MUST return ERROR_INTERFACE_CONNECTED (0x0000038C).

  • If the hInterface value specified is not associated with an interface entry in InterfaceList that has a matching interface handle (value being the same), return an error other than one of the errors specified in the preceding table.

  • Call the abstract interface Invoke DIMSVC method specifying the operation and the parameters to enable RRAS server to perform the required management task.

  • If the RRAS server returns successfully removing the interface context from its runtime configuration settings, and if the interface is ROUTER_IF_TYPE_FULL_ROUTER, get the interface name present in the interface entry (from the InterfaceList) that has the same interface handle as hInterface, remove the phone book entry with the specified interface name, and remove the interface name from PhonebookEntryNameList. Remove the interface entry from the InterfaceList to complete the removal of the interface.

  • Return any error status provided by the RRAS server. Otherwise return ERROR_SUCCESS (0x00000000).

No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].