3.1.4.11 RRPC_FWGetConfig (Opnum 10)

The RRPC_FWGetConfig method retrieves the value of a profile configuration option. The client specifies to the server from what store and profile this value MUST be retrieved and in what specific configuration option it is interested.

 unsigned long RRPC_FWGetConfig(
   [in] FW_CONN_HANDLE rpcConnHandle,
   [in] FW_POLICY_STORE_HANDLE hPolicyStore,
   [in, range(FW_PROFILE_CONFIG_ENABLE_FW, FW_PROFILE_CONFIG_MAX-1)] 
     FW_PROFILE_CONFIG configID,
   [in] FW_PROFILE_TYPE Profile,
   [in] unsigned long dwFlags,
   [in, out, unique, size_is(cbData), length_is(*pcbTransmittedLen)] 
     unsigned char* pBuffer,
   [in] unsigned long cbData,
   [in, out] unsigned long* pcbTransmittedLen,
   [out] unsigned long* pcbRequired
 );

rpcConnHandle: This parameter is an RPC binding handle that connects to the RPC interface of the Firewall and Advanced Security Protocol.

hPolicyStore: This input parameter is an FW_POLICY_STORE_HANDLE data type. The data type MUST contain an opened policy store handle, successfully opened with the RRPC_FWOpenPolicyStore (Opnum 0) method. The handle MUST have read/write access rights.

configID: This parameter specifies the specific profile configuration option the client is interested in retrieving.

Profile: This parameter specifies from which specific profile this value MUST be retrieved.

dwFlags: This parameter is a combination of flags from the FW_CONFIG_FLAGS enumeration, which modifies the behavior of this method, as specified in the definition of the enumeration.

pBuffer: This is an input/output parameter. This parameter is a pointer to the buffer that the client provides to contain the value of the profile configuration option being requested.

cbData: This parameter is the size of the buffer that the pBuffer parameter points to.

pcbTransmittedLen: This is a pointer to an input and output parameter that specifies the length of the transmitted data within the buffer.

pcbRequired: This is a pointer to an output parameter that specifies the required minimum buffer size in octets for the method to be able to return the configuration value. This output parameter is nonzero only if the buffer (pointed to by pBuffer and whose size is cbData) was not big enough to contain the value.

Return Values: The method returns 0 if successful; if failed, it returns a nonzero error code. The field can take any specific error code value, as specified in [MS-ERREF]. The following are common.

Return value/code

Description

0x00000005

ERROR_ACCESS_DENIED

The client does not have the required credentials to call the method.

0x00000002

ERROR_FILE_NOT_FOUND

The specific configuration option is not found within the policy. This means that it is not configured. If the option is not configured in any other store, the firewall uses a default value.

0x00000032

ERROR_NOT_SUPPORTED

The method does not support the specified combination of parameters. This can be because:

  • The store type specified does not support this method.

  • The configuration option is not supported in this store.

  • The Profile parameter contains a combination of profiles (instead of a single profile) or an unknown profile.

0x000000EA

ERROR_MORE_DATA

The buffer is not big enough to hold the configuration option value.

0x00000057

ERROR_INVALID_PARAMETER

One of the parameters of this method is incorrect, or is required and not specified. This error can be returned because:

  • The specified configuration option is not defined.

  • One of the required values is not specified.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE]. If any lower-layer errors are reported by RPC exception, this exception is converted to an error code and reported to higher-layer protocols via the return value.

The server MUST validate that the client is authorized to perform the requested operation (as defined in section 3.1.4) before executing this method.