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