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_control_stuff_values (omapi_object_t *c, omapi_object_t *id, omapi_object_t *h) { dhcp_control_object_t *control; isc_result_t status; if (h -> type != dhcp_type_control) return ISC_R_INVALIDARG; control = (dhcp_control_object_t *)h; /* Write out all the values. */ status = omapi_connection_put_name (c, "state"); if (status != ISC_R_SUCCESS) return status; status = omapi_connection_put_uint32 (c, sizeof (u_int32_t)); if (status != ISC_R_SUCCESS) return status; status = omapi_connection_put_uint32 (c, control -> state); 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; }
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; }
isc_result_t omapi_connection_put_named_uint32 (omapi_object_t *c, const char *name, u_int32_t value) { isc_result_t status; status = omapi_connection_put_name(c, name); if (status != ISC_R_SUCCESS) return (status); status = omapi_connection_put_uint32(c, sizeof(u_int32_t)); if (status != ISC_R_SUCCESS) return (status); status = omapi_connection_put_uint32(c, value); return (status); }