1 #ifndef _ARPA_NAMESER_H_
3 #include <resolv/arpa/nameser.h>
7 /* If the machine allows unaligned access we can do better than using
8 the NS_GET16, NS_GET32, NS_PUT16, and NS_PUT32 macros from the
12 #include <netinet/in.h>
14 extern const struct _ns_flagdata _ns_flagdata
[] attribute_hidden
;
16 #if _STRING_ARCH_unaligned
19 # define NS_GET16(s, cp) \
21 const uint16_t *t_cp = (const uint16_t *) (cp); \
22 (s) = ntohs (*t_cp); \
27 # define NS_GET32(l, cp) \
29 const uint32_t *t_cp = (const uint32_t *) (cp); \
30 (l) = ntohl (*t_cp); \
35 # define NS_PUT16(s, cp) \
37 uint16_t *t_cp = (uint16_t *) (cp); \
43 # define NS_PUT32(l, cp) \
45 uint32_t *t_cp = (uint32_t *) (cp); \
52 extern unsigned int __ns_get16 (const unsigned char *) __THROW
;
53 extern unsigned long __ns_get32 (const unsigned char *) __THROW
;
54 int __ns_name_ntop (const unsigned char *, char *, size_t) __THROW
;
55 int __ns_name_unpack (const unsigned char *, const unsigned char *,
56 const unsigned char *, unsigned char *, size_t) __THROW
;
58 #define ns_msg_getflag(handle, flag) \
59 (((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift)
61 libresolv_hidden_proto (ns_get16
)
62 libresolv_hidden_proto (ns_get32
)
63 libresolv_hidden_proto (ns_put16
)
64 libresolv_hidden_proto (ns_put32
)
65 libresolv_hidden_proto (ns_initparse
)
66 libresolv_hidden_proto (ns_skiprr
)
67 libresolv_hidden_proto (ns_parserr
)
68 libresolv_hidden_proto (ns_name_ntop
)
69 libresolv_hidden_proto (ns_name_pton
)
70 libresolv_hidden_proto (ns_name_pack
)
71 libresolv_hidden_proto (ns_name_skip
)
72 libresolv_hidden_proto (ns_name_unpack
)
73 libresolv_hidden_proto (ns_name_compress
)
74 libresolv_hidden_proto (ns_name_uncompress
)
75 libresolv_hidden_proto (ns_sprintrr
)
76 libresolv_hidden_proto (ns_sprintrrf
)
77 libresolv_hidden_proto (ns_samedomain
)
78 libresolv_hidden_proto (ns_samename
)
79 libresolv_hidden_proto (ns_makecanon
)
80 libresolv_hidden_proto (ns_format_ttl
)
82 # endif /* !_ISOMAC */