From: Ted Lemon Date: Thu, 9 Sep 1999 23:28:26 +0000 (+0000) Subject: Add remote-handle to remote object. X-Git-Tag: V3-BETA-1-PATCH-2~5^2~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5423ffabc85a9e1703a2005a10f8e5fdc0cbb77;p=thirdparty%2Fdhcp.git Add remote-handle to remote object. --- diff --git a/dhcpctl/dhcpctl.h b/dhcpctl/dhcpctl.h index ec58381f9..96b1d8446 100644 --- a/dhcpctl/dhcpctl.h +++ b/dhcpctl/dhcpctl.h @@ -42,6 +42,7 @@ typedef struct { omapi_typed_data_t *rtype; isc_result_t waitstatus; omapi_typed_data_t *message; + omapi_handle_t remote_handle; } dhcpctl_remote_object_t; omapi_object_type_t *dhcpctl_callback_type; @@ -59,6 +60,7 @@ dhcpctl_status dhcpctl_set_string_value (dhcpctl_handle, char *, char *); dhcpctl_status dhcpctl_set_boolean_value (dhcpctl_handle, int, char *); dhcpctl_status dhcpctl_object_update (dhcpctl_handle, dhcpctl_handle); dhcpctl_status dhcpctl_object_refresh (dhcpctl_handle, dhcpctl_handle); +dhcpctl_status dhcpctl_object_delete (dhcpctl_handle, dhcpctl_handle); dhcpctl_status dhcpctl_set_callback (dhcpctl_handle, void *, void (*) (dhcpctl_handle, diff --git a/dhcpctl/remote.c b/dhcpctl/remote.c index b5e0a29be..aa95742e7 100644 --- a/dhcpctl/remote.c +++ b/dhcpctl/remote.c @@ -184,8 +184,15 @@ isc_result_t dhcpctl_remote_set_value (omapi_object_t *h, omapi_data_string_t *name, omapi_typed_data_t *value) { + dhcpctl_remote_object_t *ro; if (h -> type != dhcpctl_remote_type) return ISC_R_INVALIDARG; + ro = (dhcpctl_remote_object_t *)h; + + if (!omapi_ds_strcmp (name, "remote-handle")) { + return omapi_get_int_value (&ro -> remote_handle, + value); + } if (h -> inner && h -> inner -> type -> set_value) return (*(h -> inner -> type -> set_value))