3 Subroutines providing general support for objects. */
6 * Copyright (c) 1999-2000 Internet Software Consortium.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of The Internet Software Consortium nor the names
19 * of its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
23 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
24 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
27 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
30 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
33 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * This software has been written for the Internet Software Consortium
37 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
38 * To learn more about the Internet Software Consortium, see
39 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
40 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
41 * ``http://www.nominum.com''.
47 #include <omapip/omapip.h>
49 typedef isc_result_t dhcpctl_status
;
50 typedef omapi_object_t
*dhcpctl_handle
;
51 typedef omapi_data_string_t
*dhcpctl_data_string
;
53 #define DHCPCTL_CREATE 1
54 #define DHCPCTL_UPDATE 2
55 #define DHCPCTL_EXCL 4
58 OMAPI_OBJECT_PREAMBLE
;
59 omapi_object_t
*object
;
61 void (*callback
) (dhcpctl_handle
, dhcpctl_status
, void *);
62 } dhcpctl_callback_object_t
;
65 OMAPI_OBJECT_PREAMBLE
;
66 omapi_typed_data_t
*rtype
;
67 isc_result_t waitstatus
;
68 omapi_typed_data_t
*message
;
69 omapi_handle_t remote_handle
;
70 } dhcpctl_remote_object_t
;
73 /* for some reason, these cause problems when included in C++ classes */
74 omapi_object_type_t
*dhcpctl_callback_type
;
75 omapi_object_type_t
*dhcpctl_remote_type
;
78 dhcpctl_status
dhcpctl_initialize (void);
79 dhcpctl_status
dhcpctl_connect (dhcpctl_handle
*,
80 const char *, int, dhcpctl_handle
);
81 dhcpctl_status
dhcpctl_wait_for_completion (dhcpctl_handle
, dhcpctl_status
*);
82 dhcpctl_status
dhcpctl_get_value (dhcpctl_data_string
*,
83 dhcpctl_handle
, const char *);
84 dhcpctl_status
dhcpctl_get_boolean (int *, dhcpctl_handle
, const char *);
85 dhcpctl_status
dhcpctl_set_value (dhcpctl_handle
,
86 dhcpctl_data_string
, const char *);
87 dhcpctl_status
dhcpctl_set_string_value (dhcpctl_handle
, const char *,
89 dhcpctl_status
dhcpctl_set_boolean_value (dhcpctl_handle
, int, const char *);
90 dhcpctl_status
dhcpctl_set_int_value (dhcpctl_handle
, int, const char *);
91 dhcpctl_status
dhcpctl_object_update (dhcpctl_handle
, dhcpctl_handle
);
92 dhcpctl_status
dhcpctl_object_refresh (dhcpctl_handle
, dhcpctl_handle
);
93 dhcpctl_status
dhcpctl_object_remove (dhcpctl_handle
, dhcpctl_handle
);
95 dhcpctl_status
dhcpctl_set_callback (dhcpctl_handle
, void *,
96 void (*) (dhcpctl_handle
,
97 dhcpctl_status
, void *));
98 isc_result_t
dhcpctl_callback_set_value (omapi_object_t
*, omapi_object_t
*,
99 omapi_data_string_t
*,
100 omapi_typed_data_t
*);
101 isc_result_t
dhcpctl_callback_get_value (omapi_object_t
*, omapi_object_t
*,
102 omapi_data_string_t
*,
104 isc_result_t
dhcpctl_callback_destroy (omapi_object_t
*, const char *, int);
105 isc_result_t
dhcpctl_callback_signal_handler (omapi_object_t
*,
106 const char *, va_list);
107 isc_result_t
dhcpctl_callback_stuff_values (omapi_object_t
*,
111 dhcpctl_status
dhcpctl_open_object (dhcpctl_handle
, dhcpctl_handle
, int);
112 dhcpctl_status
dhcpctl_new_object (dhcpctl_handle
*,
113 dhcpctl_handle
, const char *);
114 isc_result_t
dhcpctl_remote_set_value (omapi_object_t
*, omapi_object_t
*,
115 omapi_data_string_t
*,
116 omapi_typed_data_t
*);
117 isc_result_t
dhcpctl_remote_get_value (omapi_object_t
*, omapi_object_t
*,
118 omapi_data_string_t
*,
120 isc_result_t
dhcpctl_remote_destroy (omapi_object_t
*, const char *, int);
121 isc_result_t
dhcpctl_remote_signal_handler (omapi_object_t
*,
122 const char *, va_list);
123 isc_result_t
dhcpctl_remote_stuff_values (omapi_object_t
*,
126 isc_result_t
dhcpctl_data_string_dereference (dhcpctl_data_string
*,
128 #endif /* _DHCPCTL_H_ */