]> git.ipfire.org Git - thirdparty/dhcp.git/blob - dhcpctl/dhcpctl.h
Fix compilation errors introduced in the last set of checkins.
[thirdparty/dhcp.git] / dhcpctl / dhcpctl.h
1 /* dhcpctl.h
2
3 Subroutines providing general support for objects. */
4
5 /*
6 * Copyright (c) 1996-1999 Internet Software Consortium.
7 * Use is subject to license terms which appear in the file named
8 * ISC-LICENSE that should have accompanied this file when you
9 * received it. If a file named ISC-LICENSE did not accompany this
10 * file, or you are not sure the one you have is correct, you may
11 * obtain an applicable copy of the license at:
12 *
13 * http://www.isc.org/isc-license-1.0.html.
14 *
15 * This file is part of the ISC DHCP distribution. The documentation
16 * associated with this file is listed in the file DOCUMENTATION,
17 * included in the top-level directory of this release.
18 *
19 * Support and other services are available for ISC products - see
20 * http://www.isc.org for more information.
21 */
22
23 #ifndef _DHCPCTL_H_
24 #define _DHCPCTL_H_
25
26 #include <omapip/omapip.h>
27
28 typedef isc_result_t dhcpctl_status;
29 typedef omapi_object_t *dhcpctl_handle;
30 typedef omapi_data_string_t *dhcpctl_data_string;
31
32 #define DHCPCTL_CREATE 1
33 #define DHCPCTL_UPDATE 2
34 #define DHCPCTL_EXCL 4
35
36 typedef struct {
37 OMAPI_OBJECT_PREAMBLE;
38 omapi_object_t *object;
39 void *data;
40 void (*callback) (dhcpctl_handle, dhcpctl_status, void *);
41 } dhcpctl_callback_object_t;
42
43 typedef struct {
44 OMAPI_OBJECT_PREAMBLE;
45 omapi_typed_data_t *rtype;
46 isc_result_t waitstatus;
47 omapi_typed_data_t *message;
48 omapi_handle_t remote_handle;
49 } dhcpctl_remote_object_t;
50
51 #ifndef __cplusplus
52 /* for some reason, these cause problems when included in C++ classes */
53 omapi_object_type_t *dhcpctl_callback_type;
54 omapi_object_type_t *dhcpctl_remote_type;
55 #endif
56
57 dhcpctl_status dhcpctl_initialize (void);
58 dhcpctl_status dhcpctl_connect (dhcpctl_handle *,
59 const char *, int, dhcpctl_handle);
60 dhcpctl_status dhcpctl_wait_for_completion (dhcpctl_handle, dhcpctl_status *);
61 dhcpctl_status dhcpctl_get_value (dhcpctl_data_string *,
62 dhcpctl_handle, const char *);
63 dhcpctl_status dhcpctl_get_boolean (int *, dhcpctl_handle, const char *);
64 dhcpctl_status dhcpctl_set_value (dhcpctl_handle,
65 dhcpctl_data_string, const char *);
66 dhcpctl_status dhcpctl_set_string_value (dhcpctl_handle, const char *,
67 const char *);
68 dhcpctl_status dhcpctl_set_boolean_value (dhcpctl_handle, int, const char *);
69 dhcpctl_status dhcpctl_set_int_value (dhcpctl_handle, int, const char *);
70 dhcpctl_status dhcpctl_object_update (dhcpctl_handle, dhcpctl_handle);
71 dhcpctl_status dhcpctl_object_refresh (dhcpctl_handle, dhcpctl_handle);
72 dhcpctl_status dhcpctl_object_remove (dhcpctl_handle, dhcpctl_handle);
73
74 dhcpctl_status dhcpctl_set_callback (dhcpctl_handle, void *,
75 void (*) (dhcpctl_handle,
76 dhcpctl_status, void *));
77 isc_result_t dhcpctl_callback_set_value (omapi_object_t *, omapi_object_t *,
78 omapi_data_string_t *,
79 omapi_typed_data_t *);
80 isc_result_t dhcpctl_callback_get_value (omapi_object_t *, omapi_object_t *,
81 omapi_data_string_t *,
82 omapi_value_t **);
83 isc_result_t dhcpctl_callback_destroy (omapi_object_t *, const char *, int);
84 isc_result_t dhcpctl_callback_signal_handler (omapi_object_t *,
85 const char *, va_list);
86 isc_result_t dhcpctl_callback_stuff_values (omapi_object_t *,
87 omapi_object_t *,
88 omapi_object_t *);
89
90 dhcpctl_status dhcpctl_open_object (dhcpctl_handle, dhcpctl_handle, int);
91 dhcpctl_status dhcpctl_new_object (dhcpctl_handle *,
92 dhcpctl_handle, const char *);
93 isc_result_t dhcpctl_remote_set_value (omapi_object_t *, omapi_object_t *,
94 omapi_data_string_t *,
95 omapi_typed_data_t *);
96 isc_result_t dhcpctl_remote_get_value (omapi_object_t *, omapi_object_t *,
97 omapi_data_string_t *,
98 omapi_value_t **);
99 isc_result_t dhcpctl_remote_destroy (omapi_object_t *, const char *, int);
100 isc_result_t dhcpctl_remote_signal_handler (omapi_object_t *,
101 const char *, va_list);
102 isc_result_t dhcpctl_remote_stuff_values (omapi_object_t *,
103 omapi_object_t *,
104 omapi_object_t *);
105 isc_result_t dhcpctl_data_string_dereference (dhcpctl_data_string *,
106 const char *, int);
107 #endif /* _DHCPCTL_H_ */