65 sizeof (dhcp_control_object_t),
68 log_fatal (
"Can't register control object type: %s",
69 isc_result_totext (status));
70 status = dhcp_control_allocate (&dhcp_control_object,
MDL);
72 log_fatal (
"Can't make initial control object: %s",
73 isc_result_totext (status));
86 sizeof (
struct group_object), 0,
89 log_fatal (
"Can't register group object type: %s",
90 isc_result_totext (status));
102 sizeof (
struct subnet), 0,
105 log_fatal (
"Can't register subnet object type: %s",
106 isc_result_totext (status));
109 (&dhcp_type_shared_network,
119 sizeof (
struct shared_network), 0,
RC_MISC);
121 log_fatal (
"Can't register shared network object type: %s",
122 isc_result_totext (status));
149 return ISC_R_NOMEMORY;
150 memcpy (group -> name,
153 group -> name [value -> u.
buffer.len] = 0;
160 if (group -> group && group -> group -> statements)
162 if (!group -> group) {
164 return ISC_R_NOMEMORY;
172 (
char *) value->
u.
buffer.value,
174 "network client", 0);
178 (&group -> group -> statements, parse, &lose,
190 if (h -> inner && h -> inner -> type -> set_value) {
191 status = ((*(h -> inner -> type -> set_value))
192 (h -> inner, id, name, value));
214 name, group -> name,
MDL);
217 if (h -> inner && h -> inner -> type -> get_value) {
218 status = ((*(h -> inner -> type -> get_value))
219 (h -> inner, id,
name, value));
239 strlen (group ->
name),
MDL)) {
242 strlen (group ->
name),
244 group_object_dereference (&t,
MDL);
248 group ->
name = (
char *)0;
257 const char *
name, va_list ap)
267 if (!strcmp (name,
"updated")) {
274 if (!group -> name) {
276 sprintf (hnbuf,
"ng%08lx%08lx",
278 (
unsigned long)group);
279 group -> name =
dmalloc (strlen (hnbuf) + 1,
MDL);
281 return ISC_R_NOMEMORY;
282 strcpy (group -> name, hnbuf);
290 if (h -> inner && h -> inner -> type -> get_value) {
291 status = ((*(h -> inner -> type -> signal_handler))
292 (h -> inner,
name, ap));
323 if (h -> inner && h -> inner -> type -> stuff_values) {
324 status = ((*(h -> inner -> type -> stuff_values))
325 (c, id, h -> inner));
366 tv -> value -> u.buffer.
value,
367 tv -> value -> u.buffer.len,
MDL)) {
371 group_object_dereference (&group,
MDL);
380 group_object_dereference (&group,
MDL);
405 status = group_object_allocate (&group,
MDL);
410 group_object_dereference (&group,
MDL);
426 return ISC_R_IOERROR;
441 unsigned long newstate;
453 control -> state = value -> u.
integer;
458 if (h -> inner && h -> inner -> type -> set_value) {
459 status = ((*(h -> inner -> type -> set_value))
460 (h -> inner, id,
name, value));
482 name, (
int)control -> state,
MDL);
485 if (h -> inner && h -> inner -> type -> get_value) {
486 status = ((*(h -> inner -> type -> get_value))
487 (h -> inner, id,
name, value));
505 const char *
name, va_list ap)
515 if (h -> inner && h -> inner -> type -> get_value) {
516 status = ((*(h -> inner -> type -> signal_handler))
517 (h -> inner,
name, ap));
547 if (h -> inner && h -> inner -> type -> stuff_values) {
548 status = ((*(h -> inner -> type -> stuff_values))
549 (c, id, h -> inner));
618 if (h -> inner && h -> inner -> type -> set_value) {
619 status = ((*(h -> inner -> type -> set_value))
620 (h -> inner, id,
name, value));
643 if (h -> inner && h -> inner -> type -> get_value) {
644 status = ((*(h -> inner -> type -> get_value))
645 (h -> inner, id,
name, value));
659 subnet = (
struct subnet *)h;
661 subnet_dereference (&subnet ->
next_subnet, file, line);
663 subnet_dereference (&subnet ->
next_sibling, file, line);
668 interface_dereference (&subnet ->
interface, file, line);
676 const char *name, va_list ap)
688 if (h -> inner && h -> inner -> type -> get_value) {
689 status = ((*(h -> inner -> type -> signal_handler))
690 (h -> inner, name, ap));
712 if (h -> inner && h -> inner -> type -> stuff_values) {
713 status = ((*(h -> inner -> type -> stuff_values))
714 (c, id, h -> inner));
738 return ISC_R_NOTIMPLEMENTED;
744 return ISC_R_NOTIMPLEMENTED;
762 if (h -> inner && h -> inner -> type -> set_value) {
763 status = ((*(h -> inner -> type -> set_value))
764 (h -> inner, id, name, value));
788 if (h -> inner && h -> inner -> type -> get_value) {
789 status = ((*(h -> inner -> type -> get_value))
790 (h -> inner, id, name, value));
807 shared_network = (
struct shared_network *)h;
808 if (shared_network ->
next)
809 shared_network_dereference (&shared_network ->
next,
811 if (shared_network ->
name) {
812 dfree (shared_network ->
name, file, line);
813 shared_network ->
name = 0;
816 subnet_dereference (&shared_network ->
subnets, file, line);
818 interface_dereference (&shared_network ->
interface,
820 if (shared_network ->
pools)
822 &shared_network ->
pools, file, line);
823 if (shared_network ->
group)
825 #if defined (FAILOVER_PROTOCOL)
849 if (h -> inner && h -> inner -> type -> get_value) {
850 status = ((*(h -> inner -> type -> signal_handler))
851 (h -> inner,
name, ap));
873 if (h -> inner && h -> inner -> type -> stuff_values) {
874 status = ((*(h -> inner -> type -> stuff_values))
875 (c, id, h -> inner));
899 return ISC_R_NOTIMPLEMENTED;
905 return ISC_R_NOTIMPLEMENTED;
#define GROUP_OBJECT_DYNAMIC
omapi_object_type_t * dhcp_type_shared_network
isc_result_t dhcp_control_remove(omapi_object_t *lp, omapi_object_t *id)
isc_result_t omapi_make_int_value(omapi_value_t **, omapi_data_string_t *, int, const char *, int)
isc_result_t omapi_object_reference(omapi_object_t **, omapi_object_t *, const char *, int)
isc_result_t end_parse(struct parse **cfile)
isc_result_t dhcp_control_set_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value)
isc_result_t dhcp_control_lookup(omapi_object_t **lp, omapi_object_t *id, omapi_object_t *ref)
omapi_typed_data_t * value
isc_result_t omapi_object_type_register(omapi_object_type_t **, const char *,(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *),(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **), isc_result_t(*)(omapi_object_t *, const char *, int), isc_result_t(*)(omapi_object_t *, const char *, va_list), isc_result_t(*)(omapi_object_t *, omapi_object_t *, omapi_object_t *), isc_result_t(*)(omapi_object_t **, omapi_object_t *, omapi_object_t *), isc_result_t(*)(omapi_object_t **, omapi_object_t *), isc_result_t(*)(omapi_object_t *, omapi_object_t *), isc_result_t(*)(omapi_object_t *, const char *, int), isc_result_t(*)(omapi_object_t **, const char *, int), isc_result_t(*)(size_t), size_t, isc_result_t(*)(omapi_object_t *, const char *, int), int)
struct group * root_group
dhcp_failover_state_t * failover_peer
isc_result_t dhcp_shared_network_set_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value)
#define OMAPI_OBJECT_ALLOC(name, stype, type)
log_fatal("no memory for uname information.")
#define DHCP_R_KEYCONFLICT
struct omapi_typed_data_t::@3::@4 buffer
isc_result_t dhcp_group_create(omapi_object_t **lp, omapi_object_t *id)
isc_result_t dhcp_group_lookup(omapi_object_t **lp, omapi_object_t *id, omapi_object_t *ref)
isc_result_t dhcp_group_destroy(omapi_object_t *h, const char *file, int line)
isc_result_t dhcp_group_remove(omapi_object_t *lp, omapi_object_t *id)
isc_result_t omapi_connection_put_uint32(omapi_object_t *, u_int32_t)
isc_result_t dhcp_control_create(omapi_object_t **lp, omapi_object_t *id)
isc_result_t dhcp_group_signal_handler(omapi_object_t *h, const char *name, va_list ap)
isc_result_t omapi_get_value_str(omapi_object_t *, omapi_object_t *, const char *, omapi_value_t **)
isc_result_t dhcp_group_set_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value)
omapi_object_type_t * dhcp_type_control
int group_dereference(struct group **ptr, const char *file, int line)
isc_result_t dhcp_subnet_create(omapi_object_t **lp, omapi_object_t *id)
int(* group_write_hook)(struct group_object *)
isc_result_t omapi_object_dereference(omapi_object_t **, const char *, int)
isc_result_t dhcp_subnet_set_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value)
isc_result_t dhcp_subnet_signal_handler(omapi_object_t *h, const char *name, va_list ap)
isc_result_t omapi_get_int_value(unsigned long *, omapi_typed_data_t *)
union omapi_typed_data_t::@3 u
isc_result_t dhcp_control_destroy(omapi_object_t *h, const char *file, int line)
isc_result_t dhcp_control_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *h)
isc_result_t omapi_handle_td_lookup(omapi_object_t **, omapi_typed_data_t *)
isc_result_t dhcp_group_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *h)
isc_result_t dhcp_shared_network_destroy(omapi_object_t *h, const char *file, int line)
isc_result_t dhcp_control_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)
#define GROUP_OBJECT_DELETED
void * dmalloc(size_t, const char *, int)
isc_result_t dhcp_shared_network_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)
isc_result_t dhcp_subnet_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)
isc_result_t omapi_connection_put_string(omapi_object_t *, const char *)
struct subnet * next_subnet
omapi_object_type_t * dhcp_type_group
dhcp_control_object_t * dhcp_control_object
isc_result_t dhcp_subnet_destroy(omapi_object_t *h, const char *file, int line)
isc_result_t omapi_value_dereference(omapi_value_t **, const char *, int)
isc_result_t dhcp_shared_network_remove(omapi_object_t *lp, omapi_object_t *id)
isc_result_t dhcp_subnet_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *h)
isc_result_t dhcp_subnet_remove(omapi_object_t *lp, omapi_object_t *id)
isc_result_t dhcp_subnet_lookup(omapi_object_t **lp, omapi_object_t *id, omapi_object_t *ref)
int omapi_ds_strcmp(omapi_data_string_t *, const char *)
isc_result_t supersede_group(struct group_object *group, int writep)
struct subnet * next_sibling
isc_result_t dhcp_shared_network_signal_handler(omapi_object_t *h, const char *name, va_list ap)
struct interface_info * interface
isc_result_t interface_setup()
isc_result_t dhcp_group_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)
group_hash_t * group_name_hash
isc_result_t dhcp_shared_network_create(omapi_object_t **lp, omapi_object_t *id)
isc_result_t dhcp_shared_network_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *h)
struct ipv6_pool ** pools
struct shared_network * next
isc_result_t omapi_connection_put_name(omapi_object_t *, const char *)
isc_result_t dhcp_set_control_state(control_object_state_t oldstate, control_object_state_t newstate)
int parse_executable_statements(struct executable_statement **statements, struct parse *cfile, int *lose, enum expression_context case_context)
void dhcp_common_objects_setup(void)
isc_result_t dhcp_shared_network_lookup(omapi_object_t **lp, omapi_object_t *id, omapi_object_t *ref)
int clone_group(struct group **gp, struct group *group, const char *file, int line)
struct interface_info * interface
isc_result_t new_parse(struct parse **cfile, int file, char *inbuf, unsigned buflen, const char *name, int eolp)
omapi_object_type_t * dhcp_type_subnet
isc_result_t dhcp_control_signal_handler(omapi_object_t *h, const char *name, va_list ap)
isc_result_t omapi_make_string_value(omapi_value_t **, omapi_data_string_t *, const char *, const char *, int)