Detect FPU by checking CPUID features.
[dragonfly.git] / contrib / bind-9.5.2 / lib / dns / include / dns / fixedname.h
blob5a2aaf333e487a9d1bb4cbea02b7b5e51c0e14ed
1 /*
2 * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: fixedname.h,v 1.19 2007/06/19 23:47:16 tbox Exp $ */
20 #ifndef DNS_FIXEDNAME_H
21 #define DNS_FIXEDNAME_H 1
23 /*****
24 ***** Module Info
25 *****/
27 /*! \file dns/fixedname.h
28 * \brief
29 * Fixed-size Names
31 * dns_fixedname_t is a convenience type containing a name, an offsets table,
32 * and a dedicated buffer big enough for the longest possible name.
34 * MP:
35 *\li The caller must ensure any required synchronization.
37 * Reliability:
38 *\li No anticipated impact.
40 * Resources:
41 *\li Per dns_fixedname_t:
42 *\code
43 * sizeof(dns_name_t) + sizeof(dns_offsets_t) +
44 * sizeof(isc_buffer_t) + 255 bytes + structure padding
45 *\endcode
47 * Security:
48 *\li No anticipated impact.
50 * Standards:
51 *\li None.
54 /*****
55 ***** Imports
56 *****/
58 #include <isc/buffer.h>
60 #include <dns/name.h>
62 /*****
63 ***** Types
64 *****/
66 struct dns_fixedname {
67 dns_name_t name;
68 dns_offsets_t offsets;
69 isc_buffer_t buffer;
70 unsigned char data[DNS_NAME_MAXWIRE];
73 #define dns_fixedname_init(fn) \
74 do { \
75 dns_name_init(&((fn)->name), (fn)->offsets); \
76 isc_buffer_init(&((fn)->buffer), (fn)->data, \
77 DNS_NAME_MAXWIRE); \
78 dns_name_setbuffer(&((fn)->name), &((fn)->buffer)); \
79 } while (0)
81 #define dns_fixedname_invalidate(fn) \
82 dns_name_invalidate(&((fn)->name))
84 #define dns_fixedname_name(fn) (&((fn)->name))
86 #endif /* DNS_FIXEDNAME_H */