lwsearch.h revision eb716d8c2e4b19b2e68ea8d87da4635ea877b3cd
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Copyright (C) 2000 Internet Software Consortium.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Permission to use, copy, modify, and distribute this software for any
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * purpose with or without fee is hereby granted, provided that the above
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * copyright notice and this permission notice appear in all copies.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
eb716d8c2e4b19b2e68ea8d87da4635ea877b3cdBrian Wellington/* $Id: lwsearch.h,v 1.2 2000/10/28 00:09:46 bwelling Exp $ */
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Lightweight resolver search list types and routines.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * An ns_lwsearchlist_t holds a list of search path elements.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * An ns_lwsearchctx stores the state of search list during a lookup
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington unsigned int refs;
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchlist_create(isc_mem_t *mctx, ns_lwsearchlist_t **listp);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Create an empty search list object.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchlist_attach(ns_lwsearchlist_t *source, ns_lwsearchlist_t **target);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Attach to a search list object.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchlist_detach(ns_lwsearchlist_t **listp);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Detach from a search list object.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchlist_append(ns_lwsearchlist_t *list, dns_name_t *name);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Append an element to a search list. This creates a copy of the name.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchctx_init(ns_lwsearchctx_t *sctx, ns_lwsearchlist_t *list,
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Creates a search list context structure.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchctx_first(ns_lwsearchctx_t *sctx);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Moves the search list context iterator to the first element, which
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * is usually the exact name.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchctx_next(ns_lwsearchctx_t *sctx);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Moves the search list context iterator to the next element.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellingtonns_lwsearchctx_current(ns_lwsearchctx_t *sctx, dns_name_t *absname);
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * Obtains the current name to be looked up. This involves either
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * concatenating the name with a search path element, making an
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington * exact name absolute, or doing nothing.
38379c5c5e07535f6a8934e6088f475534390405Brian Wellington#endif /* NAMED_LWSEARCH_H */