/*
* Copyright (C) 2000, 2001, 2004-2007, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: sortlist.c,v 1.17 2007/09/14 01:46:05 marka Exp $ */
/*! \file */
#include <config.h>
#include <named/sortlist.h>
const void **argp)
{
unsigned int i;
goto dont_sort;
/*
* 'e' refers to the current 'top level statement'
* in the sortlist (see ARM).
*/
if (e->type == dns_aclelementtype_nestedacl) {
try_elt = e;
goto dont_sort;
goto dont_sort;
else {
}
} else {
/*
* BIND 8 allows bare elements at the top level
* as an undocumented feature.
*/
try_elt = e;
}
&matched_elt)) {
return (NS_SORTLISTTYPE_2ELEMENT);
return (NS_SORTLISTTYPE_2ELEMENT);
return (NS_SORTLISTTYPE_2ELEMENT);
} else {
/*
* BIND 8 allows a bare IP prefix as
* the 2nd element of a 2-element
* sortlist statement.
*/
return (NS_SORTLISTTYPE_1ELEMENT);
}
} else {
*argp = matched_elt;
return (NS_SORTLISTTYPE_1ELEMENT);
}
}
}
/* No match; don't sort. */
return (NS_SORTLISTTYPE_NONE);
}
int
int match;
if (match > 0)
return (match);
else if (match < 0)
else
return (INT_MAX / 2);
}
int
NULL)) {
return (0);
} else {
return (INT_MAX);
}
}
void
const void **argp)
{
switch (sortlisttype) {
case NS_SORTLISTTYPE_1ELEMENT:
break;
case NS_SORTLISTTYPE_2ELEMENT:
break;
case NS_SORTLISTTYPE_NONE:
break;
default:
"unexpected return from ns_sortlist_setup(): "
"%d", sortlisttype);
break;
}
}