Synopsis
int modify_dn(void *handp, const dn_rec_t *origp, dn_rec_t *newp);
Description
Atomically modifies the record origp with the record newp in the DHCP network container referred to by the handle handp. The signature associated with newp is updated by the underlying public module. If an update collision occurs, the data store is not updated.
Returns
DSVC_SUCCESS, DSVC_ACCESS, DSVC_BUSY, DSVC_COLLISION, DSVC_INTERNAL, DSVC_NOENT.
delete_dn()
Purpose
To delete a record from a DHCP network container.
Synopsis
int delete_dn(void *handp, const dn_rec_t *pnp);
Description
Deletes the record identified by the dn_cip and dn_sig elements of pnp from the DHCP network container referred to by the handle handp. If an update collision occurs, the matching record is not deleted from the data store and DSVC_COLLISION is returned.
If the dn_sig signature of pnp is 0, the matching record is simply deleted with no detection of update collisions.
Returns
DSVC_SUCCESS, DSVC_ACCESS, DSVC_NOENT, DSVC_BUSY, DSVC_INTERNAL, DSVC_COLLISION.
close_dn()
Purpose
To close the network container.
Synopsis
int close_dn(void **handpp);
Description
Frees the instance handle and cleans up per-instance state.
Returns
DSVC_SUCCESS, DSVC_ACCESS, DSVC_INTERNAL.
remove_dn()
Purpose
To delete the DHCP network container from the data store location.
Synopsis
int remove_dn(const char *location, const struct in_addr *netp);
Description
Removes DHCP network container netp (host order) in location.
Returns
DSVC_SUCCESS, DSVC_ACCESS, DSVC_NOENT, DSVC_NO_LOCATION, DSVC_BUSY, DSVC_INTERNAL.
Generic Error Codes
The Framework Configuration Layer and Service Provider Layer API functions will return the following integer error values. Note that the file /usr/include/dhcp_svc_public.h is the definitive source for these codes.
* Standard interface errors */ #define DSVC_SUCCESS 0 /* success */ #define DSVC_EXISTS 1 /* object already exists */ #define DSVC_ACCESS 2 /* access denied */ #define DSVC_NO_CRED 3 /* No underlying credential */ #define DSVC_NOENT 4 /* object doesn't exist */ #define DSVC_BUSY 5 /* object temporarily busy (again) */ #define DSVC_INVAL 6 /* invalid argument(s) */ #define DSVC_INTERNAL 7 /* internal data store error */ #define DSVC_UNAVAILABLE 8 /* underlying service required by */ /* public module unavailable */ #define DSVC_COLLISION 9 /* update collision */ #define DSVC_UNSUPPORTED 10 /* operation not supported */ #define DSVC_NO_MEMORY 11 /* operation ran out of memory */ #define DSVC_NO_RESOURCES 12 /* non-memory resources unavailable */ #define DSVC_BAD_RESOURCE 13 /* malformed/missing RESOURCE setting */ #define DSVC_BAD_PATH 14 /* malformed/missing PATH setting */ #define DSVC_MODULE_VERSION 15 /* public module version mismatch */ #define DSVC_MODULE_ERR 16 /* internal public module error */ #define DSVC_MODULE_LOAD_ERR 17 /* error loading public module */ #define DSVC_MODULE_UNLOAD_ERR 18 /* error unloading public module */ #define DSVC_MODULE_CFG_ERR 19 /* module configuration failure */ #define DSVC_SYNCH_ERR 20 /* error in synchronization protocol */ #define DSVC_NO_LOCKMGR 21 /* cannot contact lock manager */ #define DSVC_NO_LOCATION 22 /* location nonexistent */ #define DSVC_BAD_CONVER 23 /* malformed/missing CONVER setting */ #define DSVC_NO_TABLE 24 /* table does not exist */ #define DSVC_TABLE_EXISTS 25 /* table already exists */ #define DSVC_NERR (DSVC_TABLE_EXISTS + 1) |