3.1.4.27 RMIBEntryCreate (Opnum 26)

The RMIBEntryCreate method<287> creates an MIB entry that is used by the RRAS to create a route entry in the IPv4 routing table.

 DWORD RMIBEntryCreate(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwPid,
   [in] DWORD dwRoutingPid,
   [in] PDIM_MIB_ENTRY_CONTAINER pInfoStuct
 );

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

dwPid: Specifies the transport protocol.

dwRoutingPid: Specifies the routing protocol. The value of this parameter MUST be set to IPRTRMGR_PID (0x00002710). The method MUST return an error other than those specified in the return value table for any other value.

pInfoStuct: This is a pointer to a DIM_MIB_ENTRY_CONTAINER (section 2.2.1.2.19) structure with valid dwMibInEntrySize and pMibInEntry fields. The dwMibOutEntrySize and pMibOutEntry of the structure are ignored by the server for this method. dwMibInEntrySize MUST be set to the size of data being passed in pMibInEntry. If pInfoStruct is NULL, an error other than those specified in the return value table is returned. Otherwise, the pointer is treated as a pointer to the DIM_MIB_ENTRY_CONTAINER structure. 

Because the dwRoutingPid parameter of this method MUST take the value IPRTRMGR_PID (0x00002710), the pMibInEntry field of pInfoStruct MUST be a pointer to MIB_OPAQUE_INFO (section 2.2.1.2.52). The dwId and rgbyData fields of MIB_OPAQUE_INFO MUST be set to one of the following values:

§ dwId set to the value ROUTE_MATCHING (0x0000001F).

§ rgbyData MUST be a pointer to a MIB_IPDESTROW (section 2.2.1.2.20) structure. A route corresponding to data in rgbyData is added in the IPv4 route table. The route is created with the following fields specified:

§ ForwardRow: Contains the MIB_IPFORWARDROW (section 2.2.1.2.35) structure that contains the route information with the following fields set:

§ dwForwardDest

§ dwForwardMask

§ dwForwardPolicy

§ dwForwardNextHop

§ ForwardType

§ ForwardProto

§ dwForwardAge

§ dwForwardNextHopAS

§ dwForwardIfIndex

§ dwForwardProto

§ dwForwardMetric1

§ dwForwardMetric2

§ dwForwardMetric3

§ dwForwardMetric4

§ dwForwardMetric5

§ dwForwardPreference

§ dwForwardViewSet: This MUST be the view information of the ForwardRow with the following fields specified, see INTERFACE_ROUTE_INFO (section 2.2.1.2.11):

§ dwRtInfoDest

§ dwRtInfoMask

§ dwRtInfoNextHop

§ dwRtInfoMetric1

§ dwRtInfoMetric2

§ dwRtInfoMetric3

§ dwRtInfoIfIndex

§ dwRtInfoProto

§ pMibInEntry: The following fields are set to these values irrespective of the values specified:

§ dwForwardPolicy is set to 0.

§ dwForwardMetric4 and dwForwardMetric5 are set to MIB_IPROUTE_METRIC_UNUSED (-1).

§ dwForwardPreference is set to IP_PRIORITY_DEFAULT_METRIC (0x0000007F).

If pMibInEntry is NULL, an error other than those specified in the return values table is returned. Otherwise the pointer to pMibInEntry is cast to a pointer to MIB_OPAQUE_INFO.

If dwMibInEntrySize does not match the size of MIB_IPDESTROW an error other than those specified in the return values table is returned.

Return Values: A 32-bit, unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully; otherwise, it contains an error code, as specified in [MS-ERREF] or in section 2.2.4. All values that are not 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.

The opnum field value for this method is 26.

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 pInfoStruct is NULL, return an error other than those in the preceding table.

  • If dwPid is not specified in the SupportedTransportsList, return an error other than those 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.

  • Return any error that the RRAS server returns while processing this request. Otherwise return ERROR_SUCCESS (0x00000000).

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