JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris DHCP Service Developer's Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of Solaris DHCP Data Access Architecture

2.  Architecture Features for Module Writers

3.  Service Provider Layer API

General Data Store Functions

configure()

Purpose

Synopsis

Description

Returns

mklocation()

Purpose

Synopsis

Description

Returns

status()

Purpose

Synopsis

Description

Returns

version()

Purpose

Synopsis

Description

Returns

dhcptab Functions

list_dt()

Purpose

Synopsis

Description

Returns

open_dt()

Purpose

Synopsis

Description

Returns

lookup_dt()

Purpose

Synopsis

Description

Returns

add_dt()

Purpose

Synopsis

Description

Returns

modify_dt()

Purpose

Synopsis

Description

Returns

delete_dt()

Purpose

Synopsis

Description

Returns

close_dt()

Purpose

Synopsis

Description

Returns

remove_dt()

Purpose

Synopsis

Description

Returns

DHCP Network Container Functions

list_dn()

Purpose

Synopsis

Description

Returns

open_dn()

Purpose

Synopsis

Description

Returns

lookup_dn()

Purpose

Synopsis

Description

Returns

add_dn()

Purpose

Synopsis

Description

Returns

modify_dn()

Purpose

Synopsis

Description

Returns

delete_dn()

Purpose

Synopsis

Description

Returns

close_dn()

Purpose

Synopsis

Description

Returns

remove_dn()

Purpose

Synopsis

Description

Returns

Generic Error Codes

4.  Code Samples and Testing

Index

General Data Store Functions

This section lists functions related to general data store activities.

configure()

Purpose

To pass a configuration string to the data store.

Synopsis

int configure(const char *configp);

Description

The configure() function is optional. If it is provided together with the required public module management bean (see getComponent()), 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.

Returns

DSVC_SUCCESS, DSVC_MODULE_CFG_ERR

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.

mklocation()

Purpose

To create the directory where the data store containers are to reside.

Synopsis

int mklocation(const char *location);

Description

Creates the directory pointed to by location (if the directory does not exist) for data store containers to reside.

Returns

DSVC_SUCCESS, DSVC_ACCESS, DSVC_EXISTS, DSVC_BUSY, DSVC_INTERNAL, DSVC_UNSUPPORTED.

status()

Purpose

To obtain the general status of the data store.

Synopsis

int status(const char *location);

Description

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.

Returns

DSVC_SUCCESS, DSVC_ACCESS, DSVC_NO_LOCATION, DSVC_BUSY, DSVC_INTERNAL.

version()

Purpose

To obtain the version number of the API implemented by the data store.

Synopsis

int version(int *versionp);

Description

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.

Returns

DSVC_SUCCESS, DSVC_INTERNAL, DSVC_MODULE_ERR.