Files
bind9/lib/isc/include/isc/magic.h
T
Michael Graff 5d9d8d114f Add magic.h, which should eventually contain all isc magic numbers, perhaps
macros to validate structures using them, and perhaps a do-all function
which can be used by debugging code to identify a structure and print
the contents by calling the correct dump function.
1999-09-25 01:23:39 +00:00

30 lines
1.0 KiB
C

/*
* Copyright (C) 1999 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef ISC_MAGIC_H
#define ISC_MAGIC_H
#include <isc/lang.h>
ISC_LANG_BEGINDECLS
#define ISC_MAGIC_VALID(a,b) (((a) != NULL) && ((a)->magic == (b)))
ISC_LANG_ENDDECLS
#endif /* ISC_MAGIC_H */