sortlist.c revision 34613b2e39478a83076f6a626a4b855cebb19533
1336066b632d14017167c052fae5eb4df64726deDanny Mayer * Copyright (C) 2000, 2001 Internet Software Consortium.
1336066b632d14017167c052fae5eb4df64726deDanny Mayer * Permission to use, copy, modify, and distribute this software for any
1336066b632d14017167c052fae5eb4df64726deDanny Mayer * purpose with or without fee is hereby granted, provided that the above
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews * copyright notice and this permission notice appear in all copies.
7641867b4c39914cdcd3711ba0c89ed9c49f3c83Francis Dupont * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
b4eaa17e82f439a0b70b1b7079d1592564d9f621Mark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
b4eaa17e82f439a0b70b1b7079d1592564d9f621Mark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1336066b632d14017167c052fae5eb4df64726deDanny Mayer * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews/* $Id: sortlist.c,v 1.5 2001/03/26 23:36:00 gson Exp $ */
1336066b632d14017167c052fae5eb4df64726deDanny Mayerns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews unsigned int i;
7641867b4c39914cdcd3711ba0c89ed9c49f3c83Francis Dupont * 'e' refers to the current 'top level statement'
5a61d4774900ea2c14b71b90c9a705a3f08234beMark Andrews * in the sortlist (see ARM).
goto dont_sort;
goto dont_sort;
&matchelt)) {
goto dont_sort;
return (NS_SORTLISTTYPE_2ELEMENT);
return (NS_SORTLISTTYPE_1ELEMENT);
return (NS_SORTLISTTYPE_NONE);
int match;
if (match > 0)
return (match);
else if (match < 0)
NULL)) {
return (INT_MAX);
void **argp)
switch (sortlisttype) {
case NS_SORTLISTTYPE_1ELEMENT:
case NS_SORTLISTTYPE_2ELEMENT:
case NS_SORTLISTTYPE_NONE: