|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris DHCP Service Developer's Guide Oracle Solaris 11 Express 11/10|
This section lists functions related to general data store activities.
To pass a configuration string to the data store.
int configure(const char *configp);
The configure() function is optional. If it is provided together with the required public module management bean (see Data Service Configuration and DHCP Management Tools), the Framework Configuration Layer calls this function when the public module loads, and passes in the public-module-specific configuration string, which is cached by the Framework Configuration Layer on the DHCP server for the data store module.
The configure() function returns DSVC_SUCCESS if the module wants the Framework Configuration Layer to continue to load the module, or DSVC_MODULE_CFG_ERR if the module wants the Framework Configuration Layer to fail the loading of the module. An example of such a situation is a configuration string so malformed that the required configuration of the module cannot take place.
To create the directory where the data store containers are to reside.
int mklocation(const char *location);
Creates the directory pointed to by location (if the directory does not exist) for data store containers to reside.
DSVC_SUCCESS, DSVC_ACCESS, DSVC_EXISTS, DSVC_BUSY, DSVC_INTERNAL, DSVC_UNSUPPORTED.
To obtain the general status of the data store.
int status(const char *location);
The status() function instructs the data store to return its general status, and if location is non-NULL, further validates the location of the data store container by determining if the container does in fact exist, is accessible, and is formed correctly for the data store type. The data store must return the appropriate error codes if the facilities it needs are unavailable or it is otherwise not ready.
DSVC_SUCCESS, DSVC_ACCESS, DSVC_NO_LOCATION, DSVC_BUSY, DSVC_INTERNAL.
To obtain the version number of the API implemented by the data store.
int version(int *versionp);
Data stores that support the Service Provider Layer API described in this manual are version 1 (one). The version is returned in the int pointed to by versionp.
DSVC_SUCCESS, DSVC_INTERNAL, DSVC_MODULE_ERR.