Annotation of embedaddon/dhcp/dhcpctl/dhcpctl.h, revision 1.1

1.1     ! misho       1: /* $Id: dhcpctl.h,v 1.16.786.2 2009-07-24 22:04:52 sar Exp $
        !             2: 
        !             3:    Subroutines providing general support for objects. */
        !             4: 
        !             5: /*
        !             6:  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
        !             7:  * Copyright (c) 1999-2003 by Internet Software Consortium
        !             8:  *
        !             9:  * Permission to use, copy, modify, and distribute this software for any
        !            10:  * purpose with or without fee is hereby granted, provided that the above
        !            11:  * copyright notice and this permission notice appear in all copies.
        !            12:  *
        !            13:  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
        !            14:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
        !            15:  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
        !            16:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
        !            17:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
        !            18:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
        !            19:  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
        !            20:  *
        !            21:  *   Internet Systems Consortium, Inc.
        !            22:  *   950 Charter Street
        !            23:  *   Redwood City, CA 94063
        !            24:  *   <info@isc.org>
        !            25:  *   https://www.isc.org/
        !            26:  *
        !            27:  * This software has been written for Internet Systems Consortium
        !            28:  * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
        !            29:  * To learn more about Internet Systems Consortium, see
        !            30:  * ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
        !            31:  * see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
        !            32:  * ``http://www.nominum.com''.
        !            33:  */
        !            34: 
        !            35: #ifndef _DHCPCTL_H_
        !            36: #define _DHCPCTL_H_
        !            37: 
        !            38: #include <omapip/omapip.h>
        !            39: 
        !            40: typedef isc_result_t dhcpctl_status;
        !            41: typedef omapi_object_t *dhcpctl_handle;
        !            42: typedef omapi_data_string_t *dhcpctl_data_string;
        !            43: 
        !            44: #define dhcpctl_null_handle ((dhcpctl_handle) 0)
        !            45: 
        !            46: #define DHCPCTL_CREATE         OMAPI_CREATE
        !            47: #define DHCPCTL_UPDATE         OMAPI_UPDATE
        !            48: #define DHCPCTL_EXCL           OMAPI_EXCL
        !            49: 
        !            50: typedef struct {
        !            51:        OMAPI_OBJECT_PREAMBLE;
        !            52:        omapi_object_t *object;
        !            53:        void *data;
        !            54:        void (*callback) (dhcpctl_handle, dhcpctl_status, void *);
        !            55: } dhcpctl_callback_object_t;
        !            56: 
        !            57: typedef struct {
        !            58:        OMAPI_OBJECT_PREAMBLE;
        !            59:        omapi_typed_data_t *rtype;
        !            60:        isc_result_t waitstatus;
        !            61:        omapi_typed_data_t *message;
        !            62:        omapi_handle_t remote_handle;
        !            63: } dhcpctl_remote_object_t;
        !            64: 
        !            65: extern omapi_object_type_t *dhcpctl_callback_type;
        !            66: extern omapi_object_type_t *dhcpctl_remote_type;
        !            67: 
        !            68: dhcpctl_status dhcpctl_initialize (void);
        !            69: dhcpctl_status dhcpctl_connect (dhcpctl_handle *,
        !            70:                                const char *, int, dhcpctl_handle);
        !            71: dhcpctl_status dhcpctl_wait_for_completion (dhcpctl_handle, dhcpctl_status *);
        !            72: dhcpctl_status dhcpctl_get_value (dhcpctl_data_string *,
        !            73:                                  dhcpctl_handle, const char *);
        !            74: dhcpctl_status dhcpctl_get_boolean (int *, dhcpctl_handle, const char *);
        !            75: dhcpctl_status dhcpctl_set_value (dhcpctl_handle,
        !            76:                                  dhcpctl_data_string, const char *);
        !            77: dhcpctl_status dhcpctl_set_string_value (dhcpctl_handle, const char *,
        !            78:                                         const char *);
        !            79: dhcpctl_status dhcpctl_set_data_value (dhcpctl_handle,
        !            80:                                       const char *, unsigned, const char *);
        !            81: dhcpctl_status dhcpctl_set_null_value (dhcpctl_handle, const char *);
        !            82: dhcpctl_status dhcpctl_set_boolean_value (dhcpctl_handle, int, const char *);
        !            83: dhcpctl_status dhcpctl_set_int_value (dhcpctl_handle, int, const char *);
        !            84: dhcpctl_status dhcpctl_object_update (dhcpctl_handle, dhcpctl_handle);
        !            85: dhcpctl_status dhcpctl_object_refresh (dhcpctl_handle, dhcpctl_handle);
        !            86: dhcpctl_status dhcpctl_object_remove (dhcpctl_handle, dhcpctl_handle);
        !            87: 
        !            88: dhcpctl_status dhcpctl_set_callback (dhcpctl_handle, void *,
        !            89:                                     void (*) (dhcpctl_handle,
        !            90:                                               dhcpctl_status, void *));
        !            91: isc_result_t dhcpctl_callback_set_value  (omapi_object_t *, omapi_object_t *,
        !            92:                                          omapi_data_string_t *,
        !            93:                                          omapi_typed_data_t *);
        !            94: isc_result_t dhcpctl_callback_get_value (omapi_object_t *, omapi_object_t *,
        !            95:                                         omapi_data_string_t *,
        !            96:                                         omapi_value_t **); 
        !            97: isc_result_t dhcpctl_callback_destroy (omapi_object_t *, const char *, int);
        !            98: isc_result_t dhcpctl_callback_signal_handler (omapi_object_t *,
        !            99:                                              const char *, va_list);
        !           100: isc_result_t dhcpctl_callback_stuff_values (omapi_object_t *,
        !           101:                                            omapi_object_t *,
        !           102:                                            omapi_object_t *);
        !           103: 
        !           104: dhcpctl_status dhcpctl_new_authenticator (dhcpctl_handle *,
        !           105:                                          const char *, const char *,
        !           106:                                          const unsigned char *, unsigned);
        !           107: 
        !           108: dhcpctl_status dhcpctl_open_object (dhcpctl_handle, dhcpctl_handle, int);
        !           109: dhcpctl_status dhcpctl_new_object (dhcpctl_handle *,
        !           110:                                   dhcpctl_handle, const char *);
        !           111: isc_result_t dhcpctl_remote_set_value  (omapi_object_t *, omapi_object_t *,
        !           112:                                        omapi_data_string_t *,
        !           113:                                        omapi_typed_data_t *);
        !           114: isc_result_t dhcpctl_remote_get_value (omapi_object_t *, omapi_object_t *,
        !           115:                                       omapi_data_string_t *,
        !           116:                                       omapi_value_t **); 
        !           117: isc_result_t dhcpctl_remote_destroy (omapi_object_t *, const char *, int);
        !           118: isc_result_t dhcpctl_remote_signal_handler (omapi_object_t *,
        !           119:                                            const char *, va_list);
        !           120: isc_result_t dhcpctl_remote_stuff_values (omapi_object_t *,
        !           121:                                          omapi_object_t *,
        !           122:                                          omapi_object_t *);
        !           123: isc_result_t dhcpctl_data_string_dereference (dhcpctl_data_string *,
        !           124:                                              const char *, int);
        !           125: #endif /* _DHCPCTL_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>