15 uint32_t random_weight
;
19 } kms_server_dns_t
, *kms_server_dns_ptr
;
26 unsigned char name
[1];
27 } dns_srv_record_t
, *dns_srv_record_ptr
;
30 typedef enum __ns_type
{
31 ns_t_invalid
= 0, /*%< Cookie. */
32 ns_t_a
= 1, /*%< Host address. */
33 ns_t_ns
= 2, /*%< Authoritative server. */
34 ns_t_md
= 3, /*%< Mail destination. */
35 ns_t_mf
= 4, /*%< Mail forwarder. */
36 ns_t_cname
= 5, /*%< Canonical name. */
37 ns_t_soa
= 6, /*%< Start of authority zone. */
38 ns_t_mb
= 7, /*%< Mailbox domain name. */
39 ns_t_mg
= 8, /*%< Mail group member. */
40 ns_t_mr
= 9, /*%< Mail rename name. */
41 ns_t_null
= 10, /*%< Null resource record. */
42 ns_t_wks
= 11, /*%< Well known service. */
43 ns_t_ptr
= 12, /*%< Domain name pointer. */
44 ns_t_hinfo
= 13, /*%< Host information. */
45 ns_t_minfo
= 14, /*%< Mailbox information. */
46 ns_t_mx
= 15, /*%< Mail routing information. */
47 ns_t_txt
= 16, /*%< Text strings. */
48 ns_t_rp
= 17, /*%< Responsible person. */
49 ns_t_afsdb
= 18, /*%< AFS cell database. */
50 ns_t_x25
= 19, /*%< X_25 calling address. */
51 ns_t_isdn
= 20, /*%< ISDN calling address. */
52 ns_t_rt
= 21, /*%< Router. */
53 ns_t_nsap
= 22, /*%< NSAP address. */
54 ns_t_nsap_ptr
= 23, /*%< Reverse NSAP lookup (deprecated). */
55 ns_t_sig
= 24, /*%< Security signature. */
56 ns_t_key
= 25, /*%< Security key. */
57 ns_t_px
= 26, /*%< X.400 mail mapping. */
58 ns_t_gpos
= 27, /*%< Geographical position (withdrawn). */
59 ns_t_aaaa
= 28, /*%< Ip6 Address. */
60 ns_t_loc
= 29, /*%< Location Information. */
61 ns_t_nxt
= 30, /*%< Next domain (security). */
62 ns_t_eid
= 31, /*%< Endpoint identifier. */
63 ns_t_nimloc
= 32, /*%< Nimrod Locator. */
64 ns_t_srv
= 33, /*%< Server Selection. */
65 ns_t_atma
= 34, /*%< ATM Address */
66 ns_t_naptr
= 35, /*%< Naming Authority PoinTeR */
67 ns_t_kx
= 36, /*%< Key Exchange */
68 ns_t_cert
= 37, /*%< Certification record */
69 ns_t_a6
= 38, /*%< IPv6 address (deprecated, use ns_t_aaaa) */
70 ns_t_dname
= 39, /*%< Non-terminal DNAME (for IPv6) */
71 ns_t_sink
= 40, /*%< Kitchen sink (experimentatl) */
72 ns_t_opt
= 41, /*%< EDNS0 option (meta-RR) */
73 ns_t_apl
= 42, /*%< Address prefix list (RFC3123) */
74 ns_t_tkey
= 249, /*%< Transaction key */
75 ns_t_tsig
= 250, /*%< Transaction signature. */
76 ns_t_ixfr
= 251, /*%< Incremental zone transfer. */
77 ns_t_axfr
= 252, /*%< Transfer zone of authority. */
78 ns_t_mailb
= 253, /*%< Transfer mailbox records. */
79 ns_t_maila
= 254, /*%< Transfer mail agent records. */
80 ns_t_any
= 255, /*%< Wildcard match. */
81 ns_t_zxfr
= 256, /*%< BIND-specific, nonstandard. */
85 typedef enum __ns_class
{
86 ns_c_invalid
= 0, /*%< Cookie. */
87 ns_c_in
= 1, /*%< Internet. */
88 ns_c_2
= 2, /*%< unallocated/unsupported. */
89 ns_c_chaos
= 3, /*%< MIT Chaos-net. */
90 ns_c_hs
= 4, /*%< MIT Hesiod. */
91 /* Query class values which do not appear in resource records */
92 ns_c_none
= 254, /*%< for prereq. sections in update requests */
93 ns_c_any
= 255, /*%< Wildcard match. */
99 int getKmsServerList(kms_server_dns_ptr
** serverlist
, const char *restrict query
);
100 void sortSrvRecords(kms_server_dns_ptr
* serverlist
, const int answers
);
103 #endif /* DNS_SRV_H_ */