2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2002 Internet Software Consortium.
5 * Permission to use, copy, modify, and 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.2.202.3 2004/03/08 09:04:37 marka Exp $ */
24 #include <isc/types.h>
26 #include <dns/types.h>
31 dns_order_create(isc_mem_t *mctx, dns_order_t **orderp);
33 * Create a order object.
36 * 'orderp' to be non NULL and '*orderp == NULL'.
45 dns_order_add(dns_order_t *order, dns_name_t *name,
46 dns_rdatatype_t rdtype, dns_rdataclass_t rdclass,
49 * Add a entry to the end of the order list.
52 * 'order' to be valid.
54 * 'mode' to be one of DNS_RDATASERATTR_RANDOMIZE,
55 * DNS_RDATASERATTR_RANDOMIZE or zero (DNS_RDATASERATTR_CYCLIC).
63 dns_order_find(dns_order_t *order, dns_name_t *name,
64 dns_rdatatype_t rdtype, dns_rdataclass_t rdclass);
66 * Find the first matching entry on the list.
69 * 'order' to be valid.
72 * Returns the mode set by dns_order_add() or zero.
76 dns_order_attach(dns_order_t *source, dns_order_t **target);
78 * Attach to the 'source' object.
81 * 'source' to be valid.
82 * 'target' to be non NULL and '*target == NULL'.
86 dns_order_detach(dns_order_t **orderp);
88 * Detach from the object. Clean up if last this was the last
92 * '*orderp' to be valid.
97 #endif /* DNS_ORDER_H */