confpvt.h revision 9c3531d72aeaad6c5f01efe6a1c82023e1379e4d
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence/*
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 1999, 2000 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence *
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * SOFTWARE.
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence */
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence/* $Id: confpvt.h,v 1.8 2000/06/22 21:55:01 tale Exp $ */
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence#ifndef CONFIG_CONFPVT_H
bff64bf12b58a6f80e740e94f2e42a32df18113aEvan Hunt#define CONFIG_CONFPVT_H 1
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence/*****
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence ***** Module Info
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence *****/
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence#include <isc/boolean.h>
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence/*
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * Some private definitions for config module internal use.
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence */
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence/*
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * Various structures keep track of whether fields have been assigned
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence * to. They do this with a bit field.
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence */
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence#define DNS_C_SETBITS_SIZE (sizeof(dns_c_setbits_t) * 8)
3398334b3acda24b086957286288ca9852662b12Automatic Updater#define DNS_C_SETBIT(bit, flags) \
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence (*(flags) |= ((dns_c_setbits_t)1 << (bit)))
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#define DNS_C_CLEARBIT(bit, flags) \
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence (*(flags) &= ~((dns_c_setbits_t)1 << (bit)))
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence#define DNS_C_CHECKBIT(bit,flags) \
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence ISC_TF((*(flags) & ((dns_c_setbits_t)1 << (bit))) == \
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence ((dns_c_setbits_t)1 << (bit)))
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence#endif /* CONFIG_CONFPVT_H */
d209a6737398070a405ed4261f22f5e98d249e93David Lawrence