00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _OMAPIP_H_
00031 #define _OMAPIP_H_
00032 #include "result.h"
00033 #include <stdarg.h>
00034
00035 #include <dns/tsec.h>
00036
00037 typedef unsigned int omapi_handle_t;
00038
00039 struct __omapi_object;
00040 typedef struct __omapi_object omapi_object_t;
00041
00042 typedef enum {
00043 omapi_datatype_int,
00044 omapi_datatype_string,
00045 omapi_datatype_data,
00046 omapi_datatype_object
00047 } omapi_datatype_t;
00048
00049 typedef struct {
00050 int refcnt;
00051 omapi_datatype_t type;
00052 union {
00053 struct {
00054 unsigned len;
00055 #define OMAPI_TYPED_DATA_NOBUFFER_LEN (sizeof (int) + \
00056 sizeof (omapi_datatype_t) + \
00057 sizeof (int))
00058 unsigned char value [1];
00059 } buffer;
00060 #define OMAPI_TYPED_DATA_OBJECT_LEN (sizeof (int) + \
00061 sizeof (omapi_datatype_t) + \
00062 sizeof (omapi_object_t *))
00063 omapi_object_t *object;
00064 #define OMAPI_TYPED_DATA_REF_LEN (sizeof (int) + \
00065 sizeof (omapi_datatype_t) + \
00066 3 * sizeof (void *))
00067 struct {
00068 void *ptr;
00069 isc_result_t (*reference) (void *,
00070 void *, const char *, int);
00071 isc_result_t (*dereference) (void *,
00072 const char *, int);
00073 } ref;
00074 #define OMAPI_TYPED_DATA_INT_LEN (sizeof (int) + \
00075 sizeof (omapi_datatype_t) + \
00076 sizeof (int))
00077 int integer;
00078 } u;
00079 } omapi_typed_data_t;
00080
00081 typedef struct {
00082 int refcnt;
00083 unsigned len;
00084 #define OMAPI_DATA_STRING_EMPTY_SIZE (2 * sizeof (int))
00085 unsigned char value [1];
00086 } omapi_data_string_t;
00087
00088 typedef struct {
00089 int refcnt;
00090 omapi_data_string_t *name;
00091 omapi_typed_data_t *value;
00092 } omapi_value_t;
00093
00094 typedef struct __omapi_object_type_t {
00095 const char *name;
00096 struct __omapi_object_type_t *next;
00097
00098 isc_result_t (*set_value) (omapi_object_t *, omapi_object_t *,
00099 omapi_data_string_t *,
00100 omapi_typed_data_t *);
00101 isc_result_t (*get_value) (omapi_object_t *,
00102 omapi_object_t *,
00103 omapi_data_string_t *, omapi_value_t **);
00104 isc_result_t (*destroy) (omapi_object_t *, const char *, int);
00105 isc_result_t (*signal_handler) (omapi_object_t *,
00106 const char *, va_list);
00107 isc_result_t (*stuff_values) (omapi_object_t *,
00108 omapi_object_t *, omapi_object_t *);
00109 isc_result_t (*lookup) (omapi_object_t **, omapi_object_t *,
00110 omapi_object_t *);
00111 isc_result_t (*create) (omapi_object_t **, omapi_object_t *);
00112 isc_result_t (*remove) (omapi_object_t *, omapi_object_t *);
00113 isc_result_t (*freer) (omapi_object_t *, const char *, int);
00114 isc_result_t (*allocator) (omapi_object_t **, const char *, int);
00115 isc_result_t (*sizer) (size_t);
00116 size_t size;
00117 int rc_flag;
00118 isc_result_t (*initialize) (omapi_object_t *, const char *, int);
00119 } omapi_object_type_t;
00120
00121 #define OMAPI_OBJECT_PREAMBLE \
00122 omapi_object_type_t *type; \
00123 int refcnt; \
00124 omapi_handle_t handle; \
00125 omapi_object_t *outer, *inner
00126
00127
00128 struct __omapi_object {
00129 OMAPI_OBJECT_PREAMBLE;
00130 };
00131
00132
00133 #define OMAPI_PROTOCOL_PORT 7911
00134
00135 typedef struct {
00136 unsigned addrtype;
00137 unsigned addrlen;
00138 unsigned char address [16];
00139 unsigned port;
00140 } omapi_addr_t;
00141
00142 typedef struct {
00143 int refcnt;
00144 unsigned count;
00145 omapi_addr_t *addresses;
00146 } omapi_addr_list_t;
00147
00148 typedef struct auth_key {
00149 OMAPI_OBJECT_PREAMBLE;
00150 char *name;
00151 char *algorithm;
00152 omapi_data_string_t *key;
00153 dns_tsec_t *tsec_key;
00154 } omapi_auth_key_t;
00155
00156 #define OMAPI_CREATE 1
00157 #define OMAPI_UPDATE 2
00158 #define OMAPI_EXCL 4
00159 #define OMAPI_NOTIFY_PROTOCOL 8
00160
00161 #define OMAPI_OBJECT_ALLOC(name, stype, type) \
00162 isc_result_t name##_allocate (stype **p, const char *file, int line) \
00163 { \
00164 return omapi_object_allocate ((omapi_object_t **)p, \
00165 type, 0, file, line); \
00166 } \
00167 \
00168 isc_result_t name##_reference (stype **pptr, stype *ptr, \
00169 const char *file, int line) \
00170 { \
00171 return omapi_object_reference ((omapi_object_t **)pptr, \
00172 (omapi_object_t *)ptr, file, line); \
00173 } \
00174 \
00175 isc_result_t name##_dereference (stype **ptr, const char *file, int line) \
00176 { \
00177 return omapi_object_dereference ((omapi_object_t **)ptr, file, line); \
00178 }
00179
00180 #define OMAPI_OBJECT_ALLOC_DECL(name, stype, type) \
00181 isc_result_t name##_allocate (stype **p, const char *file, int line); \
00182 isc_result_t name##_reference (stype **pptr, stype *ptr, \
00183 const char *file, int line); \
00184 isc_result_t name##_dereference (stype **ptr, const char *file, int line);
00185
00186 typedef isc_result_t (*omapi_array_ref_t) (char **, char *, const char *, int);
00187 typedef isc_result_t (*omapi_array_deref_t) (char **, const char *, int);
00188
00189
00190 typedef struct {
00191 char **data;
00192 omapi_array_ref_t ref;
00193 omapi_array_deref_t deref;
00194 int count;
00195 int max;
00196 } omapi_array_t;
00197
00198 #define OMAPI_ARRAY_TYPE(name, stype) \
00199 isc_result_t name##_array_allocate (omapi_array_t **p, \
00200 const char *file, int line) \
00201 { \
00202 return (omapi_array_allocate \
00203 (p, \
00204 (omapi_array_ref_t)name##_reference, \
00205 (omapi_array_deref_t)name##_dereference, \
00206 file, line)); \
00207 } \
00208 \
00209 isc_result_t name##_array_free (omapi_array_t **p, \
00210 const char *file, int line) \
00211 { \
00212 return omapi_array_free (p, file, line); \
00213 } \
00214 \
00215 isc_result_t name##_array_extend (omapi_array_t *pptr, stype *ptr, int *index,\
00216 const char *file, int line) \
00217 { \
00218 return omapi_array_extend (pptr, (char *)ptr, index, file, line); \
00219 } \
00220 \
00221 isc_result_t name##_array_set (omapi_array_t *pptr, stype *ptr, int index, \
00222 const char *file, int line) \
00223 { \
00224 return omapi_array_set (pptr, (char *)ptr, index, file, line); \
00225 } \
00226 \
00227 isc_result_t name##_array_lookup (stype **ptr, omapi_array_t *pptr, \
00228 int index, const char *file, int line) \
00229 { \
00230 return omapi_array_lookup ((char **)ptr, pptr, index, file, line); \
00231 }
00232
00233 #define OMAPI_ARRAY_TYPE_DECL(name, stype) \
00234 isc_result_t name##_array_allocate (omapi_array_t **, const char *, int); \
00235 isc_result_t name##_array_free (omapi_array_t **, const char *, int); \
00236 isc_result_t name##_array_extend (omapi_array_t *, stype *, int *, \
00237 const char *, int); \
00238 isc_result_t name##_array_set (omapi_array_t *, \
00239 stype *, int, const char *, int); \
00240 isc_result_t name##_array_lookup (stype **, \
00241 omapi_array_t *, int, const char *, int)
00242
00243 #define omapi_array_foreach_begin(array, stype, var) \
00244 { \
00245 int omapi_array_foreach_index; \
00246 stype *var = (stype *)0; \
00247 for (omapi_array_foreach_index = 0; \
00248 array && \
00249 omapi_array_foreach_index < (array) -> count; \
00250 omapi_array_foreach_index++) { \
00251 if ((array) -> data [omapi_array_foreach_index]) { \
00252 ((*(array) -> ref) \
00253 ((char **)&var, \
00254 (array) -> data [omapi_array_foreach_index],\
00255 MDL));
00256
00257 #define omapi_array_foreach_end(array, stype, var) \
00258 (*(array) -> deref) ((char **)&var, MDL); \
00259 } \
00260 } \
00261 }
00262
00263 isc_result_t omapi_protocol_connect (omapi_object_t *,
00264 const char *, unsigned, omapi_object_t *);
00265 isc_result_t omapi_connect_list (omapi_object_t *, omapi_addr_list_t *,
00266 omapi_addr_t *);
00267 isc_result_t omapi_protocol_listen (omapi_object_t *, unsigned, int);
00268 isc_boolean_t omapi_protocol_authenticated (omapi_object_t *);
00269 isc_result_t omapi_protocol_configure_security (omapi_object_t *,
00270 isc_result_t (*)
00271 (omapi_object_t *,
00272 omapi_addr_t *),
00273 isc_result_t (*)
00274 (omapi_object_t *,
00275 omapi_auth_key_t *));
00276 isc_result_t omapi_protocol_accept (omapi_object_t *);
00277 isc_result_t omapi_protocol_send_intro (omapi_object_t *, unsigned, unsigned);
00278 isc_result_t omapi_protocol_ready (omapi_object_t *);
00279 isc_result_t omapi_protocol_add_auth (omapi_object_t *, omapi_object_t *,
00280 omapi_handle_t);
00281 isc_result_t omapi_protocol_lookup_auth (omapi_object_t **, omapi_object_t *,
00282 omapi_handle_t);
00283 isc_result_t omapi_protocol_set_value (omapi_object_t *, omapi_object_t *,
00284 omapi_data_string_t *,
00285 omapi_typed_data_t *);
00286 isc_result_t omapi_protocol_get_value (omapi_object_t *, omapi_object_t *,
00287 omapi_data_string_t *,
00288 omapi_value_t **);
00289 isc_result_t omapi_protocol_stuff_values (omapi_object_t *,
00290 omapi_object_t *,
00291 omapi_object_t *);
00292
00293 isc_result_t omapi_protocol_destroy (omapi_object_t *, const char *, int);
00294 isc_result_t omapi_protocol_send_message (omapi_object_t *,
00295 omapi_object_t *,
00296 omapi_object_t *,
00297 omapi_object_t *);
00298 isc_result_t omapi_protocol_signal_handler (omapi_object_t *,
00299 const char *, va_list);
00300 isc_result_t omapi_protocol_listener_set_value (omapi_object_t *,
00301 omapi_object_t *,
00302 omapi_data_string_t *,
00303 omapi_typed_data_t *);
00304 isc_result_t omapi_protocol_listener_get_value (omapi_object_t *,
00305 omapi_object_t *,
00306 omapi_data_string_t *,
00307 omapi_value_t **);
00308 isc_result_t omapi_protocol_listener_destroy (omapi_object_t *,
00309 const char *, int);
00310 isc_result_t omapi_protocol_listener_signal (omapi_object_t *,
00311 const char *, va_list);
00312 isc_result_t omapi_protocol_listener_stuff (omapi_object_t *,
00313 omapi_object_t *,
00314 omapi_object_t *);
00315 isc_result_t omapi_protocol_send_status (omapi_object_t *, omapi_object_t *,
00316 isc_result_t, unsigned, const char *);
00317 isc_result_t omapi_protocol_send_open (omapi_object_t *, omapi_object_t *,
00318 const char *, omapi_object_t *,
00319 unsigned);
00320 isc_result_t omapi_protocol_send_update (omapi_object_t *, omapi_object_t *,
00321 unsigned, omapi_object_t *);
00322
00323 isc_result_t omapi_connect (omapi_object_t *, const char *, unsigned);
00324 isc_result_t omapi_disconnect (omapi_object_t *, int);
00325 int omapi_connection_readfd (omapi_object_t *);
00326 int omapi_connection_writefd (omapi_object_t *);
00327 isc_result_t omapi_connection_connect (omapi_object_t *);
00328 isc_result_t omapi_connection_reader (omapi_object_t *);
00329 isc_result_t omapi_connection_writer (omapi_object_t *);
00330 isc_result_t omapi_connection_reaper (omapi_object_t *);
00331 isc_result_t omapi_connection_output_auth_length (omapi_object_t *,
00332 unsigned *);
00333 isc_result_t omapi_connection_set_value (omapi_object_t *, omapi_object_t *,
00334 omapi_data_string_t *,
00335 omapi_typed_data_t *);
00336 isc_result_t omapi_connection_get_value (omapi_object_t *, omapi_object_t *,
00337 omapi_data_string_t *,
00338 omapi_value_t **);
00339 isc_result_t omapi_connection_destroy (omapi_object_t *, const char *, int);
00340 isc_result_t omapi_connection_signal_handler (omapi_object_t *,
00341 const char *, va_list);
00342 isc_result_t omapi_connection_stuff_values (omapi_object_t *,
00343 omapi_object_t *,
00344 omapi_object_t *);
00345 isc_result_t omapi_connection_write_typed_data (omapi_object_t *,
00346 omapi_typed_data_t *);
00347 isc_result_t omapi_connection_put_name (omapi_object_t *, const char *);
00348 isc_result_t omapi_connection_put_string (omapi_object_t *, const char *);
00349 isc_result_t omapi_connection_put_handle (omapi_object_t *c,
00350 omapi_object_t *h);
00351 isc_result_t omapi_connection_put_named_uint32 (omapi_object_t *,
00352 const char *,
00353 u_int32_t);
00354 isc_result_t omapi_listen (omapi_object_t *, unsigned, int);
00355 isc_result_t omapi_listen_addr (omapi_object_t *,
00356 omapi_addr_t *, int);
00357 isc_result_t omapi_listener_accept (omapi_object_t *);
00358 int omapi_listener_readfd (omapi_object_t *);
00359 isc_result_t omapi_accept (omapi_object_t *);
00360 isc_result_t omapi_listener_configure_security (omapi_object_t *,
00361 isc_result_t (*)
00362 (omapi_object_t *,
00363 omapi_addr_t *));
00364 isc_result_t omapi_listener_set_value (omapi_object_t *, omapi_object_t *,
00365 omapi_data_string_t *,
00366 omapi_typed_data_t *);
00367 isc_result_t omapi_listener_get_value (omapi_object_t *, omapi_object_t *,
00368 omapi_data_string_t *,
00369 omapi_value_t **);
00370 isc_result_t omapi_listener_destroy (omapi_object_t *, const char *, int);
00371 isc_result_t omapi_listener_signal_handler (omapi_object_t *,
00372 const char *, va_list);
00373 isc_result_t omapi_listener_stuff_values (omapi_object_t *,
00374 omapi_object_t *,
00375 omapi_object_t *);
00376
00377 isc_result_t omapi_register_io_object (omapi_object_t *,
00378 int (*)(omapi_object_t *),
00379 int (*)(omapi_object_t *),
00380 isc_result_t (*)(omapi_object_t *),
00381 isc_result_t (*)(omapi_object_t *),
00382 isc_result_t (*)(omapi_object_t *));
00383 isc_result_t omapi_reregister_io_object (omapi_object_t *,
00384 int (*)(omapi_object_t *),
00385 int (*)(omapi_object_t *),
00386 isc_result_t (*)(omapi_object_t *),
00387 isc_result_t (*)(omapi_object_t *),
00388 isc_result_t (*)(omapi_object_t *));
00389 isc_result_t omapi_unregister_io_object (omapi_object_t *);
00390 isc_result_t omapi_dispatch (struct timeval *);
00391 isc_result_t omapi_wait_for_completion (omapi_object_t *, struct timeval *);
00392 isc_result_t omapi_one_dispatch (omapi_object_t *, struct timeval *);
00393 isc_result_t omapi_io_set_value (omapi_object_t *, omapi_object_t *,
00394 omapi_data_string_t *,
00395 omapi_typed_data_t *);
00396 isc_result_t omapi_io_get_value (omapi_object_t *, omapi_object_t *,
00397 omapi_data_string_t *, omapi_value_t **);
00398 isc_result_t omapi_io_destroy (omapi_object_t *, const char *, int);
00399 isc_result_t omapi_io_signal_handler (omapi_object_t *, const char *, va_list);
00400 isc_result_t omapi_io_stuff_values (omapi_object_t *,
00401 omapi_object_t *,
00402 omapi_object_t *);
00403 isc_result_t omapi_waiter_signal_handler (omapi_object_t *,
00404 const char *, va_list);
00405 isc_result_t omapi_io_state_foreach (isc_result_t (*func) (omapi_object_t *,
00406 void *),
00407 void *p);
00408
00409 isc_result_t omapi_generic_new (omapi_object_t **, const char *, int);
00410 isc_result_t omapi_generic_set_value (omapi_object_t *, omapi_object_t *,
00411 omapi_data_string_t *,
00412 omapi_typed_data_t *);
00413 isc_result_t omapi_generic_get_value (omapi_object_t *, omapi_object_t *,
00414 omapi_data_string_t *,
00415 omapi_value_t **);
00416 isc_result_t omapi_generic_destroy (omapi_object_t *, const char *, int);
00417 isc_result_t omapi_generic_signal_handler (omapi_object_t *,
00418 const char *, va_list);
00419 isc_result_t omapi_generic_stuff_values (omapi_object_t *,
00420 omapi_object_t *,
00421 omapi_object_t *);
00422 isc_result_t omapi_generic_clear_flags (omapi_object_t *);
00423
00424 isc_result_t omapi_message_new (omapi_object_t **, const char *, int);
00425 isc_result_t omapi_message_set_value (omapi_object_t *, omapi_object_t *,
00426 omapi_data_string_t *,
00427 omapi_typed_data_t *);
00428 isc_result_t omapi_message_get_value (omapi_object_t *, omapi_object_t *,
00429 omapi_data_string_t *,
00430 omapi_value_t **);
00431 isc_result_t omapi_message_destroy (omapi_object_t *, const char *, int);
00432 isc_result_t omapi_message_signal_handler (omapi_object_t *,
00433 const char *, va_list);
00434 isc_result_t omapi_message_stuff_values (omapi_object_t *,
00435 omapi_object_t *,
00436 omapi_object_t *);
00437 isc_result_t omapi_message_register (omapi_object_t *);
00438 isc_result_t omapi_message_unregister (omapi_object_t *);
00439 isc_result_t omapi_message_process (omapi_object_t *, omapi_object_t *);
00440
00441 OMAPI_OBJECT_ALLOC_DECL (omapi_auth_key,
00442 omapi_auth_key_t, omapi_type_auth_key)
00443 isc_result_t omapi_auth_key_new (omapi_auth_key_t **, const char *, int);
00444 isc_result_t omapi_auth_key_destroy (omapi_object_t *, const char *, int);
00445 isc_result_t omapi_auth_key_enter (omapi_auth_key_t *);
00446 isc_result_t omapi_auth_key_lookup_name (omapi_auth_key_t **, const char *);
00447 isc_result_t omapi_auth_key_lookup (omapi_object_t **,
00448 omapi_object_t *,
00449 omapi_object_t *);
00450 isc_result_t omapi_auth_key_get_value (omapi_object_t *, omapi_object_t *,
00451 omapi_data_string_t *,
00452 omapi_value_t **);
00453 isc_result_t omapi_auth_key_stuff_values (omapi_object_t *,
00454 omapi_object_t *,
00455 omapi_object_t *);
00456
00457 extern omapi_object_type_t *omapi_type_connection;
00458 extern omapi_object_type_t *omapi_type_listener;
00459 extern omapi_object_type_t *omapi_type_io_object;
00460 extern omapi_object_type_t *omapi_type_generic;
00461 extern omapi_object_type_t *omapi_type_protocol;
00462 extern omapi_object_type_t *omapi_type_protocol_listener;
00463 extern omapi_object_type_t *omapi_type_waiter;
00464 extern omapi_object_type_t *omapi_type_remote;
00465 extern omapi_object_type_t *omapi_type_message;
00466 extern omapi_object_type_t *omapi_type_auth_key;
00467
00468 extern omapi_object_type_t *omapi_object_types;
00469
00470 void omapi_type_relinquish (void);
00471 isc_result_t omapi_init (void);
00472 isc_result_t omapi_object_type_register (omapi_object_type_t **,
00473 const char *,
00474 isc_result_t (*)
00475 (omapi_object_t *,
00476 omapi_object_t *,
00477 omapi_data_string_t *,
00478 omapi_typed_data_t *),
00479 isc_result_t (*)
00480 (omapi_object_t *,
00481 omapi_object_t *,
00482 omapi_data_string_t *,
00483 omapi_value_t **),
00484 isc_result_t (*) (omapi_object_t *,
00485 const char *, int),
00486 isc_result_t (*) (omapi_object_t *,
00487 const char *,
00488 va_list),
00489 isc_result_t (*) (omapi_object_t *,
00490 omapi_object_t *,
00491 omapi_object_t *),
00492 isc_result_t (*) (omapi_object_t **,
00493 omapi_object_t *,
00494 omapi_object_t *),
00495 isc_result_t (*) (omapi_object_t **,
00496 omapi_object_t *),
00497 isc_result_t (*) (omapi_object_t *,
00498 omapi_object_t *),
00499 isc_result_t (*) (omapi_object_t *,
00500 const char *, int),
00501 isc_result_t (*) (omapi_object_t **,
00502 const char *, int),
00503 isc_result_t (*) (size_t), size_t,
00504 isc_result_t (*) (omapi_object_t *,
00505 const char *, int),
00506 int);
00507 isc_result_t omapi_signal (omapi_object_t *, const char *, ...);
00508 isc_result_t omapi_signal_in (omapi_object_t *, const char *, ...);
00509 isc_result_t omapi_set_value (omapi_object_t *, omapi_object_t *,
00510 omapi_data_string_t *,
00511 omapi_typed_data_t *);
00512 isc_result_t omapi_set_value_str (omapi_object_t *, omapi_object_t *,
00513 const char *, omapi_typed_data_t *);
00514 isc_result_t omapi_set_boolean_value (omapi_object_t *, omapi_object_t *,
00515 const char *, int);
00516 isc_result_t omapi_set_int_value (omapi_object_t *, omapi_object_t *,
00517 const char *, int);
00518 isc_result_t omapi_set_object_value (omapi_object_t *, omapi_object_t *,
00519 const char *, omapi_object_t *);
00520 isc_result_t omapi_set_string_value (omapi_object_t *, omapi_object_t *,
00521 const char *, const char *);
00522 isc_result_t omapi_get_value (omapi_object_t *, omapi_object_t *,
00523 omapi_data_string_t *,
00524 omapi_value_t **);
00525 isc_result_t omapi_get_value_str (omapi_object_t *, omapi_object_t *,
00526 const char *, omapi_value_t **);
00527 isc_result_t omapi_stuff_values (omapi_object_t *,
00528 omapi_object_t *,
00529 omapi_object_t *);
00530 isc_result_t omapi_object_create (omapi_object_t **, omapi_object_t *,
00531 omapi_object_type_t *);
00532 isc_result_t omapi_object_update (omapi_object_t *, omapi_object_t *,
00533 omapi_object_t *, omapi_handle_t);
00534 int omapi_data_string_cmp (omapi_data_string_t *, omapi_data_string_t *);
00535 int omapi_ds_strcmp (omapi_data_string_t *, const char *);
00536 int omapi_td_strcmp (omapi_typed_data_t *, const char *);
00537 int omapi_td_strcasecmp (omapi_typed_data_t *, const char *);
00538 isc_result_t omapi_make_value (omapi_value_t **, omapi_data_string_t *,
00539 omapi_typed_data_t *, const char *, int);
00540 isc_result_t omapi_make_const_value (omapi_value_t **, omapi_data_string_t *,
00541 const unsigned char *,
00542 unsigned, const char *, int);
00543 isc_result_t omapi_make_int_value (omapi_value_t **, omapi_data_string_t *,
00544 int, const char *, int);
00545 isc_result_t omapi_make_uint_value (omapi_value_t **, omapi_data_string_t *,
00546 unsigned int, const char *, int);
00547 isc_result_t omapi_make_object_value (omapi_value_t **, omapi_data_string_t *,
00548 omapi_object_t *, const char *, int);
00549 isc_result_t omapi_make_handle_value (omapi_value_t **, omapi_data_string_t *,
00550 omapi_object_t *, const char *, int);
00551 isc_result_t omapi_make_string_value (omapi_value_t **, omapi_data_string_t *,
00552 const char *, const char *, int);
00553 isc_result_t omapi_get_int_value (unsigned long *, omapi_typed_data_t *);
00554
00555 isc_result_t omapi_object_handle (omapi_handle_t *, omapi_object_t *);
00556 isc_result_t omapi_handle_lookup (omapi_object_t **, omapi_handle_t);
00557 isc_result_t omapi_handle_td_lookup (omapi_object_t **, omapi_typed_data_t *);
00558
00559 void * dmalloc (unsigned, const char *, int);
00560 void dfree (void *, const char *, int);
00561 #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
00562 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
00563 void dmalloc_reuse (void *, const char *, int, int);
00564 void dmalloc_dump_outstanding (void);
00565 #else
00566 #define dmalloc_reuse(x,y,l,z)
00567 #endif
00568 #define MDL __FILE__, __LINE__
00569 #if defined (DEBUG_RC_HISTORY)
00570 void dump_rc_history (void *);
00571 void rc_history_next (int);
00572 #endif
00573 void omapi_print_dmalloc_usage_by_caller (void);
00574 isc_result_t omapi_object_allocate (omapi_object_t **,
00575 omapi_object_type_t *,
00576 size_t, const char *, int);
00577 isc_result_t omapi_object_initialize (omapi_object_t *,
00578 omapi_object_type_t *,
00579 size_t, size_t, const char *, int);
00580 isc_result_t omapi_object_reference (omapi_object_t **,
00581 omapi_object_t *, const char *, int);
00582 isc_result_t omapi_object_dereference (omapi_object_t **, const char *, int);
00583 isc_result_t omapi_typed_data_new (const char *, int, omapi_typed_data_t **,
00584 omapi_datatype_t, ...);
00585 isc_result_t omapi_typed_data_reference (omapi_typed_data_t **,
00586 omapi_typed_data_t *,
00587 const char *, int);
00588 isc_result_t omapi_typed_data_dereference (omapi_typed_data_t **,
00589 const char *, int);
00590 isc_result_t omapi_data_string_new (omapi_data_string_t **,
00591 unsigned, const char *, int);
00592 isc_result_t omapi_data_string_reference (omapi_data_string_t **,
00593 omapi_data_string_t *,
00594 const char *, int);
00595 isc_result_t omapi_data_string_dereference (omapi_data_string_t **,
00596 const char *, int);
00597 isc_result_t omapi_value_new (omapi_value_t **, const char *, int);
00598 isc_result_t omapi_value_reference (omapi_value_t **,
00599 omapi_value_t *, const char *, int);
00600 isc_result_t omapi_value_dereference (omapi_value_t **, const char *, int);
00601 isc_result_t omapi_addr_list_new (omapi_addr_list_t **, unsigned,
00602 const char *, int);
00603 isc_result_t omapi_addr_list_reference (omapi_addr_list_t **,
00604 omapi_addr_list_t *,
00605 const char *, int);
00606 isc_result_t omapi_addr_list_dereference (omapi_addr_list_t **,
00607 const char *, int);
00608
00609 isc_result_t omapi_array_allocate (omapi_array_t **, omapi_array_ref_t,
00610 omapi_array_deref_t, const char *, int);
00611 isc_result_t omapi_array_free (omapi_array_t **, const char *, int);
00612 isc_result_t omapi_array_extend (omapi_array_t *, char *, int *,
00613 const char *, int);
00614 isc_result_t omapi_array_set (omapi_array_t *, void *, int, const char *, int);
00615 isc_result_t omapi_array_lookup (char **,
00616 omapi_array_t *, int, const char *, int);
00617 OMAPI_ARRAY_TYPE_DECL(omapi_object, omapi_object_t);
00618 #endif