1 /* $NetBSD: dhcpctl.h,v 1.1.1.4 2014/07/12 11:57:51 spz Exp $ */
2 /* Id: dhcpctl.h,v 1.18 2009/11/24 02:06:56 sar Exp
4 Subroutines providing general support for objects. */
7 * Copyright (c) 2004,2009,2014 by Internet Systems Consortium, Inc. ("ISC")
8 * Copyright (c) 1999-2003 by Internet Software Consortium
10 * Permission to use, copy, modify, and distribute this software for any
11 * purpose with or without fee is hereby granted, provided that the above
12 * copyright notice and this permission notice appear in all copies.
14 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
20 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 * Internet Systems Consortium, Inc.
24 * Redwood City, CA 94063
26 * https://www.isc.org/
33 #include <omapip/omapip.h>
35 typedef isc_result_t dhcpctl_status
;
36 typedef omapi_object_t
*dhcpctl_handle
;
37 typedef omapi_data_string_t
*dhcpctl_data_string
;
39 #define dhcpctl_null_handle ((dhcpctl_handle) 0)
41 #define DHCPCTL_CREATE OMAPI_CREATE
42 #define DHCPCTL_UPDATE OMAPI_UPDATE
43 #define DHCPCTL_EXCL OMAPI_EXCL
46 OMAPI_OBJECT_PREAMBLE
;
47 omapi_object_t
*object
;
49 void (*callback
) (dhcpctl_handle
, dhcpctl_status
, void *);
50 } dhcpctl_callback_object_t
;
53 OMAPI_OBJECT_PREAMBLE
;
54 omapi_typed_data_t
*rtype
;
55 isc_result_t waitstatus
;
56 omapi_typed_data_t
*message
;
57 omapi_handle_t remote_handle
;
58 } dhcpctl_remote_object_t
;
60 extern omapi_object_type_t
*dhcpctl_callback_type
;
61 extern omapi_object_type_t
*dhcpctl_remote_type
;
63 dhcpctl_status
dhcpctl_initialize (void);
64 dhcpctl_status
dhcpctl_connect (dhcpctl_handle
*,
65 const char *, int, dhcpctl_handle
);
66 dhcpctl_status
dhcpctl_wait_for_completion (dhcpctl_handle
, dhcpctl_status
*);
67 dhcpctl_status
dhcpctl_get_value (dhcpctl_data_string
*,
68 dhcpctl_handle
, const char *);
69 dhcpctl_status
dhcpctl_get_boolean (int *, dhcpctl_handle
, const char *);
70 dhcpctl_status
dhcpctl_set_value (dhcpctl_handle
,
71 dhcpctl_data_string
, const char *);
72 dhcpctl_status
dhcpctl_set_string_value (dhcpctl_handle
, const char *,
74 dhcpctl_status
dhcpctl_set_data_value (dhcpctl_handle
,
75 const char *, unsigned, const char *);
76 dhcpctl_status
dhcpctl_set_null_value (dhcpctl_handle
, const char *);
77 dhcpctl_status
dhcpctl_set_boolean_value (dhcpctl_handle
, int, const char *);
78 dhcpctl_status
dhcpctl_set_int_value (dhcpctl_handle
, int, const char *);
79 dhcpctl_status
dhcpctl_object_update (dhcpctl_handle
, dhcpctl_handle
);
80 dhcpctl_status
dhcpctl_object_refresh (dhcpctl_handle
, dhcpctl_handle
);
81 dhcpctl_status
dhcpctl_object_remove (dhcpctl_handle
, dhcpctl_handle
);
83 dhcpctl_status
dhcpctl_set_callback (dhcpctl_handle
, void *,
84 void (*) (dhcpctl_handle
,
85 dhcpctl_status
, void *));
86 isc_result_t
dhcpctl_callback_set_value (omapi_object_t
*, omapi_object_t
*,
87 omapi_data_string_t
*,
88 omapi_typed_data_t
*);
89 isc_result_t
dhcpctl_callback_get_value (omapi_object_t
*, omapi_object_t
*,
90 omapi_data_string_t
*,
92 isc_result_t
dhcpctl_callback_destroy (omapi_object_t
*, const char *, int);
93 isc_result_t
dhcpctl_callback_signal_handler (omapi_object_t
*,
94 const char *, va_list);
95 isc_result_t
dhcpctl_callback_stuff_values (omapi_object_t
*,
99 dhcpctl_status
dhcpctl_new_authenticator (dhcpctl_handle
*,
100 const char *, const char *,
101 const unsigned char *, unsigned);
103 dhcpctl_status
dhcpctl_open_object (dhcpctl_handle
, dhcpctl_handle
, int);
104 dhcpctl_status
dhcpctl_new_object (dhcpctl_handle
*,
105 dhcpctl_handle
, const char *);
106 isc_result_t
dhcpctl_remote_set_value (omapi_object_t
*, omapi_object_t
*,
107 omapi_data_string_t
*,
108 omapi_typed_data_t
*);
109 isc_result_t
dhcpctl_remote_get_value (omapi_object_t
*, omapi_object_t
*,
110 omapi_data_string_t
*,
112 isc_result_t
dhcpctl_remote_destroy (omapi_object_t
*, const char *, int);
113 isc_result_t
dhcpctl_remote_signal_handler (omapi_object_t
*,
114 const char *, va_list);
115 isc_result_t
dhcpctl_remote_stuff_values (omapi_object_t
*,
118 isc_result_t
dhcpctl_data_string_dereference (dhcpctl_data_string
*,
120 #endif /* _DHCPCTL_H_ */