1 #ifndef _ARPA_NAMESER_H_
3 #include <resolv/arpa/nameser.h>
5 /* If the machine allows unaligned access we can do better than using
6 the NS_GET16, NS_GET32, NS_PUT16, and NS_PUT32 macros from the
10 #include <netinet/in.h>
12 extern const struct _ns_flagdata _ns_flagdata
[] attribute_hidden
;
14 #if _STRING_ARCH_unaligned
17 # define NS_GET16(s, cp) \
19 const uint16_t *t_cp = (const uint16_t *) (cp); \
20 (s) = ntohs (*t_cp); \
25 # define NS_GET32(l, cp) \
27 const uint32_t *t_cp = (const uint32_t *) (cp); \
28 (l) = ntohl (*t_cp); \
33 # define NS_PUT16(s, cp) \
35 uint16_t *t_cp = (uint16_t *) (cp); \
41 # define NS_PUT32(l, cp) \
43 uint32_t *t_cp = (uint32_t *) (cp); \
50 extern u_int
__ns_get16 (const u_char
*) __THROW
;
51 extern u_long
__ns_get32 (const u_char
*) __THROW
;
53 #define ns_msg_getflag(handle, flag) \
54 (((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift)
56 libresolv_hidden_proto (ns_get16
)
57 libresolv_hidden_proto (ns_get32
)
58 libresolv_hidden_proto (ns_put16
)
59 libresolv_hidden_proto (ns_put32
)
60 libresolv_hidden_proto (ns_initparse
)
61 libresolv_hidden_proto (ns_skiprr
)
62 libresolv_hidden_proto (ns_parserr
)
63 libresolv_hidden_proto (ns_name_ntop
)
64 libresolv_hidden_proto (ns_name_pton
)
65 libresolv_hidden_proto (ns_name_pack
)
66 libresolv_hidden_proto (ns_name_skip
)
67 libresolv_hidden_proto (ns_name_unpack
)
68 libresolv_hidden_proto (ns_name_compress
)
69 libresolv_hidden_proto (ns_name_uncompress
)
70 libresolv_hidden_proto (ns_sprintrr
)
71 libresolv_hidden_proto (ns_sprintrrf
)
72 libresolv_hidden_proto (ns_samedomain
)
73 libresolv_hidden_proto (ns_samename
)
74 libresolv_hidden_proto (ns_makecanon
)
75 libresolv_hidden_proto (ns_format_ttl
)