Rate This Document
Findability
Accuracy
Completeness
Readability

init

Initializes DataGuard configuration.

int init ( 
   DG_Cfg *config
)

Parameters

Table 1 Description

Parameter

Description

Value Range

Input/Output

config

Initialized configuration.

This parameter is of the type DG_Cfg* (void *).

It is null as a single pointer and cannot be null as a double pointer.

Output

Return Values

  • Success: 0 is returned.
  • Failure: The error code is returned.

Error Codes

Table 2 Error codes

Error Code

Value

Description

Remarks

DG_ERR_CONFIG_PARAM

62

Failed to verify the parameters.

The config double pointer is null.

DG_ERR_MALLOC_FAIL

51

Failed to allocate memory.

-

Dependency

#include "data_guard_config.h": the header file where the API declaration is stored.

Example

#include  "data_guard_config.h"
void *teeCfg = NULL;
rv = opts->init(&teeCfg);// opts is the result of the successful DG_InitConfigOpts call.
if (rv != 0) {
return rv;
}

Running result: teeCfg is not null and rv is 0.

Call the init API using the opts of the successful DG_InitConfigOpts call.