2 * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2002 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: order.h,v 1.9 2007/06/19 23:47:17 tbox Exp $ */
23 /*! \file dns/order.h */
26 #include <isc/types.h>
28 #include <dns/types.h>
33 dns_order_create(isc_mem_t *mctx, dns_order_t **orderp);
35 * Create a order object.
38 * \li 'orderp' to be non NULL and '*orderp == NULL'.
39 *\li 'mctx' to be valid.
47 dns_order_add(dns_order_t *order, dns_name_t *name,
48 dns_rdatatype_t rdtype, dns_rdataclass_t rdclass,
51 * Add a entry to the end of the order list.
54 * \li 'order' to be valid.
55 *\li 'name' to be valid.
56 *\li 'mode' to be one of #DNS_RDATASERATTR_RANDOMIZE,
57 * #DNS_RDATASERATTR_RANDOMIZE or zero (#DNS_RDATASERATTR_CYCLIC).
65 dns_order_find(dns_order_t *order, dns_name_t *name,
66 dns_rdatatype_t rdtype, dns_rdataclass_t rdclass);
68 * Find the first matching entry on the list.
71 *\li 'order' to be valid.
72 *\li 'name' to be valid.
74 * Returns the mode set by dns_order_add() or zero.
78 dns_order_attach(dns_order_t *source, dns_order_t **target);
80 * Attach to the 'source' object.
83 * \li 'source' to be valid.
84 *\li 'target' to be non NULL and '*target == NULL'.
88 dns_order_detach(dns_order_t **orderp);
90 * Detach from the object. Clean up if last this was the last
94 *\li '*orderp' to be valid.
99 #endif /* DNS_ORDER_H */