"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/isc/include/isc/resultclass.h" (4 Sep 2020, 1596 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "resultclass.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef ISC_RESULTCLASS_H
   13 #define ISC_RESULTCLASS_H 1
   14 
   15 /*! \file isc/resultclass.h
   16  * \brief Registry of Predefined Result Type Classes
   17  *
   18  * A result class number is an unsigned 16 bit number.  Each class may
   19  * contain up to 65536 results.  A result code is formed by adding the
   20  * result number within the class to the class number multiplied by 65536.
   21  *
   22  * Classes < 1024 are reserved for ISC use.
   23  * Result classes >= 1024 and <= 65535 are reserved for application use.
   24  */
   25 
   26 #define ISC_RESULTCLASS_FROMNUM(num)  ((num) << 16)
   27 #define ISC_RESULTCLASS_TONUM(rclass) ((rclass) >> 16)
   28 #define ISC_RESULTCLASS_SIZE          65536
   29 #define ISC_RESULTCLASS_INCLASS(rclass, result) \
   30     ((rclass) == ((result)&0xFFFF0000))
   31 
   32 #define ISC_RESULTCLASS_ISC  ISC_RESULTCLASS_FROMNUM(0)
   33 #define ISC_RESULTCLASS_DNS  ISC_RESULTCLASS_FROMNUM(1)
   34 #define ISC_RESULTCLASS_DST  ISC_RESULTCLASS_FROMNUM(2)
   35 #define ISC_RESULTCLASS_DNSRCODE ISC_RESULTCLASS_FROMNUM(3)
   36 #define ISC_RESULTCLASS_OMAPI    ISC_RESULTCLASS_FROMNUM(4)
   37 #define ISC_RESULTCLASS_ISCCC    ISC_RESULTCLASS_FROMNUM(5)
   38 #define ISC_RESULTCLASS_DHCP     ISC_RESULTCLASS_FROMNUM(6)
   39 #define ISC_RESULTCLASS_PK11     ISC_RESULTCLASS_FROMNUM(7)
   40 
   41 #endif /* ISC_RESULTCLASS_H */