order.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 2002  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id: order.h,v 1.9 2007/06/19 23:47:17 tbox Exp $ */
00019 
00020 #ifndef DNS_ORDER_H
00021 #define DNS_ORDER_H 1
00022 
00023 /*! \file dns/order.h */
00024 
00025 #include <isc/lang.h>
00026 #include <isc/types.h>
00027 
00028 #include <dns/types.h>
00029 
00030 ISC_LANG_BEGINDECLS
00031 
00032 isc_result_t
00033 dns_order_create(isc_mem_t *mctx, dns_order_t **orderp);
00034 /*%<
00035  * Create a order object.
00036  *
00037  * Requires:
00038  * \li  'orderp' to be non NULL and '*orderp == NULL'.
00039  *\li   'mctx' to be valid.
00040  *
00041  * Returns:
00042  *\li   ISC_R_SUCCESS
00043  *\li   ISC_R_NOMEMORY
00044  */
00045 
00046 isc_result_t
00047 dns_order_add(dns_order_t *order, dns_name_t *name,
00048               dns_rdatatype_t rdtype, dns_rdataclass_t rdclass,
00049               unsigned int mode);
00050 /*%<
00051  * Add a entry to the end of the order list.
00052  *
00053  * Requires:
00054  * \li  'order' to be valid.
00055  *\li   'name' to be valid.
00056  *\li   'mode' to be one of #DNS_RDATASERATTR_RANDOMIZE,
00057  *              #DNS_RDATASERATTR_RANDOMIZE or zero (#DNS_RDATASERATTR_CYCLIC).
00058  *
00059  * Returns:
00060  *\li   #ISC_R_SUCCESS
00061  *\li   #ISC_R_NOMEMORY
00062  */
00063 
00064 unsigned int
00065 dns_order_find(dns_order_t *order, dns_name_t *name,
00066                dns_rdatatype_t rdtype, dns_rdataclass_t rdclass);
00067 /*%<
00068  * Find the first matching entry on the list.
00069  *
00070  * Requires:
00071  *\li   'order' to be valid.
00072  *\li   'name' to be valid.
00073  *
00074  * Returns the mode set by dns_order_add() or zero.
00075  */
00076 
00077 void
00078 dns_order_attach(dns_order_t *source, dns_order_t **target);
00079 /*%<
00080  * Attach to the 'source' object.
00081  *
00082  * Requires:
00083  * \li  'source' to be valid.
00084  *\li   'target' to be non NULL and '*target == NULL'.
00085  */
00086 
00087 void
00088 dns_order_detach(dns_order_t **orderp);
00089 /*%<
00090  * Detach from the object.  Clean up if last this was the last
00091  * reference.
00092  *
00093  * Requires:
00094  *\li   '*orderp' to be valid.
00095  */
00096 
00097 ISC_LANG_ENDDECLS
00098 
00099 #endif /* DNS_ORDER_H */

Generated on Tue Apr 28 17:40:57 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha