isc_result_t omapi_auth_key_stuff_values (omapi_object_t *c, omapi_object_t *id, omapi_object_t *h) { omapi_auth_key_t *a; isc_result_t status; if (h -> type != omapi_type_auth_key) return ISC_R_INVALIDARG; a = (omapi_auth_key_t *)h; /* Write only the name and algorithm -- not the secret! */ if (a -> name) { status = omapi_connection_put_name (c, "name"); if (status != ISC_R_SUCCESS) return status; status = omapi_connection_put_string (c, a -> name); if (status != ISC_R_SUCCESS) return status; } if (a -> algorithm) { status = omapi_connection_put_name (c, "algorithm"); if (status != ISC_R_SUCCESS) return status; status = omapi_connection_put_string (c, a -> algorithm); if (status != ISC_R_SUCCESS) return status; } return ISC_R_SUCCESS; }
isc_result_t dhcp_group_stuff_values (omapi_object_t *c, omapi_object_t *id, omapi_object_t *h) { struct group_object *group; isc_result_t status; if (h -> type != dhcp_type_group) return ISC_R_INVALIDARG; group = (struct group_object *)h; /* Write out all the values. */ if (group -> name) { status = omapi_connection_put_name (c, "name"); if (status != ISC_R_SUCCESS) return status; status = omapi_connection_put_string (c, group -> name); if (status != ISC_R_SUCCESS) return status; } /* Write out the inner object, if any. */ if (h -> inner && h -> inner -> type -> stuff_values) { status = ((*(h -> inner -> type -> stuff_values)) (c, id, h -> inner)); if (status == ISC_R_SUCCESS) return status; } return ISC_R_SUCCESS; }