resultclass.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2007, 2009, 2014  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 1999-2001  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id: resultclass.h,v 1.20 2009/09/02 23:48:03 tbox Exp $ */
00019 
00020 #ifndef ISC_RESULTCLASS_H
00021 #define ISC_RESULTCLASS_H 1
00022 
00023 
00024 /*! \file isc/resultclass.h
00025  * \brief Registry of Predefined Result Type Classes
00026  *
00027  * A result class number is an unsigned 16 bit number.  Each class may
00028  * contain up to 65536 results.  A result code is formed by adding the
00029  * result number within the class to the class number multiplied by 65536.
00030  *
00031  * Classes < 1024 are reserved for ISC use.
00032  * Result classes >= 1024 and <= 65535 are reserved for application use.
00033  */
00034 
00035 #define ISC_RESULTCLASS_FROMNUM(num)            ((num) << 16)
00036 #define ISC_RESULTCLASS_TONUM(rclass)           ((rclass) >> 16)
00037 #define ISC_RESULTCLASS_SIZE                    65536
00038 #define ISC_RESULTCLASS_INCLASS(rclass, result) \
00039         ((rclass) == ((result) & 0xFFFF0000))
00040 
00041 
00042 #define ISC_RESULTCLASS_ISC             ISC_RESULTCLASS_FROMNUM(0)
00043 #define ISC_RESULTCLASS_DNS             ISC_RESULTCLASS_FROMNUM(1)
00044 #define ISC_RESULTCLASS_DST             ISC_RESULTCLASS_FROMNUM(2)
00045 #define ISC_RESULTCLASS_DNSRCODE        ISC_RESULTCLASS_FROMNUM(3)
00046 #define ISC_RESULTCLASS_OMAPI           ISC_RESULTCLASS_FROMNUM(4)
00047 #define ISC_RESULTCLASS_ISCCC           ISC_RESULTCLASS_FROMNUM(5)
00048 #define ISC_RESULTCLASS_DHCP            ISC_RESULTCLASS_FROMNUM(6)
00049 #define ISC_RESULTCLASS_PK11            ISC_RESULTCLASS_FROMNUM(7)
00050 
00051 #endif /* ISC_RESULTCLASS_H */

Generated on Tue Apr 28 17:41:04 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha