[BACK]Return to lookup.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mpl / bind / dist / lib / dns / include / dns

Annotation of src/external/mpl/bind/dist/lib/dns/include/dns/lookup.h, Revision 1.1

1.1     ! christos    1: /*     $NetBSD$        */
        !             2:
        !             3: /*
        !             4:  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
        !             5:  *
        !             6:  * This Source Code Form is subject to the terms of the Mozilla Public
        !             7:  * License, v. 2.0. If a copy of the MPL was not distributed with this
        !             8:  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
        !             9:  *
        !            10:  * See the COPYRIGHT file distributed with this work for additional
        !            11:  * information regarding copyright ownership.
        !            12:  */
        !            13:
        !            14:
        !            15: #ifndef DNS_LOOKUP_H
        !            16: #define DNS_LOOKUP_H 1
        !            17:
        !            18: /*****
        !            19:  ***** Module Info
        !            20:  *****/
        !            21:
        !            22: /*! \file dns/lookup.h
        !            23:  * \brief
        !            24:  * The lookup module performs simple DNS lookups.  It implements
        !            25:  * the full resolver algorithm, both looking for local data and
        !            26:  * resolving external names as necessary.
        !            27:  *
        !            28:  * MP:
        !            29:  *\li  The module ensures appropriate synchronization of data structures it
        !            30:  *     creates and manipulates.
        !            31:  *
        !            32:  * Reliability:
        !            33:  *\li  No anticipated impact.
        !            34:  *
        !            35:  * Resources:
        !            36:  *\li  TBS
        !            37:  *
        !            38:  * Security:
        !            39:  *\li  No anticipated impact.
        !            40:  *
        !            41:  * Standards:
        !            42:  *\li  RFCs:   1034, 1035, 2181, TBS
        !            43:  *\li  Drafts: TBS
        !            44:  */
        !            45:
        !            46: #include <isc/lang.h>
        !            47: #include <isc/event.h>
        !            48:
        !            49: #include <dns/types.h>
        !            50:
        !            51: ISC_LANG_BEGINDECLS
        !            52:
        !            53: /*%
        !            54:  * A 'dns_lookupevent_t' is returned when a lookup completes.
        !            55:  * The sender field will be set to the lookup that completed.  If 'result'
        !            56:  * is ISC_R_SUCCESS, then 'names' will contain a list of names associated
        !            57:  * with the address.  The recipient of the event must not change the list
        !            58:  * and must not refer to any of the name data after the event is freed.
        !            59:  */
        !            60: typedef struct dns_lookupevent {
        !            61:        ISC_EVENT_COMMON(struct dns_lookupevent);
        !            62:        isc_result_t                    result;
        !            63:        dns_name_t                      *name;
        !            64:        dns_rdataset_t                  *rdataset;
        !            65:        dns_rdataset_t                  *sigrdataset;
        !            66:        dns_db_t                        *db;
        !            67:        dns_dbnode_t                    *node;
        !            68: } dns_lookupevent_t;
        !            69:
        !            70: isc_result_t
        !            71: dns_lookup_create(isc_mem_t *mctx, const dns_name_t *name, dns_rdatatype_t type,
        !            72:                  dns_view_t *view, unsigned int options, isc_task_t *task,
        !            73:                  isc_taskaction_t action, void *arg, dns_lookup_t **lookupp);
        !            74: /*%<
        !            75:  * Finds the rrsets matching 'name' and 'type'.
        !            76:  *
        !            77:  * Requires:
        !            78:  *
        !            79:  *\li  'mctx' is a valid mctx.
        !            80:  *
        !            81:  *\li  'name' is a valid name.
        !            82:  *
        !            83:  *\li  'view' is a valid view which has a resolver.
        !            84:  *
        !            85:  *\li  'task' is a valid task.
        !            86:  *
        !            87:  *\li  lookupp != NULL && *lookupp == NULL
        !            88:  *
        !            89:  * Returns:
        !            90:  *
        !            91:  *\li  ISC_R_SUCCESS
        !            92:  *\li  ISC_R_NOMEMORY
        !            93:  *
        !            94:  *\li  Any resolver-related error (e.g. ISC_R_SHUTTINGDOWN) may also be
        !            95:  *     returned.
        !            96:  */
        !            97:
        !            98: void
        !            99: dns_lookup_cancel(dns_lookup_t *lookup);
        !           100: /*%<
        !           101:  * Cancel 'lookup'.
        !           102:  *
        !           103:  * Notes:
        !           104:  *
        !           105:  *\li  If 'lookup' has not completed, post its LOOKUPDONE event with a
        !           106:  *     result code of ISC_R_CANCELED.
        !           107:  *
        !           108:  * Requires:
        !           109:  *
        !           110:  *\li  'lookup' is a valid lookup.
        !           111:  */
        !           112:
        !           113: void
        !           114: dns_lookup_destroy(dns_lookup_t **lookupp);
        !           115: /*%<
        !           116:  * Destroy 'lookup'.
        !           117:  *
        !           118:  * Requires:
        !           119:  *
        !           120:  *\li  '*lookupp' is a valid lookup.
        !           121:  *
        !           122:  *\li  The caller has received the LOOKUPDONE event (either because the
        !           123:  *     lookup completed or because dns_lookup_cancel() was called).
        !           124:  *
        !           125:  * Ensures:
        !           126:  *
        !           127:  *\li  *lookupp == NULL.
        !           128:  */
        !           129:
        !           130: ISC_LANG_ENDDECLS
        !           131:
        !           132: #endif /* DNS_LOOKUP_H */

CVSweb <webmaster@jp.NetBSD.org>