mirror of https://github.com/getdnsapi/getdns.git
Compare commits
2131 Commits
Author | SHA1 | Date |
---|---|---|
|
f8c95b4f15 | |
|
ee534d10bf | |
|
6395fe43cc | |
|
d98d307e64 | |
|
c8df60e67d | |
|
037892739f | |
|
9c076ca34b | |
|
3a71bd350e | |
|
8aa19255b8 | |
|
7eaf8454a2 | |
|
2e04e9f8b6 | |
|
a19177d41e | |
|
a1451df680 | |
|
777e0b245c | |
|
2d48a3bd1b | |
|
9bb533ab57 | |
|
86bd62cb40 | |
|
adcdf20289 | |
|
aca15088e5 | |
|
1ea92a68ad | |
|
142f616693 | |
|
6b65aed443 | |
|
0cb72000f8 | |
|
1748ca4c29 | |
|
b181782e0e | |
|
f97ee14b69 | |
|
1a1e79603c | |
|
875c03176e | |
|
2d7d8a4ea5 | |
|
8e2accfd74 | |
|
861ae30725 | |
|
dc5026f2c8 | |
|
10a000b916 | |
|
893d4720c9 | |
|
2bbac1163b | |
|
9d8eea97a5 | |
|
c0e45395b8 | |
|
ed7bfa107e | |
|
94dbb8e916 | |
|
a5a1256adc | |
|
190dbe1b91 | |
|
c50288f71e | |
|
c2e085ee9e | |
|
01715688d7 | |
|
ecb9de2c29 | |
|
b86f8e904c | |
|
45683d3cfe | |
|
822166d7ad | |
|
e4661f957e | |
|
1f2aa585fc | |
|
2a0114591a | |
|
de2137562d | |
|
6eb1a6790a | |
|
f92f97bf1e | |
|
cf2b805ef7 | |
|
6dfbfa5dc5 | |
|
686285ef59 | |
|
ae854a8650 | |
|
ca97810ed6 | |
|
df4c7ce4f9 | |
|
359a44d336 | |
|
48a7700fa9 | |
|
2b348b046d | |
|
50463c7480 | |
|
1012e34441 | |
|
3f07247e64 | |
|
86aa356b48 | |
|
fc62f8877c | |
|
f9c3a359ed | |
|
a694080400 | |
|
fe79e7e633 | |
|
61f9ab4351 | |
|
6c3f75f4e9 | |
|
d055caff44 | |
|
880189367a | |
|
ed9ac22c66 | |
|
189be4b5a5 | |
|
bfdba6d9d7 | |
|
75b750b3f9 | |
|
6a722f5d79 | |
|
eeb460af8d | |
|
e030b2525d | |
|
45ef080bad | |
|
624f688967 | |
|
515127289c | |
|
ae090a29b1 | |
|
7b388a1576 | |
|
df2997d9b7 | |
|
1184f2b8ea | |
|
55be327f69 | |
|
d934b4129f | |
|
3966459fdb | |
|
c1b6903e58 | |
|
8abc3b62b8 | |
|
63e4d1a1ef | |
|
8b558afde0 | |
|
7f606ea14f | |
|
fa282a59ec | |
|
7b12e21ad0 | |
|
291e001881 | |
|
0a13e4dbd3 | |
|
42e4cfc383 | |
|
6439b0407a | |
|
7fe308f718 | |
|
4440a24352 | |
|
ebeff97192 | |
|
03fc32984e | |
|
6507e4c469 | |
|
71521626d9 | |
|
80cdfb3bd0 | |
|
bda845ce43 | |
|
606a88f9aa | |
|
fc4eb466b9 | |
|
c9072b2526 | |
|
1c97459ec3 | |
|
7c767b1a5f | |
|
2673a5736c | |
|
8a95f3d279 | |
|
f020cca206 | |
|
7c6188c53d | |
|
5e7bf99a5f | |
|
5c79e2c731 | |
|
320dd098a8 | |
|
8bd87c490e | |
|
9ecd3fde1c | |
|
de13a0c32d | |
|
8b62970e0c | |
|
563b2b113a | |
|
31031d7c57 | |
|
73cee29f55 | |
|
0b01ad8e6f | |
|
3c6756d68b | |
|
3f9e0f9671 | |
|
be09306567 | |
|
cd386cd917 | |
|
2c51db610a | |
|
26a95b5b8a | |
|
0078977ada | |
|
9baf655a7b | |
|
c234865a80 | |
|
6972c99268 | |
|
252d68e67a | |
|
37e33bc7f5 | |
|
e96e334932 | |
|
55ffca15ce | |
|
1328fac5ae | |
|
ef455471f4 | |
|
f01e7188c8 | |
|
65f7d96678 | |
|
822d8ad703 | |
|
2e4070a3cd | |
|
689415971a | |
|
e7d435e426 | |
|
9c8b70e4bc | |
|
38627fbb01 | |
|
3073d33560 | |
|
af46e20721 | |
|
e17ed3938c | |
|
1067326bd0 | |
|
f05c0ad754 | |
|
16c20fe04d | |
|
f73bf0dfa5 | |
|
3b5d1a9353 | |
|
f3a38e9a40 | |
|
5721c501c3 | |
|
b804b8effb | |
|
fe30672afa | |
|
e19e6bd464 | |
|
1b3f570792 | |
|
328903cb52 | |
|
ab49db8aa5 | |
|
e2cb4fc4ad | |
|
e3fbe4fb51 | |
|
d7099f6e30 | |
|
dadddb0d7b | |
|
4453febf2d | |
|
e2c6241964 | |
|
56ca583fa6 | |
|
ed36240f19 | |
|
6cb15939ba | |
|
971c43c659 | |
|
f33a4b2d4e | |
|
770c0a1282 | |
|
a847d478ec | |
|
ad22492732 | |
|
2b3a540fda | |
|
9b9cecd35d | |
|
a6a2695fee | |
|
56c83b7d3e | |
|
8b5c57bfcb | |
|
24824bb413 | |
|
4fdf3a8b2a | |
|
8da6fdb442 | |
|
33633ea239 | |
|
3345bb615d | |
|
8cda9816e4 | |
|
3ad84d0a51 | |
|
651e5f7c3f | |
|
b446bfdf11 | |
|
61dffd0e35 | |
|
8b2e8c2be3 | |
|
a78b963aa9 | |
|
2cc4865b14 | |
|
f701af7508 | |
|
30104f8bc3 | |
|
0d04d1f397 | |
|
015d209387 | |
|
05e9cbf5de | |
|
8b1cdd0fa8 | |
|
6b1ba31334 | |
|
4f0f9c7eca | |
|
489022dcb9 | |
|
0226096974 | |
|
5c33130454 | |
|
9c3321cdfc | |
|
40bcf4cb4c | |
|
52cb444065 | |
|
2ac84800af | |
|
bf29924d76 | |
|
7d2e255ead | |
|
293011c27f | |
|
60307d88fd | |
|
306110ab7e | |
|
3e373ab2af | |
|
aafdba690d | |
|
0fbe0dccc3 | |
|
f1ea127e7a | |
|
e2813299ee | |
|
17d5627529 | |
|
39e2c8a33e | |
|
17784bd3f5 | |
|
e28ee2b0e0 | |
|
d92a91e771 | |
|
33774228a3 | |
|
0fc75dfbaf | |
|
26d678b344 | |
|
6352419823 | |
|
b8c7690df4 | |
|
b455c3feca | |
|
38f59b7bea | |
|
fa72271221 | |
|
2925c7e80b | |
|
323e6a6ba6 | |
|
499555b8a5 | |
|
80b0c7a45e | |
|
d59380fca0 | |
|
1cca550799 | |
|
8b3e3412f5 | |
|
ffbc49cc2d | |
|
277a4ae9c7 | |
|
4314f5dbf9 | |
|
cafd745383 | |
|
383a162bf4 | |
|
41e09259db | |
|
3f6203bf0f | |
|
beda65f262 | |
|
e00a79a240 | |
|
7a1e72d51e | |
|
1cac86424e | |
|
011b4c6099 | |
|
5be26496ac | |
|
0e432cc7c2 | |
|
ba54c50779 | |
|
c66d772c97 | |
|
07a074c1b1 | |
|
a46ded25b6 | |
|
ffa5d6144f | |
|
cbed43ed59 | |
|
c75d8df399 | |
|
74d9404759 | |
|
f34218d812 | |
|
633724327f | |
|
ea09baf376 | |
|
b0ef0887db | |
|
5bab6921bd | |
|
bb59275ba9 | |
|
4af076f5fb | |
|
6a043d2fac | |
|
3604add64f | |
|
c359a0b65e | |
|
02561c2d7e | |
|
4ab7f8f757 | |
|
7cf119fb6b | |
|
8867e14e8c | |
|
69ab8adb12 | |
|
5df3bc4fce | |
|
545916d347 | |
|
38bf04c86d | |
|
1da968a35f | |
|
164b089011 | |
|
d9e5f405e7 | |
|
2fa1a184e4 | |
|
f1885cc4a6 | |
|
7adc1fc4ab | |
|
dbad46c516 | |
|
9dcd8482f5 | |
|
530c8c5e8e | |
|
072bdd9a6b | |
|
e8eafdfa44 | |
|
e4c2ddb401 | |
|
55a0456b67 | |
|
def0f1d714 | |
|
e4333b13df | |
|
7fd7bda000 | |
|
74bbfc02fa | |
|
3b44cd8f38 | |
|
b5f260376e | |
|
07e617579d | |
|
5f3d5191b0 | |
|
60eb113770 | |
|
d447999c60 | |
|
24e2d1acbf | |
|
9acdc1cbb5 | |
|
2414d31951 | |
|
165078a50d | |
|
ea1111d899 | |
|
c6e5ef6330 | |
|
2c06e8b8ac | |
|
a884426c6e | |
|
9682b4d41c | |
|
41741f6cc4 | |
|
87177cc103 | |
|
73e9c32655 | |
|
4304bb7017 | |
|
4df33630ea | |
|
878fd0583f | |
|
11e621b758 | |
|
97227f9bd7 | |
|
4da88601d9 | |
|
ec62d87fca | |
|
effd229ef6 | |
|
55d6b47ed1 | |
|
cd62f2b716 | |
|
8362a183e8 | |
|
a2d09d2be5 | |
|
e45f569603 | |
|
73e8e4653d | |
|
dd70108558 | |
|
323d76d7ae | |
|
5db0d03b13 | |
|
b8df26194e | |
|
d1dca186bc | |
|
7a0a2f712d | |
|
ffe626f5f3 | |
|
dc6cadebbc | |
|
c367b39c13 | |
|
1d712cfa45 | |
|
9050f63d5b | |
|
ad8ca06c57 | |
|
994466b3de | |
|
416c55734b | |
|
c89b9d0796 | |
|
4f4ed98112 | |
|
f9db16a65e | |
|
42ea03ef07 | |
|
ffe471543b | |
|
b22768709a | |
|
b6e290f42a | |
|
8a2b4e0aa0 | |
|
bc6adf01ca | |
|
0a1883047d | |
|
99e32f1e46 | |
|
1527979129 | |
|
5b20971464 | |
|
82b9f5781e | |
|
342b1090f8 | |
|
754d65eb6d | |
|
324370c537 | |
|
7438de712a | |
|
74e584cd61 | |
|
99d15b999c | |
|
acd94cbe20 | |
|
13976cca68 | |
|
0abd2345de | |
|
6b0ea5c47f | |
|
eebea43b84 | |
|
968e914e94 | |
|
a7a17f3725 | |
|
acc9b1cbd5 | |
|
30367dada2 | |
|
034b775e5c | |
|
71b773ab2f | |
|
c3d0afd47d | |
|
97ac5d3ddc | |
|
0fef131e9b | |
|
f5194a9118 | |
|
c68f5a7a8d | |
|
7c1b43b420 | |
|
cad7eb2461 | |
|
f72fe60035 | |
|
2206558376 | |
|
e657024531 | |
|
35f2ce37c0 | |
|
c4bd91b196 | |
|
d71dccaf2c | |
|
cdc0d43315 | |
|
8980f5f5ee | |
|
0af9a629f4 | |
|
ac379787a2 | |
|
79fbef07d8 | |
|
2bd853bda5 | |
|
61cae868e3 | |
|
814ee2c4cf | |
|
09ca9a826b | |
|
9024fd7736 | |
|
ee6bc7d978 | |
|
6553aa3aad | |
|
8609a35e5b | |
|
ccd6c3592d | |
|
24774fefd6 | |
|
9e4add2219 | |
|
3fe0c94357 | |
|
67b7a8c024 | |
|
66f63b21bc | |
|
78d6bc30f5 | |
|
51cb570809 | |
|
35077bdc6d | |
|
411c5cf571 | |
|
a4020a6841 | |
|
014ac3d368 | |
|
426b6f67dd | |
|
bbe7dff257 | |
|
c69a2f7806 | |
|
1962c03b79 | |
|
215d553c0b | |
|
6f4d25e096 | |
|
309db67f8b | |
|
345ed9a734 | |
|
4be406ce1f | |
|
7c52883341 | |
|
431f86f414 | |
|
5247fc8de4 | |
|
13e1e36ba3 | |
|
ff1cdce6f8 | |
|
65f4fbbc81 | |
|
c1bf12c8a2 | |
|
79459f5d1d | |
|
36cb9b0243 | |
|
232f655663 | |
|
e9060792dc | |
|
990372329c | |
|
dc6bb0fa52 | |
|
eecc18703a | |
|
154f98e321 | |
|
93b7cb6a01 | |
|
a4590bafcb | |
|
41f4940072 | |
|
e8f34d48fb | |
|
2759d727e5 | |
|
fa9d8885f0 | |
|
91a3a3db36 | |
|
45be26642b | |
|
b51c7384e6 | |
|
0dec4a6f21 | |
|
35b4969216 | |
|
bf011d9294 | |
|
aa49a935c7 | |
|
ab69a9a7da | |
|
0a9f155cc9 | |
|
2c6ec5e0be | |
|
ab700e70fe | |
|
a6ab7ffe41 | |
|
ff7ffc246c | |
|
1acd880f26 | |
|
fee864c25c | |
|
bb99321e57 | |
|
8a7226baee | |
|
bdfdd99645 | |
|
511dfc75ef | |
|
64f0d6aaa8 | |
|
b0c057e8ae | |
|
46c49cbcfe | |
|
72d9b91a2e | |
|
e73ab48687 | |
|
91764fb6b0 | |
|
c6dffa1239 | |
|
b2312aee12 | |
|
f64aa8703d | |
|
46f0b06f24 | |
|
c80aa72725 | |
|
ea55b12a08 | |
|
30a3a6b026 | |
|
390e383a1a | |
|
6d066f95f9 | |
|
4b688443f4 | |
|
a1692359f3 | |
|
1e7da76901 | |
|
5986d0497f | |
|
c1f51815ba | |
|
153e766edf | |
|
c4a3f75844 | |
|
e60d852637 | |
|
e3b007a43a | |
|
c101a7a021 | |
|
26bcddd029 | |
|
af962228fc | |
|
0cdede21df | |
|
5e390a4b23 | |
|
bc3106af94 | |
|
4ec93a3df0 | |
|
27a7e4e28f | |
|
2267863a53 | |
|
2d76a5fd52 | |
|
b90ba236ae | |
|
6b10570842 | |
|
4ff9816e39 | |
|
73868643d2 | |
|
1904ee7318 | |
|
e7593541ef | |
|
4f67491971 | |
|
05f9d30e89 | |
|
f3e0f2b9e6 | |
|
da94b52f74 | |
|
4eb845bc58 | |
|
ff9cde2087 | |
|
756eda96d8 | |
|
cfa78707a3 | |
|
6a5e96d4e1 | |
|
52421be5f4 | |
|
1b0a09a23f | |
|
e5a53fb1d2 | |
|
fb73bcb77e | |
|
2e8c48544b | |
|
aba0e2fb4c | |
|
5d353d9efb | |
|
0fd6fd4c5c | |
|
4b8c9d1bd7 | |
|
09019bee75 | |
|
e7453522d5 | |
|
e22c01e212 | |
|
ffd1136e94 | |
|
d9fdd4c10d | |
|
12589d85c2 | |
|
9b4e8e9e91 | |
|
884f6ddc5e | |
|
25231aa686 | |
|
000fa94ae2 | |
|
799bd2f6b1 | |
|
f9ab894936 | |
|
8c108fb761 | |
|
e481273ff4 | |
|
0510fb00d3 | |
|
fa133fcb92 | |
|
7fe45a7012 | |
|
86e5c39159 | |
|
0d283fc63f | |
|
48e0ea013c | |
|
6c99e7b8a6 | |
|
98b1ff624a | |
|
a6ec2b2449 | |
|
5a816f3d51 | |
|
9d48f1cf97 | |
|
9b7999ecf2 | |
|
7331717990 | |
|
7e2a896410 | |
|
99bfe4a287 | |
|
caab2e8592 | |
|
23d2affebf | |
|
2a110043da | |
|
3c355d425b | |
|
101d602739 | |
|
de7f007bf3 | |
|
f5c588c955 | |
|
f0f101511b | |
|
4f050facc3 | |
|
6c075e2ad8 | |
|
9c01968048 | |
|
7fecf5a93d | |
|
a834d32718 | |
|
1b5b0ca799 | |
|
ced112ca74 | |
|
a820c0124d | |
|
81ea235d50 | |
|
75f59b9dfc | |
|
3d2ac4c16c | |
|
ef0a77e061 | |
|
7548b095bc | |
|
1e9a7849de | |
|
06e1c741e8 | |
|
1bc056ee70 | |
|
c45b3ed9db | |
|
8a2fc5f5a9 | |
|
eec6ec29dd | |
|
f787c87137 | |
|
a0fb2c8424 | |
|
d1aa3922fe | |
|
fd5e0cdc02 | |
|
9da06230d9 | |
|
e93b583a26 | |
|
1dd5f4dc16 | |
|
c057ca52e4 | |
|
bedc4ba0bb | |
|
0d6b127684 | |
|
984aeefab2 | |
|
0ff1839a6f | |
|
b178f94505 | |
|
e29cfb6b6a | |
|
abc69f96fe | |
|
9301f8970c | |
|
1fbb022b88 | |
|
8797280429 | |
|
e705109f22 | |
|
75297b17ae | |
|
65e610f26e | |
|
21155d5aa9 | |
|
7bace705b1 | |
|
a037398156 | |
|
5f2add4c09 | |
|
6325dae563 | |
|
a150c6d927 | |
|
f2c531265b | |
|
9999907593 | |
|
a1c30563bf | |
|
5a420a2aed | |
|
223e85bc02 | |
|
0c3b6fb2f6 | |
|
1ebd54a1de | |
|
31e5cd5ab6 | |
|
9a4e389946 | |
|
401aa2e3b8 | |
|
c3e4061fe2 | |
|
b914b63e18 | |
|
c033e3f1a3 | |
|
088d775117 | |
|
f7278ca696 | |
|
8e8dd34e85 | |
|
bf1f01c87e | |
|
7af885396f | |
|
87fec7f9b4 | |
|
a72359e058 | |
|
7d4ccabc7f | |
|
ca7c2fe00e | |
|
0eba73a945 | |
|
c28a293c9f | |
|
9c5a93bbdf | |
|
e944203e55 | |
|
82c00eb0a5 | |
|
13d7a730ee | |
|
7e915b0601 | |
|
a25f832d8a | |
|
ec8b8ba903 | |
|
9bc98272a1 | |
|
97b056c355 | |
|
1f401f7253 | |
|
2e03d3799c | |
|
3b5657e580 | |
|
7e3439efbc | |
|
1d211013e6 | |
|
4f37d2b933 | |
|
037f6039c8 | |
|
01ea1d6a22 | |
|
b0661b9d9f | |
|
8ba53f10b6 | |
|
fcaa4f9845 | |
|
f3b2f83879 | |
|
a4f17760ab | |
|
7e884e2cd0 | |
|
bedd3a02cf | |
|
1e774a95f5 | |
|
8c3047dbe0 | |
|
d38f233a80 | |
|
f9e4c9f853 | |
|
0291e205fd | |
|
62ad159f15 | |
|
3fd4f7f240 | |
|
1a3025a405 | |
|
ea035fa82e | |
|
f5322c701d | |
|
add818fea2 | |
|
00c17dca14 | |
|
155b035cd8 | |
|
760269acbd | |
|
6bd0f8b980 | |
|
3666d994a7 | |
|
a4ff6de985 | |
|
fdafb458ef | |
|
b8424e494d | |
|
5ea0edf262 | |
|
8dc3a84735 | |
|
3438c68591 | |
|
08b5976f9c | |
|
3298b5cd50 | |
|
cb7af33488 | |
|
77a5a15cdf | |
|
22996bf07d | |
|
c0d7d2c279 | |
|
5d4bc8bc96 | |
|
b9312e790f | |
|
3258fdfd5a | |
|
379662a3f3 | |
|
60118e9241 | |
|
e7618321ce | |
|
e597daa4c0 | |
|
3152a4112e | |
|
305daab9aa | |
|
0fa6d1fe2d | |
|
d44237554d | |
|
dd433ede68 | |
|
a746ea5e08 | |
|
6b4446c7cd | |
|
712617e568 | |
|
7c5bdd5431 | |
|
a906710269 | |
|
1ecc7b3c26 | |
|
9e34588f19 | |
|
546b75a9b1 | |
|
a1e5cc44a0 | |
|
608189710c | |
|
2471f43dea | |
|
540735a956 | |
|
fe7d6678cf | |
|
2ff1bf6152 | |
|
25a31e6b35 | |
|
03d4950470 | |
|
9aa1d067d2 | |
|
aa419a88d0 | |
|
81ffa2f48d | |
|
0ef910b9ee | |
|
efb0539c15 | |
|
97cc67d026 | |
|
f173f4667f | |
|
ae38a29a50 | |
|
8f88981efe | |
|
7fe3bd6a1f | |
|
2bd5df4959 | |
|
d35fae5038 | |
|
274bc9bc4a | |
|
76d8f11b44 | |
|
7b20414ee0 | |
|
65c7a738eb | |
|
00d3232ba4 | |
|
ac17d4ebed | |
|
9c35fa1643 | |
|
2b5b59537f | |
|
fd16d7b5eb | |
|
0615457dfa | |
|
9f566de65d | |
|
d232353f93 | |
|
d7864ee0df | |
|
2c66487635 | |
|
5f1a2f8659 | |
|
cfeaefbe3f | |
|
825e2fd15f | |
|
090b076d96 | |
|
a63e5edb86 | |
|
e691312a3f | |
|
362d168380 | |
|
d4ec98ae6d | |
|
d5518bad67 | |
|
da3f023d8f | |
|
26877d4494 | |
|
96ed06c6a9 | |
|
01197f10ff | |
|
b105faad7d | |
|
17d23ddb99 | |
|
8c87028d77 | |
|
2a39b6e2e8 | |
|
72eb8628d0 | |
|
543435d89d | |
|
025f1cdff3 | |
|
30e440d35c | |
|
323239be58 | |
|
27847b9a0a | |
|
6afb02b2f1 | |
|
c3cdf496e3 | |
|
c0a3babe0a | |
|
3e16075563 | |
|
ed6c7a6b58 | |
|
a7a6240202 | |
|
3a1cb30c28 | |
|
3098ed6fca | |
|
8821c1c8cf | |
|
f2f08514ce | |
|
bf034eb3cd | |
|
6aa732b54d | |
|
260416a859 | |
|
6f20016889 | |
|
81bfa68440 | |
|
26eb5b8969 | |
|
5fe979c2e6 | |
|
f6517fd3e2 | |
|
168d83ac19 | |
|
439f41149b | |
|
9b019b8c6e | |
|
4508ec77fb | |
|
3b7b83e309 | |
|
a8fac29a66 | |
|
b683cc4870 | |
|
e078f3c51a | |
|
4b8ea64140 | |
|
c3b86ccc21 | |
|
546fc1d404 | |
|
843ba4b036 | |
|
5dbfdd4ddb | |
|
2d0d1c9e6f | |
|
2434336ead | |
|
7e103217c6 | |
|
270c3d654f | |
|
b4ae4b7121 | |
|
4669956391 | |
|
09b4f6d57d | |
|
e2b26609d4 | |
|
725f5d486a | |
|
24f7ae3ea6 | |
|
8e12d86fc3 | |
|
cb6af78944 | |
|
d3b13c2bc9 | |
|
5d581baae1 | |
|
12272dda36 | |
|
f26fd6c8ee | |
|
971d876c70 | |
|
b2d32430f6 | |
|
fc073267f1 | |
|
f8e1ed78b8 | |
|
5ce764ab70 | |
|
272d0cf0ef | |
|
ddade192a3 | |
|
8886c5317d | |
|
87879783ec | |
|
eedd1a1448 | |
|
fa597399e2 | |
|
dc5a78b154 | |
|
f83c8e217e | |
|
ee4feb0cc6 | |
|
11e4635f2b | |
|
ce4c44830d | |
|
968d94d2be | |
|
a4fa9ad4eb | |
|
6afcc97b87 | |
|
4ca8ee008b | |
|
34f4e13833 | |
|
4b5303e6fb | |
|
5e415b60b6 | |
|
74eaf4b03e | |
|
eb6da94e25 | |
|
dc7daede40 | |
|
0874a0a472 | |
|
8a291d4dce | |
|
59e6ec80fe | |
|
ff7c85ab20 | |
|
a70efd118d | |
|
0895522734 | |
|
1eae1ad96b | |
|
757becc812 | |
|
a0c313412d | |
|
ffc72ff253 | |
|
d5efa01d06 | |
|
3e221ebed5 | |
|
b22666d667 | |
|
4acce42720 | |
|
8a4497ff4b | |
|
c786ba03d2 | |
|
8ddab4813b | |
|
7509f691f3 | |
|
3f05242bce | |
|
6aa73c9374 | |
|
d1aebd3c24 | |
|
6b04ed8551 | |
|
23daf9aac3 | |
|
a9ba50dff1 | |
|
e75cf0b7a3 | |
|
c3df13b27c | |
|
a86e21b48a | |
|
52a4500792 | |
|
15eec724a5 | |
|
078c50f1b2 | |
|
b9260f8fca | |
|
3ab01cf45d | |
|
cefeed2b47 | |
|
7ac289f726 | |
|
a7fc760141 | |
|
bf2e08e2df | |
|
ca3f28843c | |
|
0eda8e1deb | |
|
1ebbd8d52d | |
|
f26669df68 | |
|
e2f1c8d13c | |
|
114b5785f7 | |
|
a3bfee7d0a | |
|
da2aa634d3 | |
|
1b47ce4d10 | |
|
edba5b77f8 | |
|
90a187a1ac | |
|
712f62a4c1 | |
|
8897bdf18f | |
|
ac86b41fab | |
|
7c229c40cd | |
|
fbc1526f47 | |
|
d880d4222b | |
|
905cf290d4 | |
|
e6536bb2ef | |
|
36943a4380 | |
|
17d7ee79f2 | |
|
f0f2afbca7 | |
|
e2abb8aff4 | |
|
34d35f9e79 | |
|
e2ffaf3e07 | |
|
737f49d2cc | |
|
463855d274 | |
|
40295075ad | |
|
8980929150 | |
|
aa74c0a3d5 | |
|
e6051976dd | |
|
57e6487d76 | |
|
96c6e49ae5 | |
|
6d29f7fb65 | |
|
8c4ed6294e | |
|
836c651539 | |
|
f31eb517e0 | |
|
dcc6cd36c6 | |
|
80b2eacc26 | |
|
b20aedd182 | |
|
8618e4b731 | |
|
8139201f12 | |
|
22d1345491 | |
|
019ce4afe5 | |
|
92a0db58da | |
|
8fab939d2c | |
|
645c6f31cc | |
|
0c39696b64 | |
|
8f683ef3c9 | |
|
8c331d580a | |
|
9e47919f42 | |
|
a9029581bc | |
|
57c40b147d | |
|
9683a64f73 | |
|
f0190e4f03 | |
|
8f3ce9af35 | |
|
eabad34af9 | |
|
c74e8353a8 | |
|
6d6e66c5a8 | |
|
453b94269b | |
|
f53e5645d9 | |
|
6c95f4177d | |
|
b760a2ced2 | |
|
729af1d159 | |
|
8aa46b305d | |
|
42945cfc08 | |
|
10133a71f3 | |
|
2e4e3873e4 | |
|
c6d40d9adc | |
|
d2c685f3ca | |
|
d2c258158f | |
|
48209a038c | |
|
084286513f | |
|
f25ae85030 | |
|
d340305dcc | |
|
2b07f221c4 | |
|
bf31b2f7db | |
|
21f538f60c | |
|
bf23968226 | |
|
70ec5ea4d0 | |
|
5c8765fefe | |
|
98379bbd38 | |
|
062b88c991 | |
|
2ed2871549 | |
|
fe6d2c9749 | |
|
5a94081634 | |
|
1aef5fb3e4 | |
|
4ecf9ad8c6 | |
|
2084841fcf | |
|
bef36d12f1 | |
|
a6669482d8 | |
|
4ed82b6521 | |
|
3e07bb519c | |
|
f949f4a136 | |
|
516570e1f8 | |
|
c570114bf6 | |
|
2c8e7461da | |
|
6024f9d72e | |
|
e57011a3ea | |
|
33ff6a95ac | |
|
665c3f6fb5 | |
|
8e321a0e77 | |
|
f03ac9ab7b | |
|
da7083f55a | |
|
5701fb99c9 | |
|
ae0dd866aa | |
|
9d86928900 | |
|
8311dc9049 | |
|
05016e3a3a | |
|
1555c432f5 | |
|
2d7d6581b4 | |
|
c6c1b5cfa2 | |
|
e11dc92df1 | |
|
84430e02cd | |
|
bceb6c8c87 | |
|
c5acb3769b | |
|
d589adf120 | |
|
d402603f4a | |
|
4478745955 | |
|
28c41c3495 | |
|
44065bead8 | |
|
9c78f8ecc8 | |
|
1b731271af | |
|
7151e6fd44 | |
|
11138ff678 | |
|
59ff5e8178 | |
|
2b20f35e0e | |
|
8ec1f8eae9 | |
|
f9bdedbf84 | |
|
4a5f03ebbe | |
|
77d13f885e | |
|
61561dd527 | |
|
3e6c5775ff | |
|
742588dd6f | |
|
146638ab94 | |
|
45884a2dd7 | |
|
91ccbcd7df | |
|
280e72a0fe | |
|
78f027aaab | |
|
19479d4089 | |
|
f47606b643 | |
|
264135e799 | |
|
8235250fb6 | |
|
fb267938c3 | |
|
55acf6662c | |
|
101f24a6da | |
|
195f4c59c8 | |
|
b0c55d540f | |
|
04e554086a | |
|
ce43942cbe | |
|
ff1ebbf671 | |
|
2962baa050 | |
|
69b3f6f558 | |
|
e2f1d3badb | |
|
4a1008e02c | |
|
7ea3beaa6a | |
|
6b70160659 | |
|
a2cf568190 | |
|
631bf3fffc | |
|
a7ed88fbed | |
|
e496d13777 | |
|
b0af051809 | |
|
4275ea6ffa | |
|
ac084db231 | |
|
5e1cceca82 | |
|
a07290a9b0 | |
|
606b83d857 | |
|
5fccd97d85 | |
|
9a273cf144 | |
|
1d87437854 | |
|
d9158e639b | |
|
64d1063dec | |
|
e2be41d352 | |
|
e00100b388 | |
|
a34e4338ce | |
|
9b548a76c9 | |
|
360f3bdc3c | |
|
878a229bea | |
|
4e52316704 | |
|
6f01d466dc | |
|
874af14cea | |
|
c76b977782 | |
|
d2e8ac9e61 | |
|
305a6f6b6a | |
|
a9464993dd | |
|
8cef8b1f95 | |
|
bc0052d4bb | |
|
d319e0a88b | |
|
c5d000b552 | |
|
8c27d285a8 | |
|
9a48664b51 | |
|
1e99398576 | |
|
69408816b4 | |
|
3f8cdf19c2 | |
|
21fe94c06e | |
|
67d787d74a | |
|
3d4193fa41 | |
|
760b813333 | |
|
053845332d | |
|
b2d09e0171 | |
|
6ca0b8b481 | |
|
e152842573 | |
|
1eae032743 | |
|
e127365900 | |
|
6ec0f2e021 | |
|
2ac13e0807 | |
|
1ff6771c47 | |
|
db856f5227 | |
|
ed08025c38 | |
|
dab93cd197 | |
|
1e44ea7bd8 | |
|
16d97b607c | |
|
352fef644e | |
|
37fa7a1f07 | |
|
dbbf778ae8 | |
|
4c73b5e156 | |
|
ad53010cd2 | |
|
3b465d3600 | |
|
628ac10ae7 | |
|
d1d95f4955 | |
|
066ef2ddaa | |
|
cc9451d364 | |
|
2a6c4b35cb | |
|
dbc1719206 | |
|
e9183386f1 | |
|
e845ef8968 | |
|
80897d2b86 | |
|
9438f5576c | |
|
62fa69c461 | |
|
23fc764411 | |
|
3b9caec245 | |
|
efea1a2506 | |
|
628bf7da47 | |
|
6f7f6046eb | |
|
193bc618a5 | |
|
6f3db561f3 | |
|
a670606849 | |
|
b4eecd59ab | |
|
02516c4079 | |
|
05268f45b0 | |
|
eb8fe6184a | |
|
d5dcdac58c | |
|
691d1a77e6 | |
|
eb69cc8695 | |
|
6c4af3af93 | |
|
6026cb1450 | |
|
0da79ae77a | |
|
8dd37006c7 | |
|
0857926965 | |
|
9aaafd8cca | |
|
8c45f1fded | |
|
6e66754795 | |
|
b5739434ef | |
|
2226c722a9 | |
|
68a87e4cee | |
|
708e520989 | |
|
a060e723f2 | |
|
ce7ee62355 | |
|
d28283a850 | |
|
e6696d9557 | |
|
c9b3e3cf7b | |
|
a27915ccc9 | |
|
2d011e3d19 | |
|
f0ee920227 | |
|
f251f8aeda | |
|
c2edc94a3a | |
|
e35a2182a9 | |
|
4ceec33d08 | |
|
e08d3592a0 | |
|
f8c7d8b5d5 | |
|
2220c1a48d | |
|
67baa1d651 | |
|
edecca8b63 | |
|
fe49bc1c69 | |
|
d5005a8ac0 | |
|
f2a90925bc | |
|
9de4d6537b | |
|
f4fe2cb6c5 | |
|
148dfabf88 | |
|
03efb66991 | |
|
6f0b08a400 | |
|
8864dfce92 | |
|
007208a122 | |
|
9fa6ab5994 | |
|
01eedd5ea8 | |
|
b3e5c5fb30 | |
|
b7d16e3c89 | |
|
6316c558bc | |
|
3eb6ebf5e4 | |
|
5f6e47d091 | |
|
a2efd8f6c1 | |
|
767ca21bc0 | |
|
ed0b655af0 | |
|
e4d4e97542 | |
|
0560500e34 | |
|
15b451d71b | |
|
b32ee619f1 | |
|
b80ccba02c | |
|
2a496969cd | |
|
c275b205d3 | |
|
c653e8502c | |
|
95da0b46e0 | |
|
f67314c1c1 | |
|
426fc238da | |
|
b2ac3849b7 | |
|
3d45a77884 | |
|
b48a92c8f5 | |
|
29c1c9524e | |
|
a7c824c756 | |
|
5d12545391 | |
|
fa99b206e8 | |
|
b838cbfe1c | |
|
fe446a0d66 | |
|
52e3d2e1b0 | |
|
1ad8047443 | |
|
a5876d57fe | |
|
a77a335370 | |
|
24abf43de1 | |
|
ed0d4d044c | |
|
a3fe958387 | |
|
b8c5f9131f | |
|
0048066a2a | |
|
0891e16147 | |
|
8b09633c94 | |
|
ed66edf52a | |
|
1cf39c9134 | |
|
d8f4aebdee | |
|
915689141b | |
|
68eadedc10 | |
|
6f7bad5d73 | |
|
dd76132a92 | |
|
1d4e3dd790 | |
|
6734a00d59 | |
|
2a1a6768cb | |
|
f0f3c43552 | |
|
5ea181172a | |
|
14c9f3aafc | |
|
b8f43c8acd | |
|
0655a08fa7 | |
|
d511ce24de | |
|
8365f40147 | |
|
639239f45c | |
|
a4fa931e85 | |
|
c4a93b2c53 | |
|
79ce0cff85 | |
|
f1968d1e2c | |
|
82c92f8dc7 | |
|
f751de696a | |
|
5b5123a79d | |
|
5a2ee50de3 | |
|
dd656b7421 | |
|
0ecaf163d9 | |
|
e02442eb98 | |
|
ec685e900d | |
|
028dd0bf3c | |
|
de1ab4c8a4 | |
|
4058529081 | |
|
5f3de12644 | |
|
09baade016 | |
|
6a9e2f4a56 | |
|
bbd2fb8cf0 | |
|
94e1f48f58 | |
|
03307a7b71 | |
|
7c8605c3b1 | |
|
f71dd2bf71 | |
|
ebdf657fd7 | |
|
ff4ecd5b39 | |
|
1b7aef5a88 | |
|
356408955d | |
|
09df4e2d5d | |
|
4b6962cd9a | |
|
b3a06f1944 | |
|
8fccd66813 | |
|
c7ae2f5011 | |
|
ba7dfbeec0 | |
|
cbb407ae1e | |
|
09a727eadb | |
|
74b1f77357 | |
|
a453678094 | |
|
7e9956b19e | |
|
6ed3d77523 | |
|
990800d9f9 | |
|
df45a2f1c7 | |
|
91dd991348 | |
|
a6859a08d3 | |
|
d20bbde25e | |
|
f6d46689b6 | |
|
2d35993c83 | |
|
e87e907128 | |
|
17a5a5db92 | |
|
445470d831 | |
|
c72d74a0fa | |
|
e4eddca259 | |
|
7b6b0ff642 | |
|
c805d40585 | |
|
b2fe9673de | |
|
04f6a2b13b | |
|
840ba8c85d | |
|
b7c2e53a82 | |
|
3e8822e0e2 | |
|
c936f0c51d | |
|
7484b8c37b | |
|
6d3e0c7ca2 | |
|
549de0de60 | |
|
1587e2f8f5 | |
|
30e1683d2f | |
|
60443fb7fd | |
|
2b9987014d | |
|
93d6f2b18f | |
|
4c71d6239f | |
|
4ccfa2a781 | |
|
83ec9b74e9 | |
|
31eee9c7d1 | |
|
abd0244aba | |
|
b72781a395 | |
|
dad4aaf6d8 | |
|
fd3e0c01f7 | |
|
69d1bd6de5 | |
|
f1c44dc15c | |
|
17da80a828 | |
|
45ee18e285 | |
|
7bf953b2bd | |
|
f4cd8f6b47 | |
|
7c1c4c52d6 | |
|
9c9c52aacc | |
|
b564c8d96f | |
|
9320364053 | |
|
bb369ec7d9 | |
|
155ceede4c | |
|
e80d3340c6 | |
|
cf3d4a4b2e | |
|
8a66ba0185 | |
|
cd199def68 | |
|
25849645d4 | |
|
bb0ad001e7 | |
|
9a3b01ed62 | |
|
53d73d2f90 | |
|
835eaa855b | |
|
99fb7100ea | |
|
1d24c90768 | |
|
2e46a4b136 | |
|
f1b8b25afa | |
|
7ebf3924b5 | |
|
5e26137eda | |
|
efb50939bc | |
|
9b715d4743 | |
|
da527358c0 | |
|
d3b7a30651 | |
|
7e1c8c59b7 | |
|
be29a01b20 | |
|
0d39563978 | |
|
c1d5ae9a25 | |
|
e9e6ff013b | |
|
326b6bb410 | |
|
5cc4028d63 | |
|
d3b097fffe | |
|
a9386e621a | |
|
8b4c90eaf4 | |
|
e01c85ef2f | |
|
79b47028b1 | |
|
80219a4195 | |
|
5f6b93f7f2 | |
|
600036da73 | |
|
8f833c7000 | |
|
4518a3d672 | |
|
83a0b944b5 | |
|
d584c6e3f5 | |
|
cfc7d18c85 | |
|
b91e13b13b | |
|
a4badbb058 | |
|
ef12b0e764 | |
|
5d8894495a | |
|
7567869f2c | |
|
7b58dc25a6 | |
|
1264099be7 | |
|
8b454afb80 | |
|
07c14dc1cc | |
|
bb9ae2dfa1 | |
|
9fb11368a5 | |
|
37cced78fc | |
|
4345905a81 | |
|
3428412629 | |
|
5cc67ff554 | |
|
9895486e5f | |
|
1a26b884ee | |
|
86341fea08 | |
|
6e9b1b5f53 | |
|
26db6202a5 | |
|
8de9976a2b | |
|
eeca7b32b1 | |
|
55cdd8fed3 | |
|
26eaf255c5 | |
|
2281accd38 | |
|
9d48c47980 | |
|
fbb4eb717a | |
|
39f854d2b3 | |
|
ce41258b14 | |
|
8f75e4ed8d | |
|
f31b2fa233 | |
|
743e04bfd6 | |
|
3629d558cd | |
|
a5748be5fb | |
|
473da8966b | |
|
984fbf5042 | |
|
21303fa40a | |
|
50b064a292 | |
|
4549bb5723 | |
|
1221171438 | |
|
c824316340 | |
|
702fe1f5d9 | |
|
691d32cf80 | |
|
471e8725e2 | |
|
dee33f53b6 | |
|
598d7d103e | |
|
576e38977f | |
|
fd97d2724d | |
|
0d13ae6d72 | |
|
1ba2e5bf4d | |
|
133426b7db | |
|
b0e5f87984 | |
|
4ebe5411ec | |
|
73165b235f | |
|
c2bcd1ca72 | |
|
1593129b85 | |
|
b857e3d7f1 | |
|
57e2a18f94 | |
|
258e59242b | |
|
cef2e3e5d4 | |
|
ef80f463c2 | |
|
c54a22d95b | |
|
4bf93de12b | |
|
bc9ebd5ae2 | |
|
6e5b62c555 | |
|
9569e3607e | |
|
6fe4b5a6d9 | |
|
f66bb6a812 | |
|
c0f20a9023 | |
|
72788cb172 | |
|
bb3d741f7a | |
|
2b682bc3a9 | |
|
45643b6da5 | |
|
db6cee94fa | |
|
393b24fe89 | |
|
3fa34dcfca | |
|
4ea4f68467 | |
|
cbe451274b | |
|
24de66e6ce | |
|
a0ae9130cc | |
|
bc70b29416 | |
|
732844eeaa | |
|
05fb6edfcb | |
|
838375fe66 | |
|
3cea710dc5 | |
|
0fa8152bb6 | |
|
ec04dc21ee | |
|
3d356bd35e | |
|
58b5ead67a | |
|
3f965e68c0 | |
|
47e718eeb8 | |
|
c84ff93e4f | |
|
1d34fcbdd5 | |
|
f156f2f24a | |
|
6f9bfffe9f | |
|
fdbefa17ec | |
|
a1461d51ec | |
|
0432fe37c4 | |
|
7f2fcca80d | |
|
b1cc7750df | |
|
5c6f036326 | |
|
8ba8f774a9 | |
|
96060ed6ae | |
|
3372f6cf26 | |
|
a1e73b98a6 | |
|
a7e5f65f65 | |
|
412c9190f8 | |
|
5389a84173 | |
|
b4a6fe0499 | |
|
8c54142790 | |
|
17670cbf97 | |
|
a7dc50f865 | |
|
22c1eb7f3f | |
|
0a030bd8ae | |
|
ac6e50f24a | |
|
903605570b | |
|
c57f8874ec | |
|
612c4b1547 | |
|
d67507fff8 | |
|
94292f5bc7 | |
|
f685a0c8b8 | |
|
d9a089a6a0 | |
|
0736453bed | |
|
255cc9ab36 | |
|
7c7c58604f | |
|
65a46e1026 | |
|
84458d68c4 | |
|
9cb38bc822 | |
|
e857f680ce | |
|
0340b74604 | |
|
8b31ad5df1 | |
|
80ea8637d1 | |
|
ebba1d4cce | |
|
d59dfb6609 | |
|
99d8672bee | |
|
689fc02fd2 | |
|
bae426a0e2 | |
|
906a8d68c2 | |
|
2485c11e32 | |
|
ea69d31dba | |
|
af70671641 | |
|
b4e7a82e11 | |
|
74b57d4679 | |
|
470fb7a5fb | |
|
fed4818c27 | |
|
79f92cedd2 | |
|
6c73144b50 | |
|
d25d60cc3e | |
|
9a81791bc9 | |
|
504cb8a783 | |
|
b26d69384f | |
|
31f1375b8e | |
|
9f7ceeded3 | |
|
be97bd1d71 | |
|
69b607176c | |
|
7cbbad67aa | |
|
a523838cc6 | |
|
b98d91f745 | |
|
7e614bc534 | |
|
d0f01b6bc4 | |
|
105d7acfa9 | |
|
5e1575dabc | |
|
8fa84c836a | |
|
e0eb39a295 | |
|
df540ad5ca | |
|
f1b2dbeaa7 | |
|
cc104320e8 | |
|
92fd79ff55 | |
|
91f3494a8a | |
|
b99b7511ec | |
|
a55c8ab377 | |
|
4e6e6e314a | |
|
ecb169c705 | |
|
0e36a3b852 | |
|
ec09d6b8a4 | |
|
03a994af50 | |
|
3f29bfa212 | |
|
080b338a8f | |
|
8318766593 | |
|
cfaf15f54c | |
|
dd03a29b00 | |
|
ed9912fae2 | |
|
ce415a6e2a | |
|
62750b505f | |
|
61bcf0e5b7 | |
|
66b7bb2ca1 | |
|
771a7dd43c | |
|
dc7bc4d116 | |
|
b277aef435 | |
|
75b0fef741 | |
|
d3309e89e8 | |
|
3ee5cf32b6 | |
|
a57b19332a | |
|
9c7f6faf76 | |
|
50416ecc7f | |
|
32c6e1fdee | |
|
734a6625c4 | |
|
b56fbbb604 | |
|
a435932b04 | |
|
11f5eac21f | |
|
03fcfc006f | |
|
f5d31cd93c | |
|
3cc369a27d | |
|
60c6c8d8ca | |
|
3634fff4dd | |
|
09b4ef9e9c | |
|
2555980b41 | |
|
2873645068 | |
|
22095f23f6 | |
|
0f16860dbd | |
|
6d63f74d18 | |
|
497d87a028 | |
|
3c7758fdbc | |
|
4fde05380f | |
|
ddf69b4883 | |
|
d70bd5e637 | |
|
c0187a19ea | |
|
1608244556 | |
|
8eea955f56 | |
|
ff77af148e | |
|
c74bfb5339 | |
|
ea226b882d | |
|
20ba3958fa | |
|
2ed28badfd | |
|
e228f526a3 | |
|
3b1d7a3b26 | |
|
49840c9a85 | |
|
e27bfcedb6 | |
|
cdc0fc04e2 | |
|
27110e0943 | |
|
1fb763761b | |
|
8679633cd9 | |
|
6e7f66b216 | |
|
457a4bec92 | |
|
490aac1b48 | |
|
2d22b8729d | |
|
e16efbbeee | |
|
cf675a9284 | |
|
15a2c1b591 | |
|
3af8a917a2 | |
|
a100aff4de | |
|
cc39d51a4c | |
|
ff4545dae0 | |
|
6781899247 | |
|
2bb254c898 | |
|
40477d3f00 | |
|
2b81be8859 | |
|
aedf4454f5 | |
|
2c43afe338 | |
|
1fb91028ad | |
|
89d2f74d24 | |
|
e01211d6b4 | |
|
e25e697970 | |
|
4334da370e | |
|
5e74185327 | |
|
888cba625c | |
|
9e0127e74c | |
|
5b832e457c | |
|
95718c9474 | |
|
77af32d121 | |
|
eef421fb63 | |
|
7b861ecbbc | |
|
acad529654 | |
|
584193eb39 | |
|
4479d06ebd | |
|
938eef1b00 | |
|
7b47e82eae | |
|
382a5ec452 | |
|
959f1e5496 | |
|
14a950bc29 | |
|
9c8e07a06a | |
|
84d6da8ef6 | |
|
e8db20a722 | |
|
0fa3f09ca2 | |
|
7f30aba6bd | |
|
028ceb7ebf | |
|
b4fceaa008 | |
|
f806ffdc70 | |
|
0bc8eb65b3 | |
|
4c3888b18e | |
|
7fd9d1e342 | |
|
11a063bad0 | |
|
98d636b99d | |
|
5f225d6be3 | |
|
d8b2b776a8 | |
|
35f639faf1 | |
|
1d5446f117 | |
|
22328703cc | |
|
4159360ee5 | |
|
4b7e79cc35 | |
|
78a6a47b05 | |
|
e6b5a29196 | |
|
a80afd357e | |
|
5085af0d28 | |
|
9f3ad7d603 | |
|
c14c6fe993 | |
|
240bb76bd5 | |
|
066c0b3837 | |
|
a8dbb3dd51 | |
|
9ac9e0e6d0 | |
|
84570a5f0a | |
|
65fe25dcd6 | |
|
d09698496d | |
|
234d6d1b06 | |
|
6e0d8de885 | |
|
b12aeb80fb | |
|
04b3830fb6 | |
|
d841582d67 | |
|
25cc88e1a2 | |
|
8fc89d01cb | |
|
af8e27f059 | |
|
d61e64c9c7 | |
|
15271d0438 | |
|
0bd4026898 | |
|
c05f963719 | |
|
4849329818 | |
|
e1126c9cf8 | |
|
102d55d4a5 | |
|
516f211843 | |
|
57954ad41e | |
|
da577a463d | |
|
8c97e67ceb | |
|
a4b641790b | |
|
0a7f80ccbe | |
|
d2d4a849f4 | |
|
e4b0d08fad | |
|
bbb498c680 | |
|
af8139e957 | |
|
ef03943c35 | |
|
575b53ab03 | |
|
c53b15bd9a | |
|
cab13ce32a | |
|
d0ff4c9d6b | |
|
8d05fd7c1b | |
|
79e44053d3 | |
|
f3bc6360bf | |
|
c9fab8c242 | |
|
64dfed2a07 | |
|
fc32b300f3 | |
|
4e0073ae6f | |
|
af7f384cf3 | |
|
1f45bf7e43 | |
|
4b033c766b | |
|
5b41c67d7a | |
|
7df26b6068 | |
|
4187636f41 | |
|
4298e7dce6 | |
|
fdd3992f65 | |
|
e10e774d32 | |
|
e4955d69ef | |
|
0d66f91c91 | |
|
e7c77290cc | |
|
b0ecda5d2e | |
|
efc42481d5 | |
|
09476f1ca9 | |
|
735892cb99 | |
|
e934c100a2 | |
|
17ba786cea | |
|
091d41dfe0 | |
|
255e60cdcd | |
|
532c26d7c8 | |
|
ede4afc7b6 | |
|
213a3dc5d8 | |
|
5d2a05f5e0 | |
|
d2e62acf0d | |
|
620de476df | |
|
d35b7ff174 | |
|
29323f8d94 | |
|
0d9d5a5eb7 | |
|
468f2997ff | |
|
c057f65b28 | |
|
90beaaff1d | |
|
ba2da45819 | |
|
eea6ad7beb | |
|
4e0ee15b73 | |
|
4551f0850b | |
|
6f157854ce | |
|
fc5f16dbcb | |
|
b687a97334 | |
|
d9bcc26c36 | |
|
e4e3dde61f | |
|
c1f15fc0ac | |
|
c08371ebb0 | |
|
5469442eaa | |
|
186dbca7ce | |
|
ab742b34b6 | |
|
94c73b6ec8 | |
|
e36ece2b88 | |
|
e241101c12 | |
|
8c335522e1 | |
|
28edb1dc5a | |
|
cf451d2b2b | |
|
69a7c1f9ba | |
|
4b5c61145a | |
|
4fca5fe08c | |
|
8ccba5e204 | |
|
d938c433ab | |
|
f95a052e55 | |
|
02d14351fc | |
|
7550980be8 | |
|
36e620d769 | |
|
a83c54387d | |
|
70cc65f786 | |
|
aeeadde299 | |
|
ebb892def1 | |
|
75ee40b98f | |
|
8e4dd05379 | |
|
4230961e9f | |
|
8f66d69286 | |
|
c70a5b108f | |
|
6fd05675aa | |
|
4a4339f023 | |
|
f5e9640ee8 | |
|
0a7acff783 | |
|
707b0d21c8 | |
|
045d0d481c | |
|
e5e2cbfd86 | |
|
f837e32204 | |
|
a0896ac4bf | |
|
e6f5cdb45b | |
|
60be402062 | |
|
466302131e | |
|
8336500585 | |
|
9424eed85a | |
|
db4207f60d | |
|
170795ad06 | |
|
f5290b6a68 | |
|
504881fc6f | |
|
9d7fcba575 | |
|
111794158c | |
|
7e9563faed | |
|
7fe2d5b346 | |
|
24b58074bf | |
|
d50860c089 | |
|
ca36c879a0 | |
|
ae2b16665b | |
|
0c0868517c | |
|
fed8cc51ed | |
|
61c0a51ec5 | |
|
2a6318afd2 | |
|
4fd8d3dddd | |
|
39f7e87f1a | |
|
a970dd420f | |
|
6d7645705a | |
|
b39ddf01d0 | |
|
f8b041cd40 | |
|
cf387ca3f2 | |
|
fa1fa55110 | |
|
4d67db5b83 | |
|
6dba2b98a0 | |
|
16a82eede2 | |
|
a58037904f | |
|
b5d1dfd9e7 | |
|
1f9424ccf2 | |
|
f0bd64d57a | |
|
03425d192d | |
|
6b2d9a2d70 | |
|
867d4d0db6 | |
|
84c40ca464 | |
|
08c0c4d6e4 | |
|
9b97eb9361 | |
|
1128ebdd54 | |
|
68fbb93cd6 | |
|
8c46e969d6 | |
|
2a9dd53d8d | |
|
11b0346ded | |
|
853bc6c150 | |
|
f84c67282d | |
|
d85d395770 | |
|
875ef3f9d4 | |
|
89b6c04d4f | |
|
54498cd556 | |
|
ebe3d361ea | |
|
5a388386b4 | |
|
f91e263f09 | |
|
f3e3e47e15 | |
|
ad23c446b6 | |
|
d79884f10a | |
|
240b34e215 | |
|
0b1e0e6d0f | |
|
2fa7fbefa4 | |
|
3e2464af6d | |
|
a09a051ed5 | |
|
a2bdfb2f22 | |
|
9d3905459e | |
|
b777552f34 | |
|
caba5f19d5 | |
|
f94798b237 | |
|
05efbd79de | |
|
8bde787703 | |
|
71b2a44945 | |
|
3afba25dad | |
|
a5027981d9 | |
|
2a50f4d2ac | |
|
57a04f61db | |
|
77802808ce | |
|
792ecd65b8 | |
|
2ce806c05b | |
|
a9eb9ccca9 | |
|
d09675539e | |
|
614d317fd8 | |
|
0d2256df09 | |
|
b305f073fe | |
|
4dbe1813e4 | |
|
5e64f1262b | |
|
91f04ecd5e | |
|
4047bd09da | |
|
ce1185166c | |
|
29b033c14c | |
|
fbae577a54 | |
|
746c26dafc | |
|
8ebb047693 | |
|
f9c2f96996 | |
|
11cd892662 | |
|
e4fa06a57b | |
|
0cb513e9b7 | |
|
6519a05780 | |
|
fe7a1e89e3 | |
|
5bbcbb97a1 | |
|
0a809cb7d8 | |
|
ee2a1fbfe6 | |
|
8a8a017fc5 | |
|
6c1e00fc3f | |
|
8eeb3a6650 | |
|
f55721d261 | |
|
746a827baa | |
|
eb6c6e3f67 | |
|
98dc4018c3 | |
|
91a73ab3d0 | |
|
4165e874de | |
|
13ddf9ad83 | |
|
3e97e1f032 | |
|
c5b839bda8 | |
|
7c766e5284 | |
|
bc2ec7cee3 | |
|
95e9fa1f35 | |
|
0129550130 | |
|
54f3179c0e | |
|
c8a9da69ea | |
|
5663f914fb | |
|
e60afbdf0c | |
|
296491f906 | |
|
8eab1530bf | |
|
0d156abf5a | |
|
638b841855 | |
|
17d44a769c | |
|
34af4a22f2 | |
|
94cc17ff16 | |
|
8da3775e22 | |
|
5a65d2b693 | |
|
d3d2dbc1d3 | |
|
b839b97ac2 | |
|
a2e15a169d | |
|
4f37fb1e93 | |
|
71d8a50519 | |
|
46ad6a82ed | |
|
fc4e4f23df | |
|
16b62f43eb | |
|
69b54be99c | |
|
e747efe415 | |
|
1ef4db8e9d | |
|
d09e892285 | |
|
2c2359af61 | |
|
438870785a | |
|
b0aae6b51d | |
|
0433c47466 | |
|
de269a4695 | |
|
4ae24761c7 | |
|
7baec89d4c | |
|
736d9f20bf | |
|
aadd4dc8bb | |
|
5ae854b8bf | |
|
75b0ae669a | |
|
61cd25d862 | |
|
f88214ab76 | |
|
3752bf0a46 | |
|
c0831dd598 | |
|
c1b4694931 | |
|
aa1c38eb4f | |
|
426d59d767 | |
|
de490408cd | |
|
69aed75d57 | |
|
1bb5320957 | |
|
155b2b0d7a | |
|
2675554f6a | |
|
45d12a9f0b | |
|
5a4628e6fe | |
|
91d638e4cd | |
|
47dc07e940 | |
|
c53f074fdf | |
|
d67949d1e7 | |
|
0d6d8116bc | |
|
e582f0f23e | |
|
22a8550caa | |
|
dd836b2a11 | |
|
9eae0968a7 | |
|
5c5feeed05 | |
|
acf2fea365 | |
|
93f9f4c7d3 | |
|
10a28817d0 | |
|
2d58ed465c | |
|
157f988791 | |
|
08bf613cde | |
|
95618bb3a7 | |
|
afe5db6b55 | |
|
dace6f2453 | |
|
508127a856 | |
|
d75ba83013 | |
|
1bb2daff1e | |
|
f3f854b35f | |
|
b9f8f94361 | |
|
b3ce2cd897 | |
|
69de906746 | |
|
638bc9f7b1 | |
|
1a72454b88 | |
|
5f60683f57 | |
|
e7439cdaae | |
|
8b96cd2f40 | |
|
c0bd844403 | |
|
c7f4fc3625 | |
|
26566a3b00 | |
|
7f4bdc0868 | |
|
eb4ba438f7 | |
|
8a6f7d5b90 | |
|
0c3eb08f4d | |
|
3a19050413 | |
|
7230031c0a | |
|
1bccd56244 | |
|
c322a8a330 | |
|
83bf5ab08b | |
|
1457c1a2b5 | |
|
b3128652f4 | |
|
8291cdb455 | |
|
05585281eb | |
|
df3725e635 | |
|
b062974fb1 | |
|
0b388872ea | |
|
3e90795680 | |
|
af6947cbb3 | |
|
8b9041325b | |
|
30043d2ba5 | |
|
51eb2fdf55 | |
|
ae2cc39a36 | |
|
f5662bbf32 | |
|
2d20e18b8a | |
|
25f7f2182b | |
|
80864655d7 | |
|
a85b17c885 | |
|
58885e04d7 | |
|
35c803208b | |
|
fb6642d6a5 | |
|
521e46879b | |
|
9ce441e59a | |
|
de59b700ce | |
|
0a717f5d51 | |
|
d691973571 | |
|
8c3d348f05 | |
|
3c5f2d4c4d | |
|
a8351f80e6 | |
|
e397d1e020 | |
|
4cbdfde0e6 | |
|
c613743644 | |
|
973fcbddcc | |
|
47b77c948a | |
|
98a2c497d2 | |
|
fbc3b2d6a8 | |
|
b88c74b4c8 | |
|
276b4c6cd8 | |
|
d601443c7e | |
|
31a07752f0 | |
|
ebd94f48cf | |
|
7647005285 | |
|
3cc44ffcb1 | |
|
3be47edbb3 | |
|
b74c62066c | |
|
689447509a | |
|
28ffb2fdf6 | |
|
6b4ee4ed31 | |
|
af617e92a7 | |
|
e710286e45 | |
|
d859e93c7e | |
|
d0a80925c2 | |
|
3373ed5056 | |
|
5e269b69fa | |
|
820a657297 | |
|
f632ef8939 | |
|
51bfa9c86a | |
|
3aca772220 | |
|
e3947d7110 | |
|
f6619d28d8 | |
|
40269a241c | |
|
65663e6da8 | |
|
6a0d1a968d | |
|
074344fbf9 | |
|
ca50a984c8 | |
|
3bec89bee5 | |
|
8dfb7454d6 | |
|
7bf481d812 | |
|
59f4feb5e6 | |
|
d8cc7b1ba3 | |
|
2e4c0928f7 | |
|
fda5394540 | |
|
8b414c8570 | |
|
e47bd33ec0 | |
|
bf7f44dcb7 | |
|
f673e12106 | |
|
5db5a8b5e6 | |
|
145e6928bd | |
|
505bcf028b | |
|
dbc53e773d | |
|
bb29789d24 | |
|
a543c23926 | |
|
84ad5850c9 | |
|
46ea366f5f | |
|
560f168460 | |
|
6c7c5c9281 | |
|
15cda6a21d | |
|
c3b59e76fa | |
|
b5ac8c1b50 | |
|
87b7c6a834 | |
|
75f1aa6ccd | |
|
53e23f1358 | |
|
22f48c3cda | |
|
b7b90cafaf | |
|
a3f02905b0 | |
|
afdf25340c | |
|
0e66d28be8 | |
|
9586418522 | |
|
7793629515 | |
|
5f73fded75 | |
|
b1489eac1f | |
|
0f1dd9cdd2 | |
|
cbb668379f | |
|
cbc8b1e303 | |
|
d8d57ab9ad | |
|
c41627ae0d | |
|
6d13ec19cd | |
|
2347d7d775 | |
|
8ca93a22de | |
|
15943b1b49 | |
|
d58d90752b | |
|
a8d2e489ad | |
|
3034e0c62a | |
|
15efffb625 | |
|
6d29e6044e | |
|
55aa759730 | |
|
6446643396 | |
|
32e4e8fa9d | |
|
4ecf6b23dc | |
|
c86df63b7a | |
|
f312a6cfc5 | |
|
d0ff5d8fea | |
|
015e387ea5 | |
|
b9e8455e27 | |
|
1f638ccd0b | |
|
fcd595298a | |
|
7971152742 | |
|
450aabefcc | |
|
09492cbf46 | |
|
6350b4fad4 | |
|
972ebf55d0 | |
|
d436165a88 | |
|
7c902bf73c | |
|
9476263b1b | |
|
dc7d7e7689 | |
|
2404cc2c8e | |
|
262263dbf4 | |
|
45de1f65b3 | |
|
dbad8a9003 | |
|
cb1dff1ac7 | |
|
8beace7036 | |
|
ab60211020 | |
|
3cbef7ee9e | |
|
37880d6869 | |
|
f302102301 | |
|
75352891e7 | |
|
488820286e | |
|
55b7ebac48 | |
|
0dc08a30ce | |
|
540ffb8a4a | |
|
319a20a66c | |
|
d52b10e703 | |
|
e91f7d53b5 | |
|
ac6e0b641d | |
|
44b8e44c07 | |
|
e2170cb115 | |
|
0c5dd59035 | |
|
898fc15b6b | |
|
16da0a01b5 | |
|
276e9fa5f3 | |
|
c7d40e2cbc |
|
@ -0,0 +1,9 @@
|
|||
;; emacs local configuration settings for getdns source
|
||||
;; surmised by dkg on 2015-07-19 10:10:51+0200
|
||||
|
||||
((c-mode
|
||||
(indent-tabs-mode . t)
|
||||
(tab-width . 8)
|
||||
(c-basic-offset . 8)
|
||||
(c-file-style . "linux"))
|
||||
)
|
|
@ -0,0 +1,18 @@
|
|||
/.dir-locals.el export-ignore
|
||||
/.gitattributes export-ignore
|
||||
/.gitignore export-ignore
|
||||
/.gitmodules export-ignore
|
||||
/.indent.pro export-ignore
|
||||
/.travis.yml export-ignore
|
||||
/getdns.pmdoc export-ignore
|
||||
/gldns/compare.sh export-ignore
|
||||
/gldns/import.sh export-ignore
|
||||
/project-doc export-ignore
|
||||
/src/test/tpkg export-ignore
|
||||
/src/test/README export-ignore
|
||||
/src/tools/Dockerfile export-ignore
|
||||
/src/tools/README.adoc export-ignore
|
||||
/src/util/import.sh export-ignore
|
||||
/src/mk-const-info.c.sh export-ignore
|
||||
/src/mk-symfiles.sh export-ignore
|
||||
/README export-ignore
|
|
@ -1,5 +1,7 @@
|
|||
*~
|
||||
.DS_Store
|
||||
build*/
|
||||
tests*/
|
||||
getdns*.tar.gz
|
||||
*.o
|
||||
*.so
|
||||
|
@ -14,6 +16,9 @@ config.status
|
|||
autom4te.cache
|
||||
missing
|
||||
libtool
|
||||
config.guess
|
||||
config.sub
|
||||
install-sh
|
||||
spec/example/example-all-functions
|
||||
spec/example/example-reverse
|
||||
spec/example/example-simple-answers
|
||||
|
@ -26,16 +31,40 @@ src/test/tests_dict
|
|||
src/test/tests_list
|
||||
src/test/tests_stub_async
|
||||
src/test/tests_stub_sync
|
||||
src/test/tests_json-pointers
|
||||
src/test/tests_dnssec
|
||||
src/test/tests_namespaces
|
||||
src/test/check_getdns
|
||||
src/test/check_getdns_event
|
||||
src/test/check_getdns_uv
|
||||
src/test/check_getdns_ev
|
||||
src/test/getdns_query
|
||||
src/test/scratchpad
|
||||
src/test/scratchpad.c
|
||||
src/tools/getdns_query
|
||||
src/tools/getdns_server_mon
|
||||
src/stubby
|
||||
doc/*.3
|
||||
src/getdns/getdns.h
|
||||
*.log
|
||||
src/Doxyfile
|
||||
src/getdns/getdns_extra.h
|
||||
src/version.c
|
||||
aclocal.m4
|
||||
configure
|
||||
ltmain.sh
|
||||
m4/libtool.m4
|
||||
m4/ltoptions.m4
|
||||
m4/ltsugar.m4
|
||||
m4/ltversion.m4
|
||||
m4/lt~obsolete.m4
|
||||
src/config.h.in
|
||||
getdns.pc
|
||||
getdns_ext_event.pc
|
||||
/src/test/tpkg/result.*
|
||||
/src/test/tpkg/.done-*
|
||||
/src/test/tpkg/.tpkg.var.master
|
||||
/src/test/tpkg/scan-build-reports/
|
||||
/src/test/tpkg/install/
|
||||
/src/test/tpkg/build/
|
||||
/src/test/tpkg/build-stub-only/
|
||||
/src/test/tpkg/build-event-loops/
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
[submodule "src/test/jsmn"]
|
||||
path = src/jsmn
|
||||
url = https://github.com/getdnsapi/jsmn.git
|
||||
branch = getdns
|
||||
[submodule "src/yxml"]
|
||||
path = src/yxml
|
||||
url = https://github.com/getdnsapi/yxml.git
|
||||
branch = master
|
||||
[submodule "stubby"]
|
||||
path = stubby
|
||||
url = https://github.com/getdnsapi/stubby.git
|
||||
branch = develop
|
||||
[submodule "src/ssl_dane"]
|
||||
path = src/ssl_dane
|
||||
url = https://github.com/getdnsapi/ssl_dane
|
||||
branch = getdns
|
30
.travis.yml
30
.travis.yml
|
@ -1,13 +1,27 @@
|
|||
sudo: false
|
||||
dist: bionic
|
||||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
before_script:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install libunbound-dev libldns-dev libidn11-dev check libevent-dev
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- libunbound-dev
|
||||
- libidn2-0-dev
|
||||
- libyaml-dev
|
||||
- check
|
||||
- libevent-dev
|
||||
- libev-dev
|
||||
- libuv-dev
|
||||
- valgrind
|
||||
- clang
|
||||
- wget
|
||||
- openssh-client
|
||||
- libgnutls28-dev
|
||||
script:
|
||||
- ./configure --with-libevent
|
||||
- make
|
||||
- sudo PATH=$PATH make install
|
||||
- make test
|
||||
- sudo make uninstall
|
||||
- mkdir tests
|
||||
- cd tests
|
||||
- ../src/test/tpkg/run-all.sh
|
||||
# - ../src/test/tpkg/run-one.sh 290-transports.tpkg -V
|
||||
|
|
File diff suppressed because it is too large
Load Diff
582
ChangeLog
582
ChangeLog
|
@ -1,3 +1,583 @@
|
|||
* 2023-??-??: Version 1.7.4
|
||||
* Issue #536: Broken trust anchor files are silently ignored
|
||||
Thanks Stéphane Bortzmeyer
|
||||
|
||||
* 2022-12-22: Version 1.7.3
|
||||
* PR #532: Increase CMake required version 3.5 -> 3.20, because we
|
||||
need cmake_path for Absolute paths in pkg-config (See Issue #517)
|
||||
Thanks Gabriel Ganne
|
||||
* Updated to Stubby 0.4.3 quickfix release
|
||||
|
||||
* 2022-08-19: Version 1.7.2
|
||||
* Updated to Stubby 0.4.2 quickfix release
|
||||
|
||||
* 2022-08-19: Version 1.7.1
|
||||
* Always send the `dot` ALPN when using DoT
|
||||
* Strengthen version determination for Libidn2 during cmake processing
|
||||
(thanks jpbion).
|
||||
* Fix for issue in UDP stream selection in case of timeouts.
|
||||
Thanks Shikha Sharma
|
||||
* Fix using asterisk in ipstr for any address. Thanks uzlonewolf.
|
||||
* Issue stubby#295: rdata not correctly written for validation for
|
||||
certain RR type. Also, set default built type to RelWithDebInfo and
|
||||
expose CFLAGS via GETDNS_BUILD_CFLAGS define and via
|
||||
getdns_context_get_api_information()
|
||||
* Issue #524: Bug fixes from submodules' upstream?
|
||||
Thanks Johnnyslee
|
||||
* Issue #517: Allow Absolute path CMAKE_INSTALL_{INCLUDE,LIB}DIR in
|
||||
pkg-config files. Thanks Alex Shpilkin
|
||||
* Issue #512: Update README.md to show correct PGP key location.
|
||||
Thanks Katze Prior.
|
||||
|
||||
* 2021-06-04: Version 1.7.0
|
||||
* Make TLS Handshake timeout max 4/5th of timeout for the query,
|
||||
just like connection setup timeout was, so fallback transport
|
||||
have a chance too when TCP connection setup is less well
|
||||
detectable (as with TCP_FASTOPEN on MacOS).
|
||||
* Issue #466: Memory leak with retrying queries (for examples
|
||||
with search paths). Thanks doublez13.
|
||||
* Issue #480: Handling of strptime when Cross compiling with CMake.
|
||||
A new option to FORCE_COMPAT_STRPTIME (default disabled) will
|
||||
(when disabled) make cmake assume the target platform has a POSIX
|
||||
compatible strptime when cross-compiling.
|
||||
* Setting of the number of milliseconds send data may remain
|
||||
unacknowledged by the peer in a TCP connection (when supported
|
||||
by the OS) with getdns_context_set_tcp_send_timeout()
|
||||
Thanks maciejsszmigiero.
|
||||
* Issue #497: Fix typo in CMAKE included files, so Stubby can use
|
||||
TLS v1.3 with chipersuites options ON. Thanks har-riz.
|
||||
* Basic name compression on server replied messages. Thanks amialkow!
|
||||
This alleviates (but might not completely resolve) issues #495 and
|
||||
#320 .
|
||||
* Eventloop extensions back to the old names libgetdns_ext_event,
|
||||
libgetdns_ext_ev and libgetdns_ext_uv.
|
||||
* Compilation warning fixes. Thanks Andreas!
|
||||
|
||||
* 2020-02-28: Version 1.6.0
|
||||
* Issues #457, #458, #461: New symbols with libnettle >= 3.4.
|
||||
Thanks hanvinke & kometchtech for testing & reporting.
|
||||
* Issue #432: answer_ipv4_address and answer_ipv6_address in reply
|
||||
and response dicts.
|
||||
* Issue #430: Record and guard UDP max payload size with servers.
|
||||
* Issue #407: Run only offline-tests option with:
|
||||
src/test/tpkg/run-offline-only.sh (only with git checkouts).
|
||||
* Issue #175: Include the packet the stub resolver sent to the
|
||||
upstream the call_reporting dict. Thanks Tom Pusateri
|
||||
* Issue #169: Build eventloop support libraries if event libraries
|
||||
are available. Thanks Tom Pusateri
|
||||
|
||||
* 2019-12-20: Version 1.6.0-beta.1
|
||||
* Migration of build system to cmake. Build now works on Ubuntu,
|
||||
Windows 10 and macOS.
|
||||
Some notes on minor differences in the new cmake build:
|
||||
* OpenSSL 1.0.2 or higher is now required
|
||||
* libunbound 1.5.9 is now required
|
||||
* Only libidn2 2.0.0 and later is supported (not libidn)
|
||||
* Windows uses ENABLE_STUB_ONLY=ON as the default
|
||||
* Unit and regression tests work on Linux/macOS
|
||||
(but not Windows yet)
|
||||
|
||||
* 2019-04-03: Version 1.5.2
|
||||
* PR #424: Two small trust anchor fetcher fixes
|
||||
Thanks Maciej S. Szmigiero
|
||||
* Issue #422: Enable server side and update client side TCP Fast
|
||||
Open implementation. Thanks Craig Andrews
|
||||
* Issue #423: Fix insecure delegation detection while scheduling.
|
||||
Thanks Charles Milette
|
||||
* Issue #419: Escape backslashed when printing in JSON format.
|
||||
Thanks boB Rudis
|
||||
* Use GnuTLS instead of OpenSSL for TLS with the --with-gnutls
|
||||
option to configure. libcrypto (from OpenSSL) still needed
|
||||
for Zero configuration DNSSEC.
|
||||
* DOA rr-type
|
||||
* AMTRELAY rr-type
|
||||
|
||||
* 2019-01-11: Version 1.5.1
|
||||
* Introduce proof of concept GnuTLS implementation. Incomplete support
|
||||
for Trust Anchor validation. Requires GnuTLS DANE library. Currently
|
||||
untested with GnuTLS prior to 3.5.19, so configure demands a minumum
|
||||
version of 3.5.0.
|
||||
* Be consistent and always fail connection setup if setting ciphers/curves/
|
||||
TLS version/cipher suites fails.
|
||||
* Refactor OpenSSL usage into modules under src/openssl.
|
||||
Drop support for LibreSSL and versions of OpenSSL prior to 1.0.2.
|
||||
* PR #414: remove TLS13 ciphers from cipher_list, but
|
||||
only when SSL_CTX_set_ciphersuites is available.
|
||||
Thanks Bruno Pagani
|
||||
* Issue #415: Filter out #defines etc. when creating
|
||||
symbols file. Thanks Zero King
|
||||
|
||||
* 2018-12-21: Version 1.5.0
|
||||
* RFE getdnsapi/stubby#121 log re-instantiating TLS
|
||||
upstreams (because they reached tls_backoff_time) at
|
||||
log level 4 (WARNING)
|
||||
* GETDNS_RESPSTATUS_NO_NAME for NODATA answers too
|
||||
* ZONEMD rr-type
|
||||
* getdns_query queries for addresses when a query name
|
||||
without a type is given.
|
||||
* RFE #408: Fetching of trust anchors will be retried
|
||||
after failure, after a certain backoff time. The time
|
||||
can be configured with
|
||||
getdns_context_set_trust_anchors_backoff_time().
|
||||
* RFE #408: A "dnssec" extension that requires DNSSEC
|
||||
verification. When this extension is set, Indeterminate
|
||||
DNSSEC status will not be returned.
|
||||
* Issue #410: Unspecified ownership of get_api_information()
|
||||
* Fix for DNSSEC bug in finding most specific key when
|
||||
trust anchor proves non-existance of one of the labels
|
||||
along the authentication chain other than the non-
|
||||
existance of a DS record on a zonecut.
|
||||
* Enhancement getdnsapi/stubby#56 & getdnsapi/stubby#130:
|
||||
Configurable minimum and maximum TLS versions with
|
||||
getdns_context_set_tls_min_version() and
|
||||
getdns_context_set_tls_max_version() functions and
|
||||
tls_min_version and tls_max_version configuration parameters
|
||||
for upstreams.
|
||||
* Configurable TLS1.3 ciphersuites with the
|
||||
getdns_context_set_tls_ciphersuites() function and
|
||||
tls_ciphersuites config parameter for upstreams.
|
||||
* Bugfix in upstream string configurations: tls_cipher_list and
|
||||
tls_curve_list
|
||||
* Bugfix finding signer for validating NSEC and NSEC3s, which
|
||||
caused trouble with the partly tracing DNSSEC from the root
|
||||
up, introduced in 1.4.2. Thanks Philip Homburg
|
||||
|
||||
* 2018-05-11: Version 1.4.2
|
||||
* Bugfix getdnsapi/stubby#87: Detect and ignore duplicate certs
|
||||
in the Windows root CA store.
|
||||
* PR #397: No TCP sendto without TCP_FASTOPEN
|
||||
Thanks Emery Hemingway
|
||||
* Bugfix getdnsapi/stubby#106: Core dump when printing certain
|
||||
configuration. Thanks Han Vinke
|
||||
* Bugfix getdnsapi/stubby#99: Partly trace DNSSEC from the root
|
||||
up (for tld and sld), to find insecure delegations quicker.
|
||||
Thanks UniverseXXX
|
||||
* Bugfix: Allow NSEC spans starting from (unexpanded) wildcards
|
||||
Bug was introduced when dealing with CVE-2017-15105
|
||||
* Bugfix getdnsapi/stubby#46: Don't assume trailing zero with
|
||||
string bindata's. Thanks Lonnie Abelbeck
|
||||
* Bugfix #394: Update src/compat/getentropy_linux.c in order to
|
||||
handle ENOSYS (not implemented) fallback.
|
||||
Thanks Brent Blood
|
||||
* Bugfix #395: Clarify that libidn2 dependency is for version 2.0.0
|
||||
or higher. Thanks mire3212
|
||||
|
||||
* 2018-03-12: Version 1.4.1
|
||||
* Bugfix #388: Prevent fallback to an earlier tries upstream within a
|
||||
single query. Thanks Robert Groenenberg
|
||||
* PR #387: Compile with OpenSSL with deprecated APIs disabled.
|
||||
Thanks Rosen Penev
|
||||
* PR #386: UDP failover improvements:
|
||||
- When all UDP upstreams fail, retry them (more or less) equally
|
||||
- Limit maximum UDP backoff (default to 1000)
|
||||
This is configurable with the --with-max-udp-backoff configure
|
||||
option.
|
||||
Thanks Robert Groenenberg
|
||||
* Bugfix: Find zonecut with DS queries (instead of SOA queries).
|
||||
Thanks Elmer Lastdrager
|
||||
* Bugfix #385: Verifying insecure NODATA answers (broken since 1.2.1).
|
||||
Thanks hanvinke
|
||||
* PR #384: Fix minor spelling and formatting. Thanks dkg.
|
||||
* Bugfix #382: Parallel install of getdns_query and getdns_server_mon
|
||||
|
||||
* 2018-02-21: Version 1.4.0
|
||||
* .so revision bump to please fedora packaging system.
|
||||
Thanks Paul Wouters
|
||||
* Specify the supported curves with getdns_context_set_tls_curves_list()
|
||||
An upstream specific list of supported curves may also be given
|
||||
with the tls_curves_list setting in the upstream dict with
|
||||
getdns_context_set_upstream_recursive_servers()
|
||||
* New tool getdns_server_mon for checking upstream recursive
|
||||
resolver's capabilities.
|
||||
* Improved handling of opportunistic back-off. If other transports
|
||||
are working, don’t forcibly promote failed upstreams just wait for
|
||||
the re-try timer.
|
||||
* Hostname authentication with libressl
|
||||
Thanks Norbert Copones
|
||||
* Security bugfix in response to CVE-2017-15105. Although getdns was
|
||||
not vulnerable for this specific issue, as a precaution code has been
|
||||
adapted so that signatures of DNSKEYs, DSs, NSECs and NSEC3s can not
|
||||
be wildcard expansions when used with DNSSEC proofs. Only direct
|
||||
queries for those types are allowed to be wildcard expansions.
|
||||
* Bugfix PR#379: Miscelleneous double free or corruption, and corrupted
|
||||
memory double linked list detected issue, with serving functionality.
|
||||
Thanks maddie and Bruno Pagani
|
||||
* Security Bugfix PR#293: Check sha256 pinset's
|
||||
with OpenSSL native DANE functions for OpenSSL >= 1.1.0
|
||||
with Viktor Dukhovni's danessl library for OpenSSL >= 1.0.0
|
||||
don't allow for authentication exceptions (like self-signed
|
||||
certificates) otherwise. Thanks Viktor Dukhovni
|
||||
* libidn2 support. Thanks Paul Wouters
|
||||
|
||||
* 2017-12-21: Version 1.3.0
|
||||
* Bugfix #300: Detect dnsmasq and skip unit test that fails with it.
|
||||
Thanks Tim Rühsen and Konomi Kitten
|
||||
* Specify default available cipher suites for authenticated TLS
|
||||
upstreams with getdns_context_set_tls_ciphers_list()
|
||||
An upstream specific available cipher suite may also be given
|
||||
with the tls_cipher_list setting in the upstream dict with
|
||||
getdns_context_set_upstream_recursive_servers()
|
||||
* PR #366: Add support for TLS 1.3 and Chacha20-Poly1305
|
||||
Thanks Pascal Ernster
|
||||
* Bugfix #356: Do Zero configuration DNSSEC meta queries over on the
|
||||
context configured upstreams. Thanks Andreas Schulze
|
||||
* Report default extension settings with
|
||||
getdns_context_get_api_information()
|
||||
* Specify locations at which CA certificates for verification purposes
|
||||
are located: getdns_context_set_tls_ca_path()
|
||||
getdns_context_set_tls_ca_file()
|
||||
* getdns_context_set_resolvconf() function to initialize a context
|
||||
upstreams and suffices with a resolv.conf file.
|
||||
getdns_context_get_resolvconf() to get the file used to initialize
|
||||
the context's upstreams and suffixes.
|
||||
getdns_context_set_hosts() function to initialize a context's
|
||||
LOCALNAMES namespace.
|
||||
getdns_context_get_hosts() function to get the file used to initialize
|
||||
the context's LOCALNAMES namespace.
|
||||
* get which version of OpenSSL was used at build time and at run time
|
||||
when available with getdns_context_get_api_information()
|
||||
* GETDNS_RETURN_IO_ERROR return error code
|
||||
* Bugfix #359: edns_client_subnet_private should set family
|
||||
Thanks Daniel Areiza & Andreas Schulze
|
||||
* Bugfix getdnsapi/stubby#34: Segfault issue with native DNSSEC
|
||||
validation. Thanks Bruno Pagani
|
||||
|
||||
* 2017-11-11: Version 1.2.1
|
||||
* Handle more I/O error cases. Also, when an I/O error does occur,
|
||||
never stop listening (with servers), and
|
||||
never exit (when running the built-in event loop).
|
||||
* Bugfix: Tolerate unsigned and unused RRsets in the authority section.
|
||||
Fixes DNSSEC with BIND upstream.
|
||||
* Bugfix: DNSSEC validation without support records
|
||||
* Bugfix: Validation of full recursive DNSKEY lookups
|
||||
* Bugfix: Retry to validate full recursion BOGUS replies with zero
|
||||
configuration DNSSEC only when DNSSEC was actually requested
|
||||
* Bugfix #348: Fix a linking issue in stubby when libbsd is present
|
||||
Thanks Remi Gacogne
|
||||
* More robust scheduling; Eliminating a segfault with long running
|
||||
applications.
|
||||
* Miscellaneous Windows portability fixes from Jim Hague.
|
||||
* Fix Makefile dependencies for parallel install.
|
||||
Thanks ilovezfs
|
||||
|
||||
* 2017-09-29: Version 1.2.0
|
||||
* Bugfix of rc1: authentication of first query with TLS
|
||||
Thanks Travis Burtrum
|
||||
* A function to set the location for library specific data,
|
||||
like trust-anchors: getdns_context_set_appdata().
|
||||
* Zero configuration DNSSEC - build upon the scheme
|
||||
described in RFC7958. The URL from which to fetch
|
||||
the trust anchor, the verification CA and email
|
||||
can be set with the new getdns_context_set_trust_anchor_url(),
|
||||
getdns_context_set_trust_anchor_verify_CA() and
|
||||
getdns_context_set_trust_anchor_verify_email() functions.
|
||||
The default values are to fetch from IANA and to validate
|
||||
with the ICANN CA.
|
||||
* Update of Stubby with yaml configuration file and
|
||||
logging from a certain severity support.
|
||||
* Fix tpkg exit status on test failure. Thanks Jim Hague.
|
||||
* Refined logging levels for upstream statistics
|
||||
* Reuse (best behaving) backed-off TLS upstreams when non are usable.
|
||||
* Let TLS upstreams back-off a incremental amount of time.
|
||||
Back-off time starts with 1 second and is doubled each failure, but
|
||||
will not exceed the time given by getdns_context_set_tls_backoff_time()
|
||||
* Make TLS upstream management more resilient to temporary outages
|
||||
(like laptop sleeps)
|
||||
|
||||
* 2017-09-04: Version 1.1.3
|
||||
* Small bugfixes that came out of static analysis
|
||||
* No annotations with the output of getdns_query anymore,
|
||||
unless -V option is given to increase verbosity
|
||||
Thanks Ollivier Robert
|
||||
* getdns_query will now exit with failure status if replies are BOGUS
|
||||
* Bugfix: dnssec_return_validation_chain now also works when fallback
|
||||
to full recursion was needed with dnssec_roadblock_avoidance
|
||||
* More clear build instructions from Paul Hoffman. Thanks.
|
||||
* Bugfix #320.1: Eliminate multiple closing of file descriptors
|
||||
Thanks Neil Cook
|
||||
* Bugfix #320.2: Array bounds bug in upstream_select
|
||||
Thanks Neil Cook
|
||||
* Bugfix #318: getdnsapi/getdns/README.md links to nonexistent wiki
|
||||
pages. Thanks James Raftery
|
||||
* Bugfix #322: MacOS 10.10 (Yosemite) provides TCP fastopen interface
|
||||
but does not have it implemented. Thanks Joel Purra
|
||||
* Compile without Stubby by default. Stubby now has a git repository
|
||||
of its own. The new Stubby repository is added as a submodule.
|
||||
Stubby will still be build alongside getdns with the --with-stubby
|
||||
configure option.
|
||||
|
||||
* 2017-07-03: Version 1.1.2
|
||||
* Bugfix for parallel make install
|
||||
* Bugfix to trigger event callbacks on socket errors
|
||||
* A getdns_context_set_logfunc() function with which one may
|
||||
register a callback log function for certain library subsystems
|
||||
at certain levels. Currently this can only be used for
|
||||
upstream stastistics subsystem.
|
||||
|
||||
* 2017-06-15: Version 1.1.1
|
||||
* Bugfix #306 hanging/segfaulting on certain (IPv6) upstream failures
|
||||
* Spelling fix s/receive/receive. Thanks Andreas Schulze.
|
||||
* Added stubby-setdns-macos.sh script to support Homebrew formula
|
||||
* Include stubby.conf in the districution tarball
|
||||
* Bugfix #286 reschedule reused listening addresses
|
||||
* Bugfix #166 Allow parallel builds and unit-tests
|
||||
* NSAP-PTR, EID and NIMLOC, TALINK, AVC support
|
||||
* Bugfix of TA RR type
|
||||
* OPENPGPKEY and SMIMEA support
|
||||
* Bugfix TAG rdata type presentation format for CAA RR type
|
||||
* Bugfix Zero sized gateways with IPSECKEY gateway_type 0
|
||||
* Guidance for integration with systemd
|
||||
* Also check for memory leaks with advances server capabilities.
|
||||
* Bugfix convert IP string to IP dict with getdns_str2dict() directly.
|
||||
|
||||
* 2017-04-13: Version 1.1.0
|
||||
* bugfix: Check size of tls_auth_name.
|
||||
* Improvements that came from Visual Studio static analysis
|
||||
* Fix to compile with libressl. Thanks phicoh.
|
||||
* Spelling fixes. Thanks Andreas Schulze.
|
||||
* bugfix: Reschedule request timeout when getting the DNSSEC chain.
|
||||
* getdns_context_unset_edns_maximum_udp_payload_size() to reset
|
||||
to default IPv4/IPv6 dependent edns max udp payload size.
|
||||
* Implement sensible default edns0 padding policy. Thanks DKG.
|
||||
* Keep connections open with sync requests too.
|
||||
* Fix of event loops so they do not give up with naked timers with
|
||||
windows. Thanks Christian Huitema.
|
||||
* Include peer certificate with DNS-over-TLS in combination with
|
||||
the return_call_reporting extension.
|
||||
* More fine grained control over TLS upstream retry and back off
|
||||
behaviour with getdns_context_set_tls_backoff_time() and
|
||||
getdns_context_set_tls_connection_retries().
|
||||
* New round robin over the available upstreams feaure.
|
||||
Enable with getdns_context_set_round_robin_upstreams()
|
||||
* Bugfix: Queue requests when no sockets available for outgoing queries.
|
||||
* Obey the outstanding query limit with STUB resolution mode too.
|
||||
* Updated stubby config file
|
||||
* Draft MDNS client implementation by Christian Huitema.
|
||||
Enable with --enable-draft-mdns-support to configure
|
||||
* bugfix: Let synchronous queries use fds > MAX_FDSETSIZE;
|
||||
By moving default eventloop from select to poll
|
||||
Thanks Neil Cook
|
||||
* bugfix: authentication failure for self signed cert + only pinset
|
||||
* bugfix: issue with session re-use making authentication appear to fail
|
||||
|
||||
* 2017-01-13: Version 1.0.0
|
||||
* edns0_cookies extension enabled by default (per RFC7873)
|
||||
* dnssec_roadblock_avoidance enabled by default (per RFC8027)
|
||||
* bugfix: DSA support with OpenSSL 1.1.0
|
||||
* Initialize OpenSSL just once in a thread safe way
|
||||
* Thread safety with arc4random function
|
||||
* Improvements that came from Visual Studio static analysis
|
||||
Thanks Christian Huitema
|
||||
* Conventional RFC3986 IPv6 [address]:port parsing from getdns_query
|
||||
* bugfix: OpenSSL 1.1.0 style crypto locking
|
||||
Thanks volkommenheit
|
||||
* configure tells *which* dependency is missing
|
||||
* bugfix: Exclude terminating '\0' from bindata's returned by
|
||||
getdns_get_suffix(). Thanks Jim Hague
|
||||
* Better README.md. Thanks Andrew Sullivan
|
||||
|
||||
* 2016-10-19: Version 1.1.0-a2
|
||||
* Improved TLS connection management
|
||||
* OpenSSL 1.1 support
|
||||
* Stubby, Server version of getdns_query that by default listens
|
||||
on 127.0.0.1 and ::1 and reads config from /etc/stubby.conf
|
||||
and $HOME/.stubby.conf
|
||||
|
||||
* 2016-07-14: Version 1.1.0a1
|
||||
* Conversion functions from text strings to getdns native types:
|
||||
getdns_str2dict(), getdns_str2list(), getdns_str2bindata() and
|
||||
getdns_str2int()
|
||||
* A getdns_context_config() function that configures a context
|
||||
with settings given in a getdns_dict
|
||||
* A a getdns_context_set_listen_addresses() function and companion
|
||||
getdns_reply() function to construct simple name servers.
|
||||
* Relocate getdns_query to src/tools and build by default
|
||||
* Enhancements to the logic used to select connection based upstream
|
||||
transports (TCP, TLS) to improve robustness and re-use of
|
||||
connections/upstreams.
|
||||
|
||||
* 2016-07-14: Version 1.0.0b2
|
||||
* Collect coverage information from the unit tests
|
||||
Thanks Shane Kerr
|
||||
* pkg-config for the getdns_ext_event library
|
||||
Thanks Tom Pusateri
|
||||
* Bugfix: Multiple requests on the same upstream with a transport
|
||||
that keeps connections open in synchronous stub mode.
|
||||
* Canonicalized DNSSEC chain with dnssec_return_validation_chain
|
||||
(when validated)
|
||||
* A dnssec_return_full_validation_chain extension which includes
|
||||
then validated resource records.
|
||||
* Bugfix: Callbacks fired while scheduling (answer from cache)
|
||||
with the unbound plugable event API
|
||||
* header extension to set opcode and flags in stub mode
|
||||
* Unit tests that cover more code
|
||||
* Static checking with the clang analyzer
|
||||
* getdns_pretty_print_dict prints dname's as primitives
|
||||
* Accept just bindata's instead of address dicts.
|
||||
Allow misshing "address_type" in address dicts.
|
||||
* TLS session resumption
|
||||
* -C <config file> option to getdns_query to configure context
|
||||
from a json like formatted file. The output of -i (print API
|
||||
information) can be used as config file directly.
|
||||
Settings may also be given in this format as arguments of
|
||||
the getdns_query command directly.
|
||||
* DNS server mode for getdns_query. Enable by providing addresses
|
||||
to listen on, either by giving "-z <listen address>" options or by
|
||||
providing "listen_addresses" in the config file or settings.
|
||||
* Bugfixes from deckard testing: CNAME loop protection.
|
||||
* "srv_addresses" in response dict with getdns_service()
|
||||
* use libbsd when available
|
||||
Thanks Guillem Jover
|
||||
* Bugfix: DNSSEC wildcard validation issue
|
||||
* Bugfix: TLS timeouts not re-using a connection
|
||||
* A getdns_context_get_eventloop(), to get the current
|
||||
(pluggable) eventloop from context
|
||||
* getdns_query now uses the default event loop (instead of custom)
|
||||
* Return call_reporting info in case of timeout
|
||||
Thanks Robert Groenenberg
|
||||
* Bugfix: Build fails with autoconf 2.63, works with 2.68.
|
||||
Thanks Robert Groenenberg
|
||||
* Doxygen output for getdns.h and getdns_extra.h only
|
||||
* Do not call SSL_library_init() from getdns_context_create() when
|
||||
the second bit from the set_from_os parameter is set.
|
||||
|
||||
* 2016-03-31: Version 1.0.0b1
|
||||
* openssl 1.1.0 support
|
||||
* GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST default suffix handling
|
||||
* getdns_context_set_follow_redirects()
|
||||
* Read suffix list from registry on Windows
|
||||
* A dnssec_return_all_statuses extension
|
||||
* Set root servers without temporary file (libunbound >= 1.5.8 needed)
|
||||
* Eliminate unit test's ldns dependency
|
||||
* pkts wireformat <-> getdns_dict <-> string
|
||||
conversion functions
|
||||
* Eliminate all side effects when doing sync requests
|
||||
(libunbound >= 1.5.9 needed)
|
||||
* Bugfix: Load gost algorithm if digest is seen before key algorithm
|
||||
Thanks Jelte Janssen
|
||||
* Bugfix: Respect DNSSEC skew.
|
||||
* Offline dnssec validation for any given point in time
|
||||
* Correct return value in documentation for getdns_pretty_print_dict().
|
||||
Thanks Linus Nordberg
|
||||
* Bugfix: Don't treat "domain" or "search" as a nameserver.
|
||||
Thanks Linus Nordberg
|
||||
* Use the default CA trust store on Windows (for DNS over TLS).
|
||||
* Propagate eventloop to unbound when unbound has pluggable event loops
|
||||
(libunbound >= 1.5.9 needed)
|
||||
* Replace mini_event extension by default_eventloop
|
||||
* Bugfix: Segfault on NULL pin
|
||||
* Bugfix: Correct output of get_api_settings
|
||||
* Bugfix: Memory leak with getdns_get_api_information()
|
||||
Thanks Robert Groenenberg.
|
||||
|
||||
* 2015-12-31: Version 0.9.0
|
||||
* Update of unofficial extension to the API that supports stub mode
|
||||
TLS verification. GETDNS_AUTHENTICATION_HOSTNAME is replaced by
|
||||
GETDNS_AUTHENTICATION_REQUIRED (but remains available as an alias).
|
||||
Upstreams can now be configured with either a hostname or a SPKI pinset
|
||||
for TLS authentication (or both). If the GETDNS_AUTHENTICATION_REQUIRED
|
||||
option is used at least one piece of authentication information must be
|
||||
configured for each upstream, and all the configured authentication
|
||||
information for an upstream must validate.
|
||||
* Remove STARTTLS implementation (no change to SPEC)
|
||||
* Enable TCP Fast Open when possible. Add OSX support for TFO.
|
||||
* Rename return_call_debugging to return_call_reporting
|
||||
* Bugfix: configure problem with getdns-0.5.1 on OpenBSD
|
||||
Thanks Claus Assmann.
|
||||
* pkg-config support. Thanks Neil Cook.
|
||||
* Functions to convert from RR dicts to wireformat and text format
|
||||
and vice versa. Including a function that builds a getdns_list
|
||||
of RR dicts from a zonefile.
|
||||
* Use the with the getdns_context_set_dns_root_servers() function
|
||||
provided root servers in recursing resolution modus.
|
||||
* getdns_query option (-f) to read a DNSSEC trust anchor from file.
|
||||
* getdns_query option (-R) to read a "root hints" file.
|
||||
* Bugfix: Detect and prevent duplicate NSEC(3)s to be returned with
|
||||
dnssec_return_validation_chain.
|
||||
* Bugfix: Remove duplicate RRs from RRsets when DNSSEC verifying
|
||||
* Client side edns-tcp-keepalive support
|
||||
* TSIG support + getdns_query syntax to specify TSIG parameters
|
||||
per upstream: @<ip>[^[<algorithm>:]<name>:<secret in Base64>]
|
||||
* Bugfix: Allow truncated answers to be returned in case of missing
|
||||
fallback transport.
|
||||
* Verify upstream TLS pubkeys with pinsets; A getdns_query option
|
||||
(-K) to attach pinsets to getdns_contexts.
|
||||
Thanks Daniel Kahn Gillmor
|
||||
* Initial support for Windows. Thanks Gowri Visweswaran
|
||||
* add_warning_for_bad_dns extension
|
||||
* Try and retry with suffixes giving with getdns_context_set_suffix()
|
||||
following directions given by getdns_context_set_append_name()
|
||||
getdns_query options to set suffixes and append_name directions:
|
||||
'-W' to append suffix always (default)
|
||||
'-1' to append suffix only to single label after failure
|
||||
'-M' to append suffix only to multi label name after failure
|
||||
'-N' to never append a suffix
|
||||
'-Z <suffixes>' to set suffixes with the given comma separated list
|
||||
* Better help text for getdns_query (printed with the '-h' option)
|
||||
* Setting the +specify_class extension with getdns_query
|
||||
* Return NOT_IMPLEMENTED for not implemented namespaces, and the
|
||||
not implemented getdns_context_set_follow_redirects() function.
|
||||
|
||||
* 2015-11-18: Version 0.5.1
|
||||
* Bugfix: growing upstreams arrow.
|
||||
* Bugfix: Segfault on timeout in specific conditions
|
||||
* Bugfix: install getdns_extra.h from build location
|
||||
* Bugfix: Don't let cookies overwrite existing EDNS0 options
|
||||
* Don't link libdl
|
||||
* The EDNS(0) Padding Option (draft-mayrhofer-edns0-padding).
|
||||
When using DNS over TLS, query sizes will be padded to multiples
|
||||
of a block size given with:
|
||||
getdns_context_set_tls_query_padding_blocksize()
|
||||
* An EDNS client subnet private option, that will ask a EDNS client
|
||||
subnet aware resolver to not reveal any details about the
|
||||
originating network. See: draft-ietf-dnsop-edns-client-subnet
|
||||
Set with: getdns_context_set_edns_client_subnet_private()
|
||||
* The return_call_debugging extension. The extension will also return
|
||||
the transport used on top of the information about the request which
|
||||
is described in the API spec.
|
||||
* A dnssec_roadblock_avoidance extension. When set, the library will
|
||||
work in stub resolution mode and try to get a by DNSSEC validation
|
||||
assessed answer. On BOGUS answers the library will retry rescursive
|
||||
resolution mode. This is the simplest form of passive roadblock
|
||||
detection and avoidance: draft-ietf-dnsop-dnssec-roadblock-avoidance.
|
||||
Use the --enable-draft-dnssec-roadblock-avoidance option to configure
|
||||
to compile with this extension.
|
||||
|
||||
* 2015-10-29: Version 0.5.0
|
||||
* Native crypto. No ldns dependency anymore.
|
||||
(ldns still necessary to be able to run tests though)
|
||||
* JSON pointer arguments to getdns_dict_get_* and getdns_dict_set_*
|
||||
to dereference nested dicts and lists.
|
||||
* Bugfix: DNSSEC code finding zone cut with redirects + pursuing unsigned
|
||||
DS answers close to the root. Thanks Theogene Bucuti!
|
||||
* Default port for TLS changed to 853
|
||||
* Unofficial extension to the API to allow TLS hostname verification to be
|
||||
required for stub mode when using only TLS as a transport.
|
||||
When required a hostname must be supplied in the
|
||||
'hostname' field of the upstream_list dict and the TLS cipher suites are
|
||||
restricted to the 4 AEAD suites recommended in RFC7525.
|
||||
|
||||
* 2015-09-09: Version 0.3.3
|
||||
* Fix clearing upstream events on shutdown
|
||||
* Fix dnssec validation of direct CNAME queries.
|
||||
Thanks Simson L. Garfinkel.
|
||||
* Fix get_api_information():version_string also for release candidates
|
||||
|
||||
* 2015-09-04: Version 0.3.2
|
||||
* Fix returned upstreams list by getdns_context_get_api_information()
|
||||
* Fix some autoconf issues when srcdir != builddir
|
||||
* Fix remove build date from manpage version for reproducible builds
|
||||
* Fix transport fallback issues plus transport fallback unit test script
|
||||
* Fix string bindata's need not contain trailing zero byte
|
||||
* --enable-stub-only configure option for stub only operation.
|
||||
Stub mode will be the default. Removes the dependency on libunbound
|
||||
* --with-getdns_query compiles and installs the getdns_query tool too
|
||||
* Fix assert on context destruction from a callback in stub mode too.
|
||||
* Use a thread instead of a process for running the unbound event loop.
|
||||
|
||||
* 2015-07-18: Version 0.3.1
|
||||
* Fix repeating rdata fields
|
||||
|
||||
* 2015-07-17: Version 0.3.0
|
||||
* Unit test for spurious execute bits. Thanks Paul Wouters.
|
||||
* Added new transport list options in API. The option is now an ordered
|
||||
|
@ -139,7 +719,7 @@
|
|||
* Build from separate build directory
|
||||
* Anticipate libunbound not returning the answer packet
|
||||
* Pretty print bindata's representing IP addresses
|
||||
* Anticipate absense of implicit DSO linking
|
||||
* Anticipate absence of implicit DSO linking
|
||||
* Mention getdns specific options to configure in INSTALL
|
||||
Thanks Paul Hoffman
|
||||
* Mac OSX package built instructions for generic user in README.md
|
||||
|
|
397
INSTALL
397
INSTALL
|
@ -1,397 +0,0 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
(Options specific to getdns are listed at the end of this document.)
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
getdns-specific Options
|
||||
=======================
|
||||
|
||||
`--with-libidn=pathname'
|
||||
path to libidn (default: search /usr/local ..)
|
||||
|
||||
`--with-libldns=pathname'
|
||||
path to libldns (default: search /usr/local ..)
|
||||
|
||||
`--with-libunbound=pathname'
|
||||
path to libunbound (default: search /usr/local ..)
|
||||
|
||||
`--with-libevent'
|
||||
path to libevent (default: search /usr/local ..)
|
||||
|
||||
`--with-libuv'
|
||||
path to libuv (default: search /usr/local ..)
|
||||
|
||||
`--with-libev'
|
||||
path to libev (default: search /usr/local ..)
|
||||
|
||||
`--with-trust-anchor=KEYFILE'
|
||||
Default location of the trust anchor file.
|
||||
[default=SYSCONFDIR/unbound/getdns-root.key]
|
210
Makefile.in
210
Makefile.in
|
@ -1,210 +0,0 @@
|
|||
#
|
||||
# @configure_input@
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the names of the copyright holders nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package = @PACKAGE_NAME@
|
||||
version = @PACKAGE_VERSION@@RELEASE_CANDIDATE@
|
||||
tarname = @PACKAGE_TARNAME@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
distdir = $(tarname)-$(version)
|
||||
bintar = $(distdir)-bin.tar.gz
|
||||
|
||||
prefix = @prefix@
|
||||
datarootdir=@datarootdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
docdir = @docdir@
|
||||
|
||||
srcdir = @srcdir@
|
||||
INSTALL = @INSTALL@
|
||||
|
||||
default:
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
all : default
|
||||
|
||||
install: all
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/AUTHORS $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/ChangeLog $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/COPYING $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/INSTALL $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/LICENSE $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/NEWS $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 644 $(srcdir)/README.md $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(docdir)/spec
|
||||
$(INSTALL) -m 644 $(srcdir)/spec/index.html $(DESTDIR)$(docdir)/spec
|
||||
$(INSTALL) -m 644 $(srcdir)/spec/getdns*tgz $(DESTDIR)$(docdir)/spec
|
||||
cd src && $(MAKE) $@
|
||||
cd doc && $(MAKE) $@
|
||||
@echo "***"
|
||||
@echo "*** !!! IMPORTANT !!!! libgetdns needs a DNSSEC trust anchor!"
|
||||
@echo "***"
|
||||
@echo "*** For the library to be able to perform DNSSEC, the root"
|
||||
@echo "*** trust anchor needs to be present in presentation format"
|
||||
@echo "*** in the file: "
|
||||
@echo "*** @TRUST_ANCHOR_FILE@"
|
||||
@echo "***"
|
||||
@echo "*** We recomend using unbound-anchor to retrieve and install"
|
||||
@echo "*** the root trust anchor like this: "
|
||||
@echo "*** mkdir /etc/unbound"
|
||||
@echo "*** unbound-anchor -a \"@TRUST_ANCHOR_FILE@\""
|
||||
@echo "***"
|
||||
@echo "*** We strongly recommend package maintainers to provide the"
|
||||
@echo "*** root trust anchor by installing it with unbound-anchor"
|
||||
@echo "*** at package installation time from the post-install script."
|
||||
@echo "***"
|
||||
|
||||
uninstall:
|
||||
rm -rf $(DESTDIR)$(docdir)
|
||||
cd doc && $(MAKE) $@
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
doc: FORCE
|
||||
cd doc && $(MAKE) $@
|
||||
|
||||
example:
|
||||
cd spec/example && $(MAKE) $@
|
||||
|
||||
test:
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
getdns_query:
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
clean:
|
||||
cd src && $(MAKE) $@
|
||||
cd doc && $(MAKE) $@
|
||||
cd spec/example && $(MAKE) $@
|
||||
rm -f *.o
|
||||
|
||||
depend:
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
distclean:
|
||||
cd src && $(MAKE) $@
|
||||
rmdir src 2>/dev/null || true
|
||||
cd doc && $(MAKE) $@
|
||||
rmdir doc 2>/dev/null || true
|
||||
cd spec/example && $(MAKE) $@
|
||||
rmdir spec/example 2>/dev/null || true
|
||||
rmdir spec 2>/dev/null || true
|
||||
rm -f config.log config.status Makefile libtool
|
||||
rm -fR autom4te.cache
|
||||
rm -fR m4
|
||||
|
||||
dist: $(distdir).tar.gz
|
||||
|
||||
bindist: $(bintar)
|
||||
|
||||
$(bintar): $(distdir)
|
||||
chown -R 0:0 $(distdir) 2>/dev/null || true
|
||||
cd $(distdir); ./configure; make
|
||||
tar chof - $(distdir) | gzip -9 -c > $@
|
||||
rm -rf $(distdir)
|
||||
|
||||
$(distdir).tar.gz: $(distdir)
|
||||
chown -R 0:0 $(distdir) 2>/dev/null || true
|
||||
tar chof - $(distdir) | gzip -9 -c > $@
|
||||
rm -rf $(distdir)
|
||||
|
||||
$(distdir):
|
||||
mkdir -p $(distdir)/m4
|
||||
mkdir -p $(distdir)/src
|
||||
mkdir -p $(distdir)/src/getdns
|
||||
mkdir -p $(distdir)/src/test
|
||||
mkdir -p $(distdir)/src/extension
|
||||
mkdir -p $(distdir)/src/compat
|
||||
mkdir -p $(distdir)/src/util
|
||||
mkdir -p $(distdir)/src/gldns
|
||||
mkdir -p $(distdir)/doc
|
||||
mkdir -p $(distdir)/spec
|
||||
mkdir -p $(distdir)/spec/example
|
||||
cp $(srcdir)/configure.ac $(distdir)
|
||||
cp $(srcdir)/configure $(distdir)
|
||||
cp $(srcdir)/AUTHORS $(distdir)
|
||||
cp $(srcdir)/ChangeLog $(distdir)
|
||||
cp $(srcdir)/COPYING $(distdir)
|
||||
cp $(srcdir)/INSTALL $(distdir)
|
||||
cp $(srcdir)/LICENSE $(distdir)
|
||||
cp $(srcdir)/NEWS $(distdir)
|
||||
cp $(srcdir)/README.md $(distdir)
|
||||
cp $(srcdir)/Makefile.in $(distdir)
|
||||
cp $(srcdir)/install-sh $(distdir)
|
||||
cp $(srcdir)/config.sub $(distdir)
|
||||
cp $(srcdir)/config.guess $(distdir)
|
||||
cp libtool $(distdir)
|
||||
cp $(srcdir)/ltmain.sh $(distdir)
|
||||
cp $(srcdir)/m4/*.m4 $(distdir)/m4
|
||||
cp $(srcdir)/src/*.in $(distdir)/src
|
||||
cp $(srcdir)/src/*.[ch] $(distdir)/src
|
||||
cp $(srcdir)/src/*.symbols $(distdir)/src
|
||||
cp $(srcdir)/src/extension/*.[ch] $(distdir)/src/extension
|
||||
cp $(srcdir)/src/extension/*.symbols $(distdir)/src/extension
|
||||
cp $(srcdir)/src/getdns/*.in $(distdir)/src/getdns
|
||||
cp $(srcdir)/src/getdns/getdns_*.h $(distdir)/src/getdns
|
||||
cp $(srcdir)/src/test/Makefile.in $(distdir)/src/test
|
||||
cp $(srcdir)/src/test/*.[ch] $(distdir)/src/test
|
||||
cp $(srcdir)/src/test/*.sh $(distdir)/src/test
|
||||
cp $(srcdir)/src/test/*.good $(distdir)/src/test
|
||||
cp $(srcdir)/src/compat/*.[ch] $(distdir)/src/compat
|
||||
cp $(srcdir)/src/util/*.[ch] $(distdir)/src/util
|
||||
cp $(srcdir)/src/gldns/*.[ch] $(distdir)/src/gldns
|
||||
cp $(srcdir)/doc/Makefile.in $(distdir)/doc
|
||||
cp $(srcdir)/doc/*.in $(distdir)/doc
|
||||
cp $(srcdir)/doc/manpgaltnames $(distdir)/doc
|
||||
cp $(srcdir)/spec/*.html $(distdir)/spec
|
||||
cp $(srcdir)/spec/*.tgz $(distdir)/spec
|
||||
cp $(srcdir)/spec/example/Makefile.in $(distdir)/spec/example
|
||||
cp $(srcdir)/spec/example/*.[ch] $(distdir)/spec/example
|
||||
rm -f $(distdir)/Makefile $(distdir)/src/Makefile $(distdir)/src/getdns/getdns.h $(distdir)/spec/example/Makefile $(distdir)/src/test/Makefile $(distdir)/doc/Makefile $(distdir)/src/config.h
|
||||
|
||||
distcheck: $(distdir).tar.gz
|
||||
gzip -cd $(distdir).tar.gz | tar xvf -
|
||||
cd $(distdir) && ./configure
|
||||
cd $(distdir) && $(MAKE) all
|
||||
cd $(distdir) && $(MAKE) check
|
||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
||||
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
||||
if test "$${remaining}" -ne 0; then
|
||||
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
||||
exit 1; \
|
||||
fi
|
||||
cd $(distdir) && $(MAKE) clean
|
||||
rm -rf $(distdir)
|
||||
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in config.status
|
||||
./config.status $@
|
||||
|
||||
configure.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
.PHONY: all distclean clean default doc test
|
||||
FORCE:
|
425
README.md
425
README.md
|
@ -1,116 +1,156 @@
|
|||
getdns API
|
||||
==========
|
||||
getdns
|
||||
======
|
||||
|
||||
# Overview of getdns
|
||||
|
||||
* Date: 2015-05-20
|
||||
* GitHub: <https://github.com/getdnsapi/getdns>
|
||||
|
||||
getdns is an implementation of a modern asynchronous DNS API specification
|
||||
originally edited by Paul Hoffman. It is intended to make all types of DNS
|
||||
information easily available to application developers and non-DNS experts.
|
||||
The project home page at [getdnsapi.net](https://getdnsapi.net) provides
|
||||
documentation, binary downloads and new regarding the getdns API
|
||||
implementation. This implementation is licensed under the New BSD License
|
||||
(BSD-new).
|
||||
getdns is an implementation of a modern asynchronous DNS API; the specification was originally edited by Paul Hoffman. It is intended to make all types of DNS information easily available to application developers and non-DNS experts.
|
||||
|
||||
## Why you might want getdns
|
||||
|
||||
Traditional access to DNS data from applications has several limitations:
|
||||
|
||||
* APIs require applications to have considerable sophistication about DNS data and data types
|
||||
|
||||
* Some kinds of data about the response (notably, the resource record set time to live) is not exposed via any API, so applications need to process raw protocol responses to get such data
|
||||
|
||||
* APIs are often blocking, meaning asynchronous access is not possible without some work
|
||||
|
||||
* Sophisticated uses of the DNS (things like IDNA and DNSSEC validation) require considerable application work, possibly by application developers with little experience with the vagaries of DNS.
|
||||
|
||||
getdns also provides an experimental DNS Privacy enabled client called 'stubby' - see below for more details.
|
||||
|
||||
## Motivation for providing the API
|
||||
|
||||
The developers are of the opinion that DNSSEC offers a unique global infrastructure for establishing and enhancing cryptographic trust relations. With the development of this API we intend to offer application developers a modern and flexible interface that enables end-to-end trust in the DNS architecture, and which will inspire application developers to implement innovative security solutions in their applications.
|
||||
|
||||
### API Documentation
|
||||
|
||||
Note that this implementation offers additional functionality to supplement that in the [official getdns API](https://getdnsapi.net/documentation/spec/). Some additions are convenient utility functions but other functionality is experimental prior to be being recommended for inclusion in the official API. The [Doxygen documentation](https://getdnsapi.net/doxygen/modules.html) provides the details of the full API for this implementation.
|
||||
|
||||
## License
|
||||
|
||||
This implementation is licensed under the New BSD License (BSD-new).
|
||||
|
||||
Obtaining and getting started with getdns
|
||||
=========================================
|
||||
The project home page at [getdnsapi.net](https://getdnsapi.net) provides documentation, binary downloads, and news regarding the getdns API implementation. This README file captures the goals and direction of the project and the current state of the implementation.
|
||||
|
||||
If you are just getting started with the library take a look at the section below that describes building and handling external dependencies for the library.
|
||||
|
||||
### Examples
|
||||
Once it is built you should take a look at `spec/example` to see how the library is used.
|
||||
|
||||
|
||||
# Download
|
||||
|
||||
Download the sources from our [github repo](https://github.com/getdnsapi/getdns)
|
||||
or from [getdnsapi.net](https://getdnsapi.net) and verify the download using
|
||||
the checksums (SHA1 or MD5) or using gpg to verify the signature. Our keys are
|
||||
available from the [pgp keyservers](http://keyserver.pgp.com)
|
||||
available from the [openpgp keyserver](https://keys.openpgp.org/)
|
||||
|
||||
* willem@nlnetlabs.nl, key id E5F8F8212F77A498
|
||||
* gwiley@verisign.com, key id 9DC3D572A6B73532
|
||||
* `willem@nlnetlabs.nl`, key id E5F8F8212F77A498
|
||||
|
||||
The [getdns-api mailing list](http://www.vpnc.org/mailman/listinfo/getdns-api)
|
||||
is a good place to engage in discussions regarding the design of the API.
|
||||
# Releases
|
||||
|
||||
If you are just getting started with the library take a look at the section
|
||||
below that describes building and handling external dependencies for the
|
||||
library. Once it is built you should take a look at src/examples to see how
|
||||
the library is used.
|
||||
|
||||
This file captures the goals and direction of the project and the current state
|
||||
of the implementation.
|
||||
|
||||
The goals of this implementation of the getdns API are:
|
||||
|
||||
* Provide an open source implementation, in C, of the formally described getdns API by getdns API team at <https://getdnsapi.net/spec.html>
|
||||
* Initial support for FreeBSD, OSX, Linux (CentOS/RHEL, Ubuntu) via functional "configure" script
|
||||
* Initial support to include the Android platform
|
||||
* Include examples and tests as part of the build
|
||||
* Document code using doxygen
|
||||
* Leverage github as much as possible for project coordination
|
||||
* Coding style/standards follow the BSD coding style <ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/style>
|
||||
|
||||
Non-goals (things we will not be doing at least initially) include:
|
||||
* implementation of the traditional DNS related routines (gethostbyname, etc.)
|
||||
|
||||
## Language Bindings
|
||||
|
||||
In parallel, the team is actively developing bindings for various languages.
|
||||
For more information, visit the
|
||||
[wiki](https://github.com/getdnsapi/getdns/wiki/Language-Bindings).
|
||||
|
||||
Motivation for providing the API
|
||||
================================
|
||||
|
||||
The developers are of the opinion that DNSSEC offers a unique global
|
||||
infrastructure for establishing and enhancing cryptographic trust relations.
|
||||
With the development of this API we intend to offer application developers a
|
||||
modern and flexible way that enables end-to-end trust in the DNS architecture
|
||||
and will inspire application developers towards innovative security solutions
|
||||
in their applications.
|
||||
|
||||
|
||||
Releases
|
||||
========
|
||||
Release numbering follows the [Semantic Versioning](http://semver.org/)
|
||||
approach. The code is currently under active development.
|
||||
|
||||
The following requirements were met as conditions for the present release:
|
||||
|
||||
* code compiles cleanly on at least the primary target platforms: OSX, RHEL/CentOS Linux, FreeBSD
|
||||
* examples must compile and run clean
|
||||
* clearly document supported/unsupported elements of the API
|
||||
* code compiles cleanly on at least the primary target platforms: OSX, Linux (RHEL/CentOS, Ubuntu), FreeBSD
|
||||
* examples must compile and run cleanly
|
||||
* there must be clear documentation of supported and unsupported elements of the API
|
||||
|
||||
# External Dependencies
|
||||
|
||||
If you are installing from packages, you have to install the library and also the library-devel (or -dev) for your package management system to get the the necessary compile time files.
|
||||
|
||||
External dependencies are linked outside the getdns API build tree (we rely on CMake to find them). We would like to keep the dependency tree short, see [Minimising Dependancies](#minimizing-dependancies) for more details.
|
||||
|
||||
Required for all builds:
|
||||
|
||||
* [libssl and libcrypto from the OpenSSL Project](https://www.openssl.org/) version 1.0.2 or later. Using OpenSSL 1.1 is recommended due to TSL 1.3 support.
|
||||
|
||||
Required for all builds that include recursive functionality:
|
||||
|
||||
* [libunbound from NLnet Labs](https://unbound.net/) version 1.5.9 or later. (Note: linking to libunbound is not yet supported on Windows, see [Windows 10](#microsoft-windows-10))
|
||||
|
||||
Required for all builds that include IDN functionality:
|
||||
|
||||
* [libidn2 from the FSF](https://www.gnu.org/software/libidn/) version 2.0.0 and higher.
|
||||
|
||||
Required to build the documentation:
|
||||
|
||||
* [Doxygen](http://www.doxygen.nl) is used to generate documentation; while this is not technically necessary for the build it makes things a lot more pleasant.
|
||||
|
||||
For example, to build on Ubuntu 18.04 or later, you would need the following packages for a full build:
|
||||
|
||||
# apt install build-essential libunbound-dev libidn2-dev libssl-dev cmake
|
||||
|
||||
# Building
|
||||
|
||||
If you are building from git, you need to do the following before building:
|
||||
|
||||
# git submodule update --init
|
||||
|
||||
From release 1.6.0 getdns uses CMake (previous versions used autoconf/libtool). To build from this release and later use:
|
||||
|
||||
# cmake .
|
||||
# make
|
||||
|
||||
If you are unfamiliar with CMake, see our [CMake Quick Start](https://getdnsapi.net/quick-start/cmake-quick-start/) for how to use CMake options to customise the getdns build.
|
||||
|
||||
As well as building the getdns library two other tools are installed by default:
|
||||
|
||||
* getdns_query: a command line test script wrapper for getdns. This can be used to quickly check the functionality of the library, see (#using-getdnsquery)
|
||||
* getdns_server_mon: test DNS server function and capabilities
|
||||
|
||||
Additionally `Stubby` a DNS Privacy enabled client can also be built and installed by using the `BUILD_STUBBY` option when running `cmake`, see [Stubby](#stubby).
|
||||
|
||||
|
||||
Tickets/Bug Reports
|
||||
===================
|
||||
Tickets and bug reports should be reported via the [GitHub issues list](https://github.com/getdnsapi/getdns/issues).
|
||||
## Minimizing dependencies
|
||||
|
||||
Additionally, we have a mailing list at users@getdns.net.
|
||||
* getdns can be configured for stub resolution mode only with the `ENABLE_STUB_ONLY` option to `cmake`. This removes the dependency on `libunbound`.
|
||||
* Currently getdns only offers two helper functions to deal with IDN: `getdns_convert_ulabel_to_alabel` and `getdns_convert_alabel_to_ulabel`. If you do not need these functions, getdns can be configured to compile without them by setting the`USE_LIBIDN2` option to `cmake` to OFF.
|
||||
* When `ENABLE_STUB_ONLY` is ON, and `USE_LIBIDN2` is OFF, getdns has only one dependency left, which is OpenSSL.
|
||||
|
||||
## Extensions and Event loop dependencies
|
||||
|
||||
Building/External Dependencies
|
||||
==============================
|
||||
The implementation works with a variety of event loops, each built as a separate shared library. See [this Doxygen page](https://getdnsapi.net/doxygen/group__eventloops.html) and [this man page](https://getdnsapi.net/documentation/manpages/#ASYNCHRONOUS USE) for more details.
|
||||
|
||||
External dependencies are linked outside the getdns API build tree (we rely on configure to find them). We would like to keep the dependency tree short.
|
||||
|
||||
* [libldns from NLnet Labs](https://www.nlnetlabs.nl/projects/ldns/) version 1.6.11 or later (ldns requires openssl headers and libraries)
|
||||
* [libunbound from NLnet Labs](http://www.nlnetlabs.nl/projects/unbound/) version 1.4.16 or later
|
||||
* [libexpat](http://expat.sourceforge.net/) for libunbound.
|
||||
* [libidn from the FSF](http://www.gnu.org/software/libidn/) version 1.
|
||||
* Doxygen is used to generate documentation, while this is not technically necessary for the build it makes things a lot more pleasant.
|
||||
|
||||
You have to install the library and also the library-devel (or -dev) for your
|
||||
package management system to install the compile time files. If you checked
|
||||
out our git; the configure script is built with autoreconf --install.
|
||||
|
||||
## Extensions / Event loop dependencies
|
||||
|
||||
The implementation works with a variety of event loops, each built as a separate shared library. See [the wiki](https://github.com/getdnsapi/getdns/wiki/Asynchronous-Support#wiki-included-event-loop-integrations) for more details.
|
||||
|
||||
* [libevent](http://libevent.org). Note: the examples *require* this and should work with either libevent 1.x or 2.x. 2.x is preferred.
|
||||
* [libuv](https://github.com/joyent/libuv)
|
||||
* [libevent](http://libevent.org). Note: the examples *require* this. libevent 2.x is required.
|
||||
* [libuv](https://libuv.org/)
|
||||
* [libev](http://software.schmorp.de/pkg/libev.html)
|
||||
|
||||
##Regression Tests
|
||||
## Using getdns_query
|
||||
|
||||
Example test queries using `getdns_query` (pointed at Google Public DNS) and requesting the `call_reporting` extension which provides information on the transport and query time:
|
||||
|
||||
getdns_query -s example.com A @8.8.8.8 +return_call_reporting (UDP)
|
||||
getdns_query -s example.com A @8.8.8.8 -T +return_call_reporting (TCP)
|
||||
getdns_query -s example.com A @8.8.8.8 -L +return_call_reporting (TLS without authentication)
|
||||
getdns_query -s getdnsapi.net A +dnssec_return_status +return_call_reporting (DNSSEC)
|
||||
|
||||
## Stubby
|
||||
|
||||
* Stubby is an implementation of a DNS Privacy enabled stub resolver that encrypts DNS queries using TLS. It is currently suitable for advanced/technical users - all feedback is welcome!
|
||||
* Details on how to use Stubby can be found in the [Stubby Reference Guide](https://dnsprivacy.org/wiki/x/JYAT).
|
||||
* Also see [dnsprivacy.org](https://dnsprivacy.org) for more information on DNS Privacy.
|
||||
|
||||
## Experimental support for GnuTLS
|
||||
|
||||
A project to allow user selection of either OpenSSL or GnuTLS is currently a work in progress. At present a user may select to use GnuTLS for the majority of the supported functionality, however, OpenSSL is still required for some cryptographic functions.
|
||||
|
||||
## Regression Tests
|
||||
|
||||
A suite of regression tests are included with the library, if you make changes or just
|
||||
want to sanity check things on your system take a look at src/test. You will need
|
||||
to install [libcheck](http://check.sourceforge.net/). Check is also available from
|
||||
many of the package repositories for the more popular operating systems.
|
||||
to install [libcheck](https://libcheck.github.io/check/). The check library is also available from many of the package repositories for the more popular operating systems.
|
||||
Note: The tests currently do not run on Windows because of a dependancy on bash.
|
||||
|
||||
## DNSSEC
|
||||
## DNSSEC dependencies
|
||||
|
||||
For the library to be DNSSEC capable, it needs to know the root trust anchor.
|
||||
The library will try to load the root trust anchor from
|
||||
|
@ -118,132 +158,197 @@ The library will try to load the root trust anchor from
|
|||
or more `DS` or `DNSKEY` resource records in presentation (i.e. zone file)
|
||||
format. Note that this is different than the format of BIND.keys.
|
||||
|
||||
The best way to setup or update the root trust anchor is by using
|
||||
[`unbound-anchor`](http://www.unbound.net/documentation/unbound-anchor.html).
|
||||
To setup the library with the root trust anchor at the default location,
|
||||
execute the following steps as root:
|
||||
## Zero configuration DNSSEC
|
||||
|
||||
# mkdir -p /etc/unbound
|
||||
# unbound-anchor -a /etc/unbound/getdns-root.key
|
||||
When the root trust anchor is not installed in the default location and a DNSSEC query is done, getdns will try to use the trust anchors published here: http://data.iana.org/root-anchors/root-anchors.xml .
|
||||
It will validate these anchors with the ICANN Certificate Authority certificate following the procedure described in [RFC7958].
|
||||
The `root-anchors.xml` and `root-anchors.p7s` S/MIME signature will be cached in the `$HOME/.getdns` directory on Unixes, and the `%appdata%\getdns` directory on Windows.
|
||||
|
||||
#Unsupported Features
|
||||
When using trust-anchors from the `root-anchors.xml` file, getdns will track the keys in the root DNSKEY rrset and store a copy in `$HOME/.getdns/root.key` on Unixes, and `%appdata%\getdns\root.key` on Windows.
|
||||
Only when the KSK DNSKEY's change, a new version of `root-anchors.xml` is tried to be retrieved from [data.iana.org](https://data.iana.org/root-anchors/).
|
||||
|
||||
A installed trust-anchor from the default location (`/etc/unbound/getdns-root.key`) that fails to validate the root DNSKEY RRset, will also trigger the "Zero configuration DNSSEC" procedure described above.
|
||||
|
||||
Support
|
||||
=======
|
||||
|
||||
## Mailing lists
|
||||
|
||||
We have a [getdns users list](https://lists.getdnsapi.net/mailman/listinfo/users) for this implementation.
|
||||
|
||||
## Tickets and Bug Reports
|
||||
|
||||
Tickets and bug reports should be reported via the [GitHub issues list](https://github.com/getdnsapi/getdns/issues).
|
||||
|
||||
Features of this release
|
||||
========================
|
||||
|
||||
## Goals
|
||||
|
||||
The goals of this implementation of the getdns API are:
|
||||
|
||||
* Provide an open source implementation, in C, of the formally described getdns API by getdns API team at <https://getdnsapi.net/spec.html>
|
||||
* Support FreeBSD, OSX, Linux (CentOS/RHEL, Ubuntu)
|
||||
* Support Windows 10
|
||||
* Include examples and tests as part of the build
|
||||
* Document code using doxygen
|
||||
* Leverage github as much as possible for project coordination
|
||||
* Follow the BSD coding style/standards <ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/style>
|
||||
|
||||
Non-goals (things we will not be doing at least initially) include:
|
||||
|
||||
* implementation of the traditional DNS related routines (gethostbyname, etc.)
|
||||
|
||||
## Language Bindings
|
||||
|
||||
In parallel, the team is actively developing bindings for various languages.
|
||||
For more information, visit this
|
||||
[webpage](https://getdnsapi.net/bindings/).
|
||||
|
||||
## Unsupported getDNS Features
|
||||
|
||||
The following API calls are documented in getDNS but *not supported* by the implementation at this time:
|
||||
|
||||
* DNS Search suffixes
|
||||
* `getdns_context_set_append_name`
|
||||
* `getdns_context_set_suffix`
|
||||
* Setting root servers via `getdns_context_set_dns_root_servers`
|
||||
* `getdns_context_set_dnssec_trust_anchors`
|
||||
* Detecting changes to resolv.conf and hosts
|
||||
* MDNS and NetBIOS namespaces (only DNS and LOCALFILES are supported)
|
||||
* MDNS, NIS and NetBIOS namespaces (only DNS and LOCALFILES are supported)
|
||||
|
||||
Some platform specific features are not implemented in the first public release of getdns, however they are on the radar. These include:
|
||||
### Minor omissions
|
||||
|
||||
* Respecting settings in /etc/nsswitch.conf (linux and some other OSes), for the first release we simply check local files (/etc/hosts) before checking the DNS.
|
||||
* Search suffixes specified in /etc/resolv.conf
|
||||
The following minor implementation omissions are noted:
|
||||
|
||||
#Known Issues
|
||||
Recursive mode does not support:
|
||||
* TLS as a transport
|
||||
* Non-zero connection idle timeouts or query pipelining
|
||||
* Anything other than query_type and resolution_type in the return_call_reporting extension
|
||||
|
||||
There are a few known issues which we have summarized below - the most recent
|
||||
and helpful list is being maintained in the git issues list in the repository.
|
||||
Other known issues are being managed in the git repository issue list.
|
||||
Stub mode does not support:
|
||||
* Non zero idle timeouts for synchronous calls
|
||||
|
||||
* (#113) Changing the resolution type between stub and recursive after a query has been issued with a context will not work - the previous resolution type will continue to be used. If you want to change the resolution type you will need to create a new context and set the resolution type for that context.
|
||||
# Known Issues
|
||||
|
||||
* When doing a synchronous lookup with a context that has outstanding asynchronous lookups, the callbacks for the asynchronous lookups might get called as a side effect of the synchronous lookup.
|
||||
* None
|
||||
|
||||
# Supported Platforms
|
||||
|
||||
The platforms listed here are intended to help ensure that we catch platform specific breakage prior to release.
|
||||
|
||||
* Ubuntu 18.04 LTS and newer LTS releases
|
||||
* Microsoft Windows 10
|
||||
* FreeBSD 11.3 and newer
|
||||
* RHEL/CentOS 8
|
||||
* OSX 10.14 and 10.15
|
||||
|
||||
|
||||
#Supported Platforms
|
||||
|
||||
The primary platforms targeted are Linux and FreeBSD, other platform are supported as we get time. The names listed here are intended to help ensure that we catch platform specific breakage, not to limit the work that folks are doing.
|
||||
|
||||
* RHEL/CentOS 6.4
|
||||
* OSX 10.8
|
||||
* Ubuntu 14.04
|
||||
|
||||
We intend to add MS-Windows, Android and other platforms to the releases as we have time to port it.
|
||||
|
||||
|
||||
##Platform Specific Build Reports
|
||||
### Platform Specific Build Notes
|
||||
|
||||
[](https://travis-ci.org/getdnsapi/getdns)
|
||||
|
||||
###FreeBSD
|
||||
## FreeBSD
|
||||
|
||||
If you're using [FreeBSD](http://www.freebsd.org/), you may install getdns via the [ports tree](http://www.freshports.org/dns/getdns/) by running: `cd /usr/ports/dns/getdns && make install clean`
|
||||
If you're using [FreeBSD](https://www.freebsd.org/), you may install getdns via the [ports tree](https://www.freshports.org/dns/getdns/) by running: `cd /usr/ports/dns/getdns && make install clean`
|
||||
|
||||
If you are using FreeBSD 10 getdns can be intalled via 'pkg install getdns'.
|
||||
|
||||
###CentOS/RHEL 6.5
|
||||
## Ubuntu
|
||||
|
||||
We rely on the most excellent package manager fpm to build the linux packages which
|
||||
means that the packaging platform requires ruby 2.1.0. There are other ways to
|
||||
build the packages, this is simplythe one we chose to use.
|
||||
getdns should also work on Ubuntu 16.04, however if you require IDN functionality you will have to install a recent version of libidn2 via a ppa e.g. from https://launchpad.net/~ondrej/+archive/ubuntu/php
|
||||
|
||||
# cat /etc/redhat-release
|
||||
CentOS release 6.5 (Final)
|
||||
# uname -a
|
||||
Linux host-10-1-1-6 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
|
||||
# cd getdns-0.2.0rc1
|
||||
# ./configure --prefix=/home/deploy/build
|
||||
# make; make install
|
||||
# cd /home/deploy/build
|
||||
# mv lib lib64
|
||||
# . /usr/local/rvm/config/alias
|
||||
# fpm -x "*.la" -a native -s dir -t rpm -n getdns -v 0.2.0rc1 -d "unbound" -d "ldns" -d "libevent" -d "libidn" --prefix /usr --vendor "Verisign Inc., NLnet Labs" --license "BSD New" --url "https://getdnsapi.net" --description "Modern asynchronous API to the DNS" .
|
||||
You will also have to build Unbound from source code to provide libunbound at version >= 1.5.9.
|
||||
|
||||
###OSX
|
||||
## OSX
|
||||
|
||||
# sw_vers
|
||||
ProductName: Mac OS X
|
||||
ProductVersion: 10.8.5
|
||||
BuildVersion: 12F45
|
||||
A self-compiled version of OpenSSL or the version installed via Homebrew is required and the options OPENSSL_ROOT_DIR, OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY can be used to specify the location of the libraries.
|
||||
Note: If using a self-compiled version, manual configuration of certificates into /usr/local/etc/openssl/certs is required for TLS authentication to work.
|
||||
|
||||
Built using PackageMaker, libevent2.
|
||||
|
||||
# ./configure --with-libevent --prefix=$HOME/getdnsosx/export
|
||||
# make
|
||||
# make install
|
||||
|
||||
edit/fix hardcoded paths in lib/*.la to reference /usr/local
|
||||
|
||||
update getdns.pmdoc to match release info
|
||||
|
||||
build package using PackageMaker
|
||||
|
||||
create dmg
|
||||
|
||||
#### Homebrew
|
||||
### Homebrew
|
||||
|
||||
If you're using [Homebrew](http://brew.sh/), you may run `brew install getdns`. By default, this will only build the core library without any 3rd party event loop support.
|
||||
|
||||
To install the [event loop integration libraries](https://github.com/getdnsapi/getdns/wiki/Asynchronous-Support) that enable support for libevent, libuv, and libev, run: `brew install getdns --with-libevent --with-libuv --with-libev`. All switches are optional.
|
||||
To install the [event loop integration libraries](https://getdnsapi.net/doxygen/group__eventloops.html) that enable support for libevent, libuv, and libev, run: `brew install getdns --with-libevent --with-libuv --with-libev`. All switches are optional.
|
||||
|
||||
Note that in order to compile the examples, the `--with-libevent` switch is required.
|
||||
|
||||
As of the 0.2.0 release, when installing via Homebrew, the trust anchor is expected to be located at `$(brew --prefix)/etc/getdns-root.key`. Additionally, the openssl lib installed by Homebrew is linked against.
|
||||
Additionally, getdns is linked against the the OpenSSL library installed by Homebrew. Note that the Homebrew OpenSSL installation clones the Keychain certificates to the default OpenSSL location so TLS certificate authentication should work out of the box.
|
||||
|
||||
## Microsoft Windows 10
|
||||
|
||||
You will need CMake for Windows. Installers can be downloaded from https://cmake.org/download/.
|
||||
|
||||
Windows versions of the following libraries are available using [the vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg).
|
||||
|
||||
* OpenSSL
|
||||
* libevent
|
||||
* libiconv (required for libidn2)
|
||||
* libidn2
|
||||
* libyaml
|
||||
* libuv
|
||||
|
||||
Once these are installed, set CMake variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to the vcpkg include and library directories e.g. `../vcpkg/installed/x64-windows/include` and `../vcpkg/installed/x64-windows/lib`.
|
||||
|
||||
To generate a project suitable for use in Visual Studio, select the appropriate Visual Studio generator in CMake. Once generated, the cmake-gui Open Project button can be used to load the project into Visual Studio.
|
||||
|
||||
### Limitations on Windows
|
||||
|
||||
Full support for Windows is a work in progress. The following limitations will be addresses in future:
|
||||
|
||||
* At present, no native Windows DLL version of libunbound exists; support for linking against libunbound is not currently available. The default build option for ENABLE_STUB_ONLY_ is ON for Windows.
|
||||
|
||||
* The getdns unit tests (built with `make test`) require libcheck which is not currently available for Windows and so cannot be built.
|
||||
|
||||
* The getdns tpkg test suite is not currently supported on Windows.
|
||||
|
||||
* The detection of the location of the `/etc/hosts` file should be optimised - it currently assumes Windows is installed in the default directory on the C: drive
|
||||
|
||||
|
||||
Contributors
|
||||
============
|
||||
* Claus Assman
|
||||
* Theogene Bucuti
|
||||
* Andrew Cathrow, Verisign Labs
|
||||
* Neil Cook
|
||||
* Saúl Ibarra Corretgé
|
||||
* Craig Despeaux, Verisign, Inc.
|
||||
* John Dickinson, Sinodun
|
||||
* Sara Dickinson, Sinodun
|
||||
* Robert Edmonds
|
||||
* Angelique Finan, Verisign, Inc.
|
||||
* Simson Garfinkel
|
||||
* Daniel Kahn Gillmor
|
||||
* Neel Goyal, Verisign, Inc.
|
||||
* Bryan Graham, Verisign, Inc.
|
||||
* Robert Groenenberg
|
||||
* Jim Hague, Sinodun
|
||||
* Paul Hoffman
|
||||
* Scott Hollenbeck, Verising, Inc.
|
||||
* Christian Huitema
|
||||
* Shumon Huque, Verisign Labs
|
||||
* Jelte Janssen
|
||||
* Guillem Jover
|
||||
* Shane Kerr
|
||||
* Anthony Kirby
|
||||
* Olaf Kolkman, NLnet Labs
|
||||
* Sanjay Mahurpawar, Verisign, Inc.
|
||||
* Allison Mankin, Verisign, Inc. - Verisign Labs.
|
||||
* Sai Mogali, Verisign, Inc.
|
||||
* Linus Nordberg
|
||||
* Benno Overeinder, NLnet Labs
|
||||
* Joel Purra
|
||||
* Tom Pusateri
|
||||
* Prithvi Ranganath, Verisign, Inc.
|
||||
* Hoda Rohani, NLnet Labs
|
||||
* Rushi Shah, Verisign, Inc.
|
||||
* Vinay Soni, Verisign, Inc.
|
||||
* Melinda Shore, No Mountain Software LLC
|
||||
* Bob Steagall, Verisign, Inc.
|
||||
* Andrew Sullivan
|
||||
* Ondřej Surý
|
||||
* Willem Toorop, NLnet Labs
|
||||
* Gowri Visweswaran, Verisign Labs
|
||||
* Wouter Wijngaards, NLnet Labs
|
||||
* Glen Wiley, Verisign, Inc.
|
||||
* Paul Wouters
|
||||
|
||||
|
||||
Acknowledgements
|
||||
================
|
||||
The development team explicitly acknowledges Paul Hoffman for his initiative and efforts to develop a consensus based DNS API. We would like to thank the participants of the [mailing list](http://www.vpnc.org/mailman/listinfo/getdns-api) for their contributions.
|
||||
The development team explicitly acknowledges Paul Hoffman for his initiative and efforts to develop a consensus based DNS API. We would like to thank the participants of the getdns-api mailing list (discontinued) for their contributions.
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_include([m4/acx_openssl.m4])
|
||||
m4_include([m4/ax_check_compile_flag.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
m4_include([m4/ltversion.m4])
|
||||
m4_include([m4/lt~obsolete.m4])
|
||||
m4_include([m4/pkg.m4])
|
|
@ -0,0 +1,540 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#cmakedefine PACKAGE "@PACKAGE@"
|
||||
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||
#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
|
||||
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
|
||||
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
|
||||
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
|
||||
|
||||
#cmakedefine HAVE_ASSERT_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
#cmakedefine HAVE_SYS_LIMITS_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_STDIO_H 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_TIME_H 1
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
|
||||
#cmakedefine HAVE_FCNTL_H 1
|
||||
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
#cmakedefine HAVE_SYS_POLL_H 1
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
#cmakedefine HAVE_RESOURCE_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_SYS_STAT_H 1
|
||||
|
||||
#cmakedefine HAVE_ENDIAN_H 1
|
||||
#cmakedefine HAVE_NETDB_H 1
|
||||
#cmakedefine HAVE_ARPA_INET_H 1
|
||||
#cmakedefine HAVE_NETINET_IN_H 1
|
||||
#cmakedefine HAVE_NETINET_TCP_H 1
|
||||
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||
#cmakedefine HAVE_SYS_SOCKET_H 1
|
||||
#cmakedefine HAVE_SYS_SYSCTL_H 1
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
#cmakedefine HAVE_SYS_WAIT_H 1
|
||||
|
||||
#cmakedefine HAVE_WINDOWS_H 1
|
||||
#cmakedefine HAVE_WINSOCK_H 1
|
||||
#cmakedefine HAVE_WINSOCK2_H 1
|
||||
#cmakedefine HAVE_WS2TCPIP_H 1
|
||||
#cmakedefine GETDNS_ON_WINDOWS 1
|
||||
#cmakedefine USE_WINSOCK 1
|
||||
|
||||
#cmakedefine HAVE_SSL 1
|
||||
#cmakedefine USE_DANESSL 1
|
||||
|
||||
#cmakedefine HAVE_OPENSSL_SSL_H 1
|
||||
#cmakedefine HAVE_OPENSSL_EVP_H 1
|
||||
#cmakedefine HAVE_OPENSSL_ERR_H 1
|
||||
#cmakedefine HAVE_OPENSSL_RAND_H 1
|
||||
#cmakedefine HAVE_OPENSSL_CONF_H 1
|
||||
#cmakedefine HAVE_OPENSSL_ENGINE_H 1
|
||||
#cmakedefine HAVE_OPENSSL_BN_H 1
|
||||
#cmakedefine HAVE_OPENSSL_DSA_H 1
|
||||
#cmakedefine HAVE_OPENSSL_RSA_H 1
|
||||
#cmakedefine HAVE_OPENSSL_PARAM_BUILD_H 1
|
||||
|
||||
#cmakedefine HAVE_DSA_SIG_SET0 1
|
||||
#cmakedefine HAVE_DSA_SET0_PQG 1
|
||||
#cmakedefine HAVE_DSA_SET0_KEY 1
|
||||
|
||||
#cmakedefine HAVE_RSA_SET0_KEY 1
|
||||
|
||||
#cmakedefine HAVE_EVP_MD5 1
|
||||
#cmakedefine HAVE_EVP_SHA1 1
|
||||
#cmakedefine HAVE_EVP_SHA224 1
|
||||
#cmakedefine HAVE_EVP_SHA256 1
|
||||
#cmakedefine HAVE_EVP_SHA384 1
|
||||
#cmakedefine HAVE_EVP_SHA512 1
|
||||
|
||||
#cmakedefine HAVE_EVP_DSS1 1
|
||||
#cmakedefine HAVE_EVP_DIGESTVERIFY 1
|
||||
|
||||
#cmakedefine HAVE_EVP_MD_CTX_NEW 1
|
||||
|
||||
#cmakedefine HAVE_HMAC_CTX_NEW 1
|
||||
|
||||
#cmakedefine HAVE_NETTLE_GET_SECP_256R1 1
|
||||
#cmakedefine HAVE_NETTLE_GET_SECP_384R1 1
|
||||
|
||||
#cmakedefine HAVE_TLS_CLIENT_METHOD 1
|
||||
|
||||
#cmakedefine HAVE_OPENSSL_VERSION_NUM 1
|
||||
#cmakedefine HAVE_OPENSSL_VERSION 1
|
||||
|
||||
#cmakedefine HAVE_SSL_CTX_DANE_ENABLE 1
|
||||
#cmakedefine HAVE_SSL_CTX_SET_CIPHERSUITES 1
|
||||
#cmakedefine HAVE_SSL_SET_CIPHERSUITES 1
|
||||
|
||||
#cmakedefine HAVE_OPENSSL_INIT_CRYPTO 1
|
||||
|
||||
#cmakedefine HAVE_OSSL_PARAM_BLD_NEW 1
|
||||
|
||||
#cmakedefine HAVE_SSL_DANE_ENABLE 1
|
||||
#cmakedefine HAVE_DECL_SSL_CTX_SET1_CURVES_LIST 1
|
||||
#cmakedefine HAVE_DECL_SSL_SET1_CURVES_LIST 1
|
||||
#cmakedefine HAVE_DECL_SSL_SET_MIN_PROTO_VERSION 1
|
||||
#cmakedefine HAVE_X509_GET_NOTAFTER 1
|
||||
#cmakedefine HAVE_X509_GET0_NOTAFTER 1
|
||||
|
||||
#cmakedefine HAVE_PTHREAD 1
|
||||
#cmakedefine HAVE_WINDOWS_THREADS 1
|
||||
|
||||
#cmakedefine RUNSTATEDIR "@RUNSTATEDIR@"
|
||||
#cmakedefine TRUST_ANCHOR_FILE "@PATH_TRUST_ANCHOR_FILE@"
|
||||
#cmakedefine GETDNS_FN_RESOLVCONF "@PATH_RESOLVCONF@"
|
||||
#cmakedefine GETDNS_FN_HOSTS "@PATH_HOSTS@"
|
||||
|
||||
#cmakedefine DNSSEC_ROADBLOCK_AVOIDANCE 1
|
||||
#cmakedefine HAVE_MDNS_SUPPORT 1
|
||||
#cmakedefine STUB_NATIVE_DNSSEC 1
|
||||
#cmakedefine MAXIMUM_UPSTREAM_OPTION_SPACE @MAXIMUM_UPSTREAM_OPTION_SPACE@
|
||||
#cmakedefine EDNS_PADDING_OPCODE @EDNS_PADDING_OPCODE@
|
||||
#cmakedefine MAX_CNAME_REFERRALS @MAX_CNAME_REFERRALS@
|
||||
#cmakedefine DRAFT_RRTYPES @DRAFT_RRTYPES@
|
||||
#cmakedefine EDNS_COOKIES 1
|
||||
#cmakedefine EDNS_COOKIE_OPCODE @EDNS_COOKIE_OPCODE@
|
||||
#cmakedefine EDNS_COOKIE_ROLLOVER_TIME @EDNS_COOKIE_ROLLOVER_TIME@
|
||||
#cmakedefine UDP_MAX_BACKOFF @MAX_UDP_BACKOFF@
|
||||
|
||||
#cmakedefine HAVE_DECL_GETENTROPY 1
|
||||
#cmakedefine HAVE_DECL_INET_PTON 1
|
||||
#cmakedefine HAVE_DECL_INET_NTOP 1
|
||||
#cmakedefine HAVE_WIN_DECL_INET_PTON 1
|
||||
#cmakedefine HAVE_WIN_DECL_INET_NTOP 1
|
||||
#cmakedefine HAVE_DECL_MKSTEMP 1
|
||||
#cmakedefine HAVE_DECL_SIGEMPTYSET 1
|
||||
#cmakedefine HAVE_DECL_SIGFILLSET 1
|
||||
#cmakedefine HAVE_DECL_SIGADDSET 1
|
||||
#cmakedefine HAVE_DECL_STRPTIME 1
|
||||
|
||||
#cmakedefine HAVE_DECL_TCP_FASTOPEN 1
|
||||
#cmakedefine HAVE_DECL_TCP_FASTOPEN_CONNECT 1
|
||||
#cmakedefine HAVE_DECL_MSG_FASTOPEN 1
|
||||
|
||||
#if defined(HAVE_DECL_INET_PTON) || defined(HAVE_WIN_DECL_INET_PTON)
|
||||
#undef HAVE_DECL_INET_PTON
|
||||
#define HAVE_DECL_INET_PTON 1
|
||||
#endif
|
||||
#if defined(HAVE_DECL_INET_NTOP) || defined(HAVE_WIN_DECL_INET_NTOP)
|
||||
#undef HAVE_DECL_INET_NTOP
|
||||
#define HAVE_DECL_INET_NTOP 1
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_FCNTL 1
|
||||
#cmakedefine HAVE_GETTIMEOFDAY 1
|
||||
#cmakedefine HAVE_IOCTLSOCKET 1
|
||||
#cmakedefine HAVE_SIGEMPTYSET 1
|
||||
#cmakedefine HAVE_SIGFILLSET 1
|
||||
#cmakedefine HAVE_SIGADDSET 1
|
||||
#cmakedefine HAVE_STRPTIME 1
|
||||
|
||||
#cmakedefine HAVE_SIGSET_T 1
|
||||
#cmakedefine HAVE__SIGSET_T 1
|
||||
|
||||
#cmakedefine HAVE_BSD_STDLIB_H 1
|
||||
#cmakedefine HAVE_BSD_STRING_H 1
|
||||
|
||||
#cmakedefine HAVE_DECL_STRLCPY 1
|
||||
#cmakedefine HAVE_DECL_ARC4RANDOM 1
|
||||
#cmakedefine HAVE_DECL_ARC4RANDOM_UNIFORM 1
|
||||
#cmakedefine HAVE_BSD_DECL_STRLCPY 1
|
||||
#cmakedefine HAVE_BSD_DECL_ARC4RANDOM 1
|
||||
#cmakedefine HAVE_BSD_DECL_ARC4RANDOM_UNIFORM 1
|
||||
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_ARC4RANDOM 1
|
||||
#cmakedefine HAVE_ARC4RANDOM_UNIFORM 1
|
||||
|
||||
#cmakedefine HAVE_LIBUNBOUND 1
|
||||
#cmakedefine HAVE_UNBOUND_EVENT_H 1
|
||||
#cmakedefine HAVE_UNBOUND_EVENT_API 1
|
||||
#cmakedefine HAVE_UB_CTX_SET_STUB 1
|
||||
|
||||
#cmakedefine HAVE_LIBIDN 1
|
||||
#cmakedefine HAVE_LIBIDN2 1
|
||||
|
||||
#cmakedefine HAVE_NETTLE 1
|
||||
#cmakedefine HAVE_NETTLE_DSA_COMPAT_H 1
|
||||
#cmakedefine HAVE_NETTLE_EDDSA_H 1
|
||||
|
||||
#cmakedefine HAVE_EVENT2_EVENT_H 1
|
||||
#cmakedefine HAVE_EVENT_BASE_NEW 1
|
||||
#cmakedefine HAVE_EVENT_BASE_FREE 1
|
||||
|
||||
#cmakedefine DEFAULT_EVENTLOOP "@DEFAULT_EVENTLOOP@"
|
||||
#cmakedefine USE_POLL_DEFAULT_EVENTLOOP 1
|
||||
|
||||
#cmakedefine STRPTIME_WORKS 1
|
||||
|
||||
#cmakedefine FD_SETSIZE @FD_SETSIZE@
|
||||
|
||||
#cmakedefine REQ_DEBUG 1
|
||||
#cmakedefine SCHED_DEBUG 1
|
||||
#cmakedefine STUB_DEBUG 1
|
||||
#cmakedefine DAEMON_DEBUG 1
|
||||
#cmakedefine SEC_DEBUG 1
|
||||
#cmakedefine SERVER_DEBUG 1
|
||||
#cmakedefine ANCHOR_DEBUG 1
|
||||
#cmakedefine KEEP_CONNECTIONS_OPEN_DEBUG 1
|
||||
|
||||
#cmakedefine USE_SHA1 1
|
||||
#cmakedefine USE_SHA2 1
|
||||
#cmakedefine USE_GOST 1
|
||||
#cmakedefine USE_ECDSA 1
|
||||
#cmakedefine USE_DSA 1
|
||||
#cmakedefine USE_ED25519 1
|
||||
#cmakedefine USE_ED448 1
|
||||
|
||||
#cmakedefine USE_OSX_TCP_FASTOPEN 1
|
||||
|
||||
#cmakedefine HAVE_DECL_TCP_USER_TIMEOUT 1
|
||||
|
||||
#cmakedefine HAVE_NEW_UV_TIMER_CB 1
|
||||
|
||||
#cmakedefine HAVE_TARGET_ENDIANNESS
|
||||
#cmakedefine TARGET_IS_BIG_ENDIAN
|
||||
|
||||
#cmakedefine HAVE___FUNC__ 1
|
||||
|
||||
#ifdef HAVE___FUNC__
|
||||
#define __FUNC__ __func__
|
||||
#else
|
||||
#define __FUNC__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
#ifdef GETDNS_ON_WINDOWS
|
||||
/* On windows it is allowed to increase the FD_SETSIZE
|
||||
* (and nescessary to make our custom eventloop work)
|
||||
* See: https://support.microsoft.com/en-us/kb/111855
|
||||
*/
|
||||
# ifndef FD_SETSIZE
|
||||
# define FD_SETSIZE 1024
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* the version of the windows API enabled */
|
||||
# ifndef WINVER
|
||||
# define WINVER 0x0600 // 0x0502
|
||||
# endif
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0600 // 0x0502
|
||||
# endif
|
||||
# ifdef HAVE_WS2TCPIP_H
|
||||
# include <ws2tcpip.h>
|
||||
# endif
|
||||
|
||||
# ifdef _MSC_VER
|
||||
# if _MSC_VER >= 1800
|
||||
# define PRIsz "zu"
|
||||
# else
|
||||
# define PRIsz "Iu"
|
||||
# endif
|
||||
# include <BaseTsd.h>
|
||||
typedef SSIZE_T ssize_t;
|
||||
# else
|
||||
# define PRIsz "Iu"
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# endif
|
||||
|
||||
/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# define FD_SET_T (u_int)
|
||||
# else
|
||||
# define FD_SET_T
|
||||
# endif
|
||||
|
||||
/* Windows wants us to use _strdup instead of strdup */
|
||||
# ifndef strdup
|
||||
# define strdup _strdup
|
||||
# endif
|
||||
|
||||
/* Windows doesn't have strcasecmp and strncasecmp. */
|
||||
# define strcasecmp _stricmp
|
||||
# define strncasecmp _strnicmp
|
||||
#else
|
||||
# define PRIsz "zu"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BSD_STDLIB_H
|
||||
#include <bsd/stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BSD_STRING_H
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY || !defined(strlcpy)
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#else
|
||||
#ifndef __BSD_VISIBLE
|
||||
#define __BSD_VISIBLE 1
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM
|
||||
uint32_t arc4random(void);
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM_UNIFORM) || !HAVE_DECL_ARC4RANDOM_UNIFORM
|
||||
uint32_t arc4random_uniform(uint32_t upper_bound);
|
||||
#endif
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
void explicit_bzero(void* buf, size_t len);
|
||||
int getentropy(void* buf, size_t len);
|
||||
void arc4random_buf(void* buf, size_t n);
|
||||
void _ARC4_LOCK(void);
|
||||
void _ARC4_UNLOCK(void);
|
||||
#endif
|
||||
#ifdef COMPAT_SHA512
|
||||
#ifndef SHA512_DIGEST_LENGTH
|
||||
#define SHA512_BLOCK_LENGTH 128
|
||||
#define SHA512_DIGEST_LENGTH 64
|
||||
#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
|
||||
typedef struct _SHA512_CTX {
|
||||
uint64_t state[8];
|
||||
uint64_t bitcount[2];
|
||||
uint8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
} SHA512_CTX;
|
||||
#endif /* SHA512_DIGEST_LENGTH */
|
||||
void SHA512_Init(SHA512_CTX*);
|
||||
void SHA512_Update(SHA512_CTX*, void*, size_t);
|
||||
void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
|
||||
unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
|
||||
#endif /* COMPAT_SHA512 */
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
# ifndef _CUSTOM_VSNPRINTF
|
||||
# define _CUSTOM_VSNPRINTF
|
||||
static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *format, va_list ap)
|
||||
{ int r = vsnprintf(str, size, format, ap); return r == -1 ? _vscprintf(format, ap) : r; }
|
||||
# define vsnprintf _gldns_custom_vsnprintf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Use on-board gldns */
|
||||
#define USE_GLDNS 1
|
||||
#ifdef HAVE_SSL
|
||||
# define GLDNS_BUILD_CONFIG_HAVE_SSL 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_LIMITS_H
|
||||
#include <sys/limits.h>
|
||||
#endif
|
||||
|
||||
#ifdef PATH_MAX
|
||||
#define _GETDNS_PATH_MAX PATH_MAX
|
||||
#else
|
||||
#define _GETDNS_PATH_MAX 2048
|
||||
#endif
|
||||
|
||||
#ifndef PRIu64
|
||||
#define PRIu64 "llu"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ATTR_FORMAT
|
||||
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
|
||||
__attribute__ ((format (archetype, string_index, first_to_check)))
|
||||
#else /* !HAVE_ATTR_FORMAT */
|
||||
# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
|
||||
#endif /* !HAVE_ATTR_FORMAT */
|
||||
|
||||
#if defined(DOXYGEN)
|
||||
# define ATTR_UNUSED(x) x
|
||||
#elif defined(__cplusplus)
|
||||
# define ATTR_UNUSED(x)
|
||||
#elif defined(__GNUC__)
|
||||
# define ATTR_UNUSED(x) x __attribute__((unused))
|
||||
#else /* !HAVE_ATTR_UNUSED */
|
||||
# define ATTR_UNUSED(x) x
|
||||
#endif /* !HAVE_ATTR_UNUSED */
|
||||
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
|
||||
#define strptime unbound_strptime
|
||||
struct tm;
|
||||
char *strptime(const char *s, const char *format, struct tm *tm);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SIGSET_T) && defined(HAVE__SIGSET_T)
|
||||
typedef _sigset_t sigset_t;
|
||||
#endif
|
||||
#if !defined(HAVE_SIGEMPTYSET)
|
||||
# define sigemptyset(pset) (*(pset) = 0)
|
||||
#endif
|
||||
#if !defined(HAVE_SIGFILLSET)
|
||||
# define sigfillset(pset) (*(pset) = (sigset_t)-1)
|
||||
#endif
|
||||
#if !defined(HAVE_SIGADDSET)
|
||||
# define sigaddset(pset, num) (*(pset) |= (1L<<(num)))
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUNBOUND
|
||||
# include <unbound.h>
|
||||
# ifdef HAVE_UNBOUND_EVENT_H
|
||||
# include <unbound-event.h>
|
||||
# else
|
||||
# ifdef HAVE_UNBOUND_EVENT_API
|
||||
# ifndef _UB_EVENT_PRIMITIVES
|
||||
# define _UB_EVENT_PRIMITIVES
|
||||
struct ub_event_base;
|
||||
struct ub_ctx* ub_ctx_create_ub_event(struct ub_event_base* base);
|
||||
typedef void (*ub_event_callback_t)(void*, int, void*, int, int, char*);
|
||||
int ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
|
||||
int rrclass, void* mydata, ub_event_callback_t callback, int* async_id);
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_INET_PTON
|
||||
int inet_pton(int af, const char* src, void* dst);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_INET_NTOP
|
||||
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_MKSTEMP
|
||||
int mkstemp(char *template);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
int gettimeofday(struct timeval* tv, void* tz);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_H */
|
|
@ -0,0 +1,19 @@
|
|||
1 VERSIONINFO
|
||||
FILEVERSION @version_current@,@version_revision@,@version_age@,0
|
||||
PRODUCTVERSION @version_current@,@version_revision@,0,0
|
||||
FILEOS 4
|
||||
FILETYPE 2
|
||||
FILESUBTYPE 0
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "getdns project\0"
|
||||
VALUE "ProductName", "getdns\0"
|
||||
VALUE "FileVersion", "@version_current@.@version_revision@\0"
|
||||
VALUE "ProductVersion", "@version_current@.@version_revision@\0"
|
||||
VALUE "LegalCopyright", "NLnet Labs, Sinodun, No Mountain Software. New BSD licence.\0"
|
||||
END
|
||||
END
|
||||
END
|
|
@ -0,0 +1,114 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindCheck
|
||||
--------
|
||||
|
||||
Find the Check (Unit Testing Framework for C) library
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Check::Check``
|
||||
The Check library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Check_FOUND``
|
||||
If false, do not try to use Check.
|
||||
``CHECK_INCLUDE_DIR``
|
||||
where to find check.h, etc.
|
||||
``CHECK_LIBRARIES``
|
||||
the libraries needed to use Check.
|
||||
``CHECK_VERSION``
|
||||
the version of the Check library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgCheck IMPORTED_TARGET GLOBAL check)
|
||||
endif ()
|
||||
|
||||
if (PkgCheck_FOUND)
|
||||
set(CHECK_INCLUDE_DIR ${PkgCheck_INCLUDE_DIRS} CACHE FILEPATH "check include path")
|
||||
set(CHECK_LIBRARIES ${PkgCheck_LIBRARIES} CACHE STRING "check libraries")
|
||||
set(CHECK_VERSION ${PkgCheck_VERSION})
|
||||
add_library(Check::Check ALIAS PkgConfig::PkgCheck)
|
||||
set(Check_FOUND ON)
|
||||
else ()
|
||||
find_path(CHECK_INCLUDE_DIR check.h
|
||||
HINTS
|
||||
"${CHECK_DIR}"
|
||||
"${CHECK_DIR}/include"
|
||||
)
|
||||
|
||||
# Check for PIC and non-PIC libraries. If PIC present, use that
|
||||
# in preference (as per Debian check.pc).
|
||||
find_library(CHECK_LIBRARY NAMES check_pic libcheck_pic
|
||||
HINTS
|
||||
"${CHECK_DIR}"
|
||||
"${CHECK_DIR}/lib"
|
||||
)
|
||||
|
||||
if (NOT CHECK_LIBRARY)
|
||||
find_library(CHECK_LIBRARY NAMES check libcheck
|
||||
HINTS
|
||||
"${CHECK_DIR}"
|
||||
"${CHECK_DIR}/lib"
|
||||
)
|
||||
endif ()
|
||||
|
||||
set(_CHECK_LIBARIES "")
|
||||
|
||||
# Check may need the math, subunit and rt libraries on Unix
|
||||
if (UNIX)
|
||||
find_library(CHECK_MATH_LIBRARY m)
|
||||
find_library(CHECK_RT_LIBRARY rt)
|
||||
find_library(CHECK_SUBUNIT_LIBRARY subunit)
|
||||
|
||||
if (CHECK_MATH_LIBRARY)
|
||||
list(APPEND _CHECK_LIBARIES "${CHECK_MATH_LIBRARY}")
|
||||
endif ()
|
||||
if (CHECK_RT_LIBRARY)
|
||||
list(APPEND _CHECK_LIBARIES "${CHECK_RT_LIBRARY}")
|
||||
endif ()
|
||||
if (CHECK_SUBUNIT_LIBRARY)
|
||||
list(APPEND _CHECK_LIBARIES "${CHECK_SUBUNIT_LIBRARY}")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
set(CHECK_LIBRARIES ${_CHECK_LIBARIES} ${CHECK_LIBRARY} CACHE STRING "check libraries")
|
||||
|
||||
if (CHECK_INCLUDE_DIR AND CHECK_LIBRARY)
|
||||
if (NOT TARGET Check::Check)
|
||||
add_library(Check::Check UNKNOWN IMPORTED)
|
||||
set_target_properties(Check::Check PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CHECK_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${CHECK_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${CHECK_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT CHECK_VERSION AND CHECK_INCLUDE_DIR AND EXISTS "${CHECK_INCLUDE_DIR}/check.h")
|
||||
file(STRINGS "${CHECK_INCLUDE_DIR}/check.h" CHECK_H REGEX "^#define CHECK_M[A-Z]+_VERSION")
|
||||
string(REGEX REPLACE "^.*\(([0-9]+)\).*\(([0-9]+)\).*\(([0-9]+)\).*$" "\\1.\\2.\\3" CHECK_VERSION "${CHECK_H}")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
list(APPEND CHECK_LIBRARIES "${CHECK_LIBRARY}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Check
|
||||
REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIR
|
||||
VERSION_VAR CHECK_VERSION
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
mark_as_advanced(CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY
|
||||
CHECK_MATH_LIBRARY CHECK_RT_LIBRARY CHECK_SUBUNIT_LIBRARY)
|
|
@ -0,0 +1,101 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindGnuTLS
|
||||
----------
|
||||
|
||||
Find the GnuTLS library.
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``GnuTLS::GnuTLS``
|
||||
The GnuTLS library, if found.
|
||||
``GnuTLS::Dane``
|
||||
The GnuTLS DANE library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``GnuTLS_FOUND``
|
||||
If false, do not try to use GnuTLS.
|
||||
``GNUTLS_INCLUDE_DIR``
|
||||
where to find GnuTLS headers.
|
||||
``GNUTLS_LIBRARIES``
|
||||
the libraries needed to use GnuTLS.
|
||||
``GNUTLS_VERSION``
|
||||
the version of the GnuTLS library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgGnuTLS IMPORTED_TARGET GLOBAL QUIET gnutls)
|
||||
pkg_check_modules(PkgGnuTLSDane IMPORTED_TARGET GLOBAL QUIET gnutls-dane)
|
||||
endif ()
|
||||
|
||||
if (PkgGnuTLS_FOUND AND PkgGnuTLSDane_FOUND)
|
||||
set(GNUTLS_INCLUDE_DIR ${PkgGnuTLS_INCLUDE_DIRS} $PkgGnuTLSDane_INCLUDE_DIRS} CACHE FILEPATH "GnuTLS include path")
|
||||
set(NETTLE_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES} CACHE STRING "GnuTLS libraries")
|
||||
set(NETTLE_VERSION ${PkgGnuTLS_VERSION})
|
||||
add_library(GnuTLS::GnuTLS ALIAS PkgConfig::PkgGnuTLS)
|
||||
add_library(GnuTLS::Dane ALIAS PkgConfig::PkgGnuTLSDane)
|
||||
set(GnuTLS_FOUND ON)
|
||||
else ()
|
||||
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
|
||||
HINTS
|
||||
"${GNUTLS_DIR}"
|
||||
"${GNUTLS_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls
|
||||
HINTS
|
||||
"${GNUTLS_DIR}"
|
||||
"${GNUTLS_DIR}/lib"
|
||||
)
|
||||
|
||||
find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane
|
||||
HINTS
|
||||
"${GNUTLS_DIR}"
|
||||
"${GNUTLS_DIR}/lib"
|
||||
)
|
||||
|
||||
set(_GNUTLS_LIBRARIES "")
|
||||
|
||||
if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY)
|
||||
if (NOT TARGET GnuTLS::GnuTLS)
|
||||
add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED)
|
||||
set_target_properties(GnuTLS::GnuTLS PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${GNUTLS_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
if (NOT TARGET GnuTLS::Dane)
|
||||
add_library(GnuTLS::Dane UNKNOWN IMPORTED)
|
||||
set_target_properties(GnuTLS::Dane PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR)
|
||||
file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ")
|
||||
string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
list(APPEND _GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}")
|
||||
set(GNUTLS_LIBRARIES ${_GNUTLS_LIBRARIES} CACHE STRING "GnuTLS libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GnuTLS
|
||||
REQUIRED_VARS GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR
|
||||
VERSION_VAR GNUTLS_VERSION
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARIES GNUTLS_LIBRARY GNUTLS_DANE_LIBRARY)
|
|
@ -0,0 +1,63 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindLibev
|
||||
---------
|
||||
|
||||
Find the Libev library.
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Libev::Libev``
|
||||
The Libev library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Libev_FOUND``
|
||||
If false, do not try to use Libev.
|
||||
``LIBEV_INCLUDE_DIR``
|
||||
where to find libev headers.
|
||||
``LIBEV_LIBRARIES``
|
||||
the libraries needed to use Libev.
|
||||
``LIBEV_VERSION``
|
||||
the version of the Libev library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_path(LIBEV_INCLUDE_DIR ev.h
|
||||
HINTS
|
||||
"${LIBEV_DIR}"
|
||||
"${LIBEV_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(LIBEV_LIBRARY NAMES ev libev
|
||||
HINTS
|
||||
"${LIBEV_DIR}"
|
||||
"${LIBEV_DIR}/lib"
|
||||
)
|
||||
|
||||
set(LIBEV_LIBRARIES "")
|
||||
|
||||
if (LIBEV_INCLUDE_DIR AND LIBEV_LIBRARY)
|
||||
if (NOT TARGET Libev::Libev)
|
||||
add_library(Libev::Libev UNKNOWN IMPORTED)
|
||||
set_target_properties(Libev::Libev PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBEV_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${LIBEV_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
list(APPEND LIBEV_LIBRARIES "${LIBEV_LIBRARY}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libev
|
||||
REQUIRED_VARS LIBEV_LIBRARIES LIBEV_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARIES LIBEV_LIBRARY)
|
|
@ -0,0 +1,78 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindLibevent2
|
||||
-------------
|
||||
|
||||
Find the Libevent2 library. For now this finds the core library only.
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Libevent2::Libevent_core``
|
||||
The Libevent2 library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Libevent2_FOUND``
|
||||
If false, do not try to use Libevent2.
|
||||
``LIBEVENT2_INCLUDE_DIR``
|
||||
where to find libevent headers.
|
||||
``LIBEVENT2_LIBRARIES``
|
||||
the libraries needed to use Libevent2.
|
||||
``LIBEVENT2_VERSION``
|
||||
the version of the Libevent2 library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgLibevent IMPORTED_TARGET GLOBAL QUIET libevent>=2)
|
||||
endif ()
|
||||
|
||||
if (PkgLibevent_FOUND)
|
||||
set(LIBEVENT2_INCLUDE_DIR ${PkgLibevent_INCLUDE_DIRS} CACHE FILEPATH "libevent2 include path")
|
||||
set(LIBEVENT2_LIBRARIES ${PkgLibevent_LIBRARIES} CACHE STRING "libevent2 libraries")
|
||||
set(LIBEVENT2_VERSION ${PkgLibevent_VERSION})
|
||||
add_library(Libevent2::Libevent_core ALIAS PkgConfig::PkgLibevent)
|
||||
set(Libevent2_FOUND ON)
|
||||
else ()
|
||||
find_path(LIBEVENT2_INCLUDE_DIR event2/event.h
|
||||
HINTS
|
||||
"${LIBEVENT2_DIR}"
|
||||
"${LIBEVENT2_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(LIBEVENT2_LIBRARIES NAMES event_core libevent_core
|
||||
HINTS
|
||||
"${LIBEVENT2_DIR}"
|
||||
"${LIBEVENT2_DIR}/lib"
|
||||
)
|
||||
|
||||
if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARIES)
|
||||
if (NOT TARGET Libevent2::Libevent_core)
|
||||
add_library(Libevent2::Libevent_core UNKNOWN IMPORTED)
|
||||
set_target_properties(Libevent2::Libevent_core PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${LIBEVENT2_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h")
|
||||
file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ")
|
||||
string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libevent2
|
||||
REQUIRED_VARS LIBEVENT2_LIBRARIES LIBEVENT2_INCLUDE_DIR
|
||||
VERSION_VAR LIBEVENT2_VERSION
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(LIBEVENT2_INCLUDE_DIR LIBEVENT2_LIBRARIES)
|
|
@ -0,0 +1,77 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindLibidn2
|
||||
-----------
|
||||
|
||||
Find the Libidn2 library
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Libidn2::Libidn2``
|
||||
The Libidn2 library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Libidn2_FOUND``
|
||||
If false, do not try to use Libidn2.
|
||||
``LIBIDN2_INCLUDE_DIR``
|
||||
where to find libidn2 headers.
|
||||
``LIBIDN2_LIBRARIES``
|
||||
the libraries needed to use Libidn2.
|
||||
``LIBIDN2_VERSION``
|
||||
the version of the Libidn2 library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgLibIdn2 IMPORTED_TARGET GLOBAL libidn2)
|
||||
endif ()
|
||||
|
||||
if (PkgLibIdn2_FOUND)
|
||||
set(LIBIDN2_INCLUDE_DIR ${PkgLibIdn2_INCLUDE_DIRS} CACHE FILEPATH "libidn2 include path")
|
||||
set(LIBIDN2_LIBRARIES ${PkgLibIdn2_LIBRARIES} CACHE STRING "libidn2 libraries")
|
||||
set(LIBIDN2_VERSION ${PkgLibIdn2_VERSION})
|
||||
add_library(Libidn2::Libidn2 ALIAS PkgConfig::PkgLibIdn2)
|
||||
set(Libidn2_FOUND ON)
|
||||
else ()
|
||||
find_path(LIBIDN2_INCLUDE_DIR idn2.h
|
||||
HINTS
|
||||
"${LIBIDN2_DIR}"
|
||||
"${LIBIDN2_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(LIBIDN2_LIBRARIES NAMES idn2 libidn2
|
||||
HINTS
|
||||
"${LIBIDN2_DIR}"
|
||||
"${LIBIDN2_DIR}/lib"
|
||||
)
|
||||
|
||||
if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARIES)
|
||||
if (NOT TARGET Libidn2::Libidn2)
|
||||
add_library(Libidn2::Libidn2 UNKNOWN IMPORTED)
|
||||
set_target_properties(Libidn2::Libidn2 PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${LIBIDN2_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/idn2.h")
|
||||
file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^[ \t]*#[ \t]*define[ \t]+IDN2_VERSION[ \t]")
|
||||
string(REGEX REPLACE "^.*IDN2_VERSION[ \t]+\"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}")
|
||||
endif ()
|
||||
endif ()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libidn2
|
||||
REQUIRED_VARS LIBIDN2_LIBRARIES LIBIDN2_INCLUDE_DIR
|
||||
VERSION_VAR LIBIDN2_VERSION
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(LIBIDN2_INCLUDE_DIR LIBIDN2_LIBRARIES)
|
|
@ -0,0 +1,104 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindLibunbound
|
||||
--------------
|
||||
|
||||
Find the Libunbound library
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Libunbound::Libunbound``
|
||||
The Libunbound library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Libunbound_FOUND``
|
||||
If false, do not try to use Libunbound.
|
||||
``LIBUNBOUND_INCLUDE_DIR``
|
||||
where to find libunbound headers.
|
||||
``LIBUNBOUND_LIBRARIES``
|
||||
the libraries needed to use Libunbound.
|
||||
``LIBUNBOUND_VERSION``
|
||||
the version of the Libunbound library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgLibunbound IMPORTED_TARGET GLOBAL QUIET libunbound)
|
||||
endif ()
|
||||
|
||||
if (PkgLibunbound_FOUND)
|
||||
set(LIBUNBOUND_INCLUDE_DIR ${PkgLibunbound_INCLUDE_DIRS} CACHE FILEPATH "libunbound include path")
|
||||
set(LIBUNBOUND_LIBRARIES ${PkgLibunbound_LIBRARIES} CACHE STRING "libunbound libraries")
|
||||
set(LIBUNBOUND_VERSION ${PkgLibunbound_VERSION})
|
||||
add_library(Libunbound::Libunbound ALIAS PkgConfig::PkgLibunbound)
|
||||
set(Libunbound_FOUND ON)
|
||||
else ()
|
||||
find_path(LIBUNBOUND_INCLUDE_DIR unbound.h
|
||||
HINTS
|
||||
"${LIBUNBOUND_DIR}"
|
||||
"${LIBUNBOUND_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(LIBUNBOUND_LIBRARY NAMES unbound
|
||||
HINTS
|
||||
"${LIBUNBOUND_DIR}"
|
||||
"${LIBUNBOUND_DIR}/lib"
|
||||
)
|
||||
|
||||
set(_LIBUNBOUND_LIBRARIES "")
|
||||
|
||||
if (UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
list(APPEND _LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
list(APPEND _LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY)
|
||||
if (NOT TARGET Libunbound::Libunbound)
|
||||
add_library(Libunbound::Libunbound UNKNOWN IMPORTED)
|
||||
set_target_properties(Libunbound::Libunbound PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}"
|
||||
)
|
||||
|
||||
if(UNIX AND TARGET Threads::Threads)
|
||||
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads)
|
||||
endif ()
|
||||
if(UNIX AND TARGET OpenSSL::SSL)
|
||||
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES OpenSSL::SSL)
|
||||
endif ()
|
||||
if(UNIX AND TARGET OpenSSL::Crypto)
|
||||
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h")
|
||||
file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+")
|
||||
string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
list(APPEND _LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}")
|
||||
set(LIBUNBOUND_LIBRARIES ${_LIBUNBOUND_LIBRARIES} CACHE STRING "libunbound libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libunbound
|
||||
REQUIRED_VARS LIBUNBOUND_LIBRARIES LIBUNBOUND_INCLUDE_DIR
|
||||
VERSION_VAR LIBUNBOUND_VERSION
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(LIBUNBOUND_INCLUDE_DIR LIBUNBOUND_LIBRARIES LIBUNBOUND_LIBRARY)
|
|
@ -0,0 +1,82 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindLibuv
|
||||
---------
|
||||
|
||||
Find the Libuv library.
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Libuv::Libuv``
|
||||
The Libuv library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Libuv_FOUND``
|
||||
If false, do not try to use Libuv.
|
||||
``LIBUV_INCLUDE_DIR``
|
||||
where to find libuv headers.
|
||||
``LIBUV_LIBRARIES``
|
||||
the libraries needed to use Libuv.
|
||||
``LIBUV_VERSION``
|
||||
the version of the Libuv library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgLibuv IMPORTED_TARGET GLOBAL libuv)
|
||||
endif ()
|
||||
|
||||
if (PkgLibuv_FOUND)
|
||||
set(LIBUV_INCLUDE_DIR ${PkgLibuv_INCLUDE_DIRS} CACHE FILEPATH "libuv include path")
|
||||
set(LIBUV_LIBRARIES ${PkgLibuv_LIBRARIES} CACHE STRING "libuv libraries")
|
||||
set(LIBUV_VERSION ${PkgLibuv_VERSION})
|
||||
add_library(Libuv::Libuv ALIAS PkgConfig::PkgLibuv)
|
||||
set(Libuv_FOUND ON)
|
||||
else ()
|
||||
find_path(LIBUV_INCLUDE_DIR uv.h
|
||||
HINTS
|
||||
"${LIBUV_DIR}"
|
||||
"${LIBUV_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(LIBUV_LIBRARIES NAMES uv libuv
|
||||
HINTS
|
||||
"${LIBUV_DIR}"
|
||||
"${LIBUV_DIR}/lib"
|
||||
)
|
||||
|
||||
if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARIES)
|
||||
if (NOT TARGET Libuv::Libuv)
|
||||
add_library(Libuv::Libuv UNKNOWN IMPORTED)
|
||||
set_target_properties(Libuv::Libuv PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${LIBUV_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR)
|
||||
if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h")
|
||||
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ")
|
||||
elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h")
|
||||
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ")
|
||||
endif ()
|
||||
string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libuv
|
||||
REQUIRED_VARS LIBUV_LIBRARIES LIBUV_INCLUDE_DIR
|
||||
VERSION_VAR LIBUV_VERSION
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARIES)
|
|
@ -0,0 +1,111 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindNettle
|
||||
----------
|
||||
|
||||
Find the Nettle library.
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Nettle::Nettle``
|
||||
The Nettle library, if found.
|
||||
``Nettle::Hogweed``
|
||||
The Hogweed library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Nettle_FOUND``
|
||||
If false, do not try to use Nettle.
|
||||
``NETTLE_INCLUDE_DIR``
|
||||
where to find Nettle headers.
|
||||
``NETTLE_LIBRARIES``
|
||||
the libraries needed to use Nettle.
|
||||
``NETTLE_VERSION``
|
||||
the version of the Nettle library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgNettle IMPORTED_TARGET GLOBAL nettle)
|
||||
pkg_check_modules(PkgHogweed IMPORTED_TARGET GLOBAL QUIET hogweed)
|
||||
endif()
|
||||
|
||||
if(PkgNettle_FOUND AND PkHogweed_FOUND)
|
||||
set(NETTLE_INCLUDE_DIR ${PkgNettle_INCLUDE_DIRS} ${PkgHogweed_INCLUDE_DIRS} CACHE FILEPATH "Nettle include path")
|
||||
set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} CACHE STRING "Nettle libraries")
|
||||
set(NETTLE_VERSION ${PkgNettle_VERSION})
|
||||
add_library(Nettle::Nettle ALIAS PkgConfig::PkgNettle)
|
||||
add_library(Nettle::Hogweed ALIAS PkgConfig::PkgHogweed)
|
||||
set(Nettle_FOUND ON)
|
||||
else()
|
||||
find_path(NETTLE_INCLUDE_DIR nettle/version.h
|
||||
HINTS
|
||||
"${NETTLE_DIR}"
|
||||
"${NETTLE_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(NETTLE_LIBRARY NAMES nettle libnettle
|
||||
HINTS
|
||||
"${NETTLE_DIR}"
|
||||
"${NETTLE_DIR}/lib"
|
||||
)
|
||||
|
||||
find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed
|
||||
HINTS
|
||||
"${NETTLE_DIR}"
|
||||
"${NETTLE_DIR}/lib"
|
||||
)
|
||||
|
||||
set(_NETTLE_LIBRARIES ${NETTLE_LIBRARY} ${HOGWEED_LIBRARY})
|
||||
|
||||
# May need gmp library on Unix.
|
||||
if (UNIX)
|
||||
find_library(NETTLE_GMP_LIBRARY gmp)
|
||||
endif ()
|
||||
if (NETTLE_GMP_LIBRARY)
|
||||
list(APPEND _NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}")
|
||||
endif ()
|
||||
set(NETTLE_LIBRARIES ${_NETTLE_LIBRARIES} CACHE STRING "nettle libraries")
|
||||
|
||||
|
||||
if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY)
|
||||
if (NOT TARGET Nettle::Nettle)
|
||||
add_library(Nettle::Nettle UNKNOWN IMPORTED)
|
||||
set_target_properties(Nettle::Nettle PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${NETTLE_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
if (NOT TARGET Nettle::Hogweed)
|
||||
add_library(Nettle::Hogweed UNKNOWN IMPORTED)
|
||||
set_target_properties(Nettle::Hogweed PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${HOGWEED_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR)
|
||||
file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ")
|
||||
string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Nettle
|
||||
REQUIRED_VARS NETTLE_LIBRARIES NETTLE_INCLUDE_DIR
|
||||
VERSION_VAR NETTLE_VERSION
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(NETTLE_INCLUDE_DIR NETTLE_LIBRARIES NETTLE_LIBRARY HOGWEED_LIBRARY NETTLE_GMP_LIBRARY)
|
|
@ -0,0 +1,27 @@
|
|||
# Export only named entry points from shared library.
|
||||
function(target_shared_library_exports lib libname symbols)
|
||||
if (WIN32)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def" "LIBRARY ${libname}\n EXPORTS\n")
|
||||
foreach (symbol IN LISTS symbols)
|
||||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def" " ${symbol}\n")
|
||||
endforeach ()
|
||||
target_sources(${lib} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def")
|
||||
elseif (APPLE)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms" "")
|
||||
foreach (symbol IN LISTS symbols)
|
||||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms" "_${symbol}\n")
|
||||
endforeach ()
|
||||
target_sources(${lib} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms")
|
||||
target_link_libraries(${lib} PRIVATE "-exported_symbols_list ${libname}.syms")
|
||||
elseif (UNIX)
|
||||
# Assume GNU ld.
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" "{ global:\n")
|
||||
foreach (symbol IN LISTS symbols)
|
||||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" " ${symbol};\n")
|
||||
endforeach ()
|
||||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" "local:\n *;\n};\n")
|
||||
target_link_libraries(${lib} PRIVATE "-Wl,--version-script=${libname}.ver")
|
||||
else ()
|
||||
message(WARNING "Unknown platform, ${lib} exports not set.")
|
||||
endif ()
|
||||
endfunction ()
|
|
@ -0,0 +1,25 @@
|
|||
# Add version to given shared library linkage.
|
||||
function(target_shared_library_version lib version_current version_revision version_age)
|
||||
if (APPLE)
|
||||
# Follow libtool. Add one to major version, as version 0 doesn't work.
|
||||
# But tag dynlib name with current-age.
|
||||
math(EXPR major_version "${version_current}+1")
|
||||
math(EXPR dynlib_version "${version_current}-${version_age}")
|
||||
set_target_properties(${lib} PROPERTIES VERSION "${dynlib_version}")
|
||||
target_link_libraries(${lib} PRIVATE "-compatibility_version ${major_version}")
|
||||
target_link_libraries(${lib} PRIVATE "-current_version ${major_version}.${version_revision}")
|
||||
elseif (UNIX OR MINGW OR MSYS OR CYGWIN)
|
||||
# Assume GNU ld, and again follow libtool. Major version is current-age.
|
||||
math(EXPR compat_version "${version_current}-${version_age}")
|
||||
set_target_properties(${lib} PROPERTIES VERSION "${compat_version}.${version_age}.${version_revision}" SOVERSION "${compat_version}")
|
||||
elseif (WIN32)
|
||||
set(rc_template "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/${lib}_version.rc.in")
|
||||
if (EXISTS ${rc_template})
|
||||
configure_file(${rc_template} ${lib}.rc @ONLY)
|
||||
target_sources(${lib} PRIVATE ${lib}.rc)
|
||||
endif ()
|
||||
target_link_libraries(${lib} PRIVATE "-VERSION:${version_current}.${version_revision}")
|
||||
else ()
|
||||
message(WARNING "Unknown platform, ${lib} will not be versioned.")
|
||||
endif ()
|
||||
endfunction ()
|
|
@ -0,0 +1,4 @@
|
|||
int main (int ac, char *av[])
|
||||
{
|
||||
char *s = __func__;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#ifdef HAVE_SYS_POLL_H
|
||||
#include <sys/poll.h>
|
||||
#else
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
int main (int ac, char *av[])
|
||||
{
|
||||
int rc;
|
||||
rc = poll((struct pollfd *)(0), 0, 0);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#include <uv.h>
|
||||
|
||||
void test_cb(uv_timer_t *handle)
|
||||
{
|
||||
(void) handle;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
uv_timer_cb cb = test_cb;
|
||||
(*cb)(0);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
837
configure.ac
837
configure.ac
|
@ -1,837 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
# known to work with autconf version: autoconf (GNU Autoconf) 2.69
|
||||
#
|
||||
# @configure_input@
|
||||
#
|
||||
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the names of the copyright holders nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
AC_PREREQ([2.56])
|
||||
|
||||
AC_INIT([getdns], [0.3.0], [stub-resolver@verisignlabs.com], [], [http://getdnsapi.net])
|
||||
AC_SUBST(RELEASE_CANDIDATE, [])
|
||||
|
||||
# Set current date from system if not set
|
||||
AC_ARG_WITH([current-date],
|
||||
[AS_HELP_STRING([--with-current-date]
|
||||
[current date of the compilation, set to fixed date for reproducible builds @<:@default=system@:>@])],
|
||||
[CURRENT_DATE="$with_current_date"],
|
||||
[CURRENT_DATE="`date -u +%Y-%m-%dT%H:%M:%SZ`"])
|
||||
|
||||
AC_SUBST(GETDNS_VERSION, ["AC_PACKAGE_VERSION$RELEASE_CANDIDATE"])
|
||||
AC_SUBST(GETDNS_NUMERIC_VERSION, [0x00030000])
|
||||
AC_SUBST(API_VERSION, ["July 2015"])
|
||||
AC_SUBST(API_NUMERIC_VERSION, [0x07df0700])
|
||||
GETDNS_COMPILATION_COMMENT="AC_PACKAGE_NAME $GETDNS_VERSION configured on $CURRENT_DATE for the $API_VERSION version of the API"
|
||||
|
||||
|
||||
# Library version
|
||||
# ---------------
|
||||
# current:revision:age
|
||||
# (binary-api-number):(which-binary-api-version):(how-many-nrs-backwardscompat)
|
||||
# if source code changes increment revision
|
||||
# if any interfaces have been added/removed/changed since last update then
|
||||
# increment current and set revision to 0
|
||||
# if any interfaces have been added since the last public release then increment age
|
||||
# if any interfaces have been removed or changed since the last public release then
|
||||
# set age to 0
|
||||
#
|
||||
# getdns-0.1.4 had libversion 0:0:0
|
||||
# getdns-0.1.5 had libversion 1:0:0
|
||||
# getdns-0.1.6 had libversion 1:1:0
|
||||
# getdns-0.1.7 had libversion 1:2:1 (but should have had 2:0:1)
|
||||
# getdns-0.1.8 had libversion 1:3:0 (but should have had 2:1:1)
|
||||
# getdns-0.2.0 had libversion 2:2:1
|
||||
# getdns-0.3.0 has libversion 3:3:2
|
||||
#
|
||||
GETDNS_LIBVERSION=3:3:2
|
||||
|
||||
AC_SUBST(GETDNS_COMPILATION_COMMENT)
|
||||
AC_SUBST(GETDNS_LIBVERSION)
|
||||
AC_CONFIG_SRCDIR([src/getdns/getdns.h.in])
|
||||
# AM_INIT_AUTOMAKE
|
||||
# LT_INIT
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
|
||||
# Checks for programs.
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
CFLAGS="$CFLAGS"
|
||||
AC_PROG_CC_C99
|
||||
AX_CHECK_COMPILE_FLAG([-xc99],[CFLAGS="$CFLAGS -xc99"],[],[])
|
||||
AX_CHECK_COMPILE_FLAG([-Wall],[CFLAGS="$CFLAGS -Wall"],[],[])
|
||||
|
||||
case "$host_os" in
|
||||
linux* ) CFLAGS="$CFLAGS -D_BSD_SOURCE"
|
||||
;;
|
||||
solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h>
|
||||
;;
|
||||
darwin* ) CFLAGS="$CFLAGS -D_DARWIN_C_SOURCE" # for strlcpy() from <string.h>
|
||||
;;
|
||||
esac
|
||||
|
||||
# always use ./libtool unless override from commandline (libtool=mylibtool)
|
||||
if test -z "$libtool"; then
|
||||
libtool="`pwd`/libtool"
|
||||
fi
|
||||
AC_SUBST(libtool)
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
|
||||
initial_LIBS="$LIBS"
|
||||
initial_LDFLAGS="$LDFLAGS"
|
||||
|
||||
dnl Add option to disable the evil rpath. Check whether to use rpath or not.
|
||||
dnl Adds the --disable-rpath option. Uses trick to edit the ./libtool.
|
||||
AC_DEFUN([ACX_ARG_RPATH],
|
||||
[
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath disable hardcoded rpath (default=enabled)],
|
||||
enable_rpath="$enableval", enable_rpath=yes)
|
||||
if test "x$enable_rpath" = xno; then
|
||||
dnl AC_MSG_RESULT([Fixing libtool for -rpath problems.])
|
||||
AC_CONFIG_COMMANDS([disable-rpath], [
|
||||
sed < libtool > libtool-2 \
|
||||
's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
|
||||
mv libtool-2 libtool
|
||||
chmod 755 libtool
|
||||
libtool="./libtool"
|
||||
])
|
||||
fi
|
||||
])
|
||||
ACX_ARG_RPATH
|
||||
|
||||
AC_ARG_ENABLE(debug-sched, AC_HELP_STRING([--enable-debug-sched], [Enable scheduling debugging messages]))
|
||||
case "$enable_debug_sched" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([SCHED_DEBUG], [1], [Define this to enable printing of scheduling debugging messages.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(debug-stub, AC_HELP_STRING([--enable-debug-stub], [Enable stub debugging messages]))
|
||||
case "$enable_debug_stub" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([STUB_DEBUG], [1], [Define this to enable printing of stub debugging messages.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(debug-sec, AC_HELP_STRING([--enable-debug-sec], [Enable dnssec debugging messages]))
|
||||
case "$enable_debug_sec" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([SEC_DEBUG], [1], [Define this to enable printing of dnssec debugging messages.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--enable-tcp-fastopen], [Enable TCP Fast Open]))
|
||||
case "$enable_tcp_fastopen" in
|
||||
yes)
|
||||
AC_CHECK_DECL([MSG_FASTOPEN], [], [AC_MSG_ERROR([TCP Fast Open is not available: please rerun without --enable-tcp-fastopen])], [AC_INCLUDES_DEFAULT
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Not yet enabled by default as crash found when TCP fails.
|
||||
# AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--disable-tcp-fastopen], Disable TCP Fast Open (default=enabled if available)),
|
||||
# enable_tcp_fastopen="$enableval", enable_tcp_fastopen=yes)
|
||||
# if test "x$enable_tcp_fastopen" = xno; then
|
||||
# AC_MSG_WARN([TCP Fast Open is disabled])
|
||||
# else
|
||||
# AC_CHECK_DECL([MSG_FASTOPEN], [AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.])],
|
||||
# [AC_MSG_WARN([TCP Fast Open is not available.])], [AC_INCLUDES_DEFAULT
|
||||
# #include <sys/socket.h>
|
||||
# ])
|
||||
# fi
|
||||
|
||||
AC_ARG_ENABLE(native-stub-dnssec, AC_HELP_STRING([--disable-native-stub-dnssec], [Disable native stub DNSSEC support]))
|
||||
case "$enable_native_stub_dnssec" in
|
||||
no)
|
||||
;;
|
||||
yes|*)
|
||||
AC_DEFINE_UNQUOTED([STUB_NATIVE_DNSSEC], [1], [Define this to enable native stub DNSSEC support.])
|
||||
;;
|
||||
esac
|
||||
|
||||
ACX_WITH_SSL_OPTIONAL
|
||||
|
||||
|
||||
AC_ARG_ENABLE(draft-edns-cookies, AC_HELP_STRING([--enable-draft-edns-cookies], [Enable experimental edns cookies]))
|
||||
case "$enable_draft_edns_cookies" in
|
||||
yes)
|
||||
if test "x_$HAVE_SSL" != "x_yes"; then
|
||||
AC_MSG_ERROR([edns cookies need openssl libcrypto which is not available, please rerun without --enable-draft-edns-cookies])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([EDNS_COOKIES], [1], [Define this to enable the experimental draft edns cookies.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED([EDNS_COOKIE_OPCODE], [10], [The edns cookie option code.])
|
||||
AC_DEFINE_UNQUOTED([EDNS_COOKIE_ROLLOVER_TIME], [(24 * 60 * 60)], [How often the edns client cookie is refreshed.])
|
||||
|
||||
# search to set include and library paths right
|
||||
# find libidn
|
||||
AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=pathname],
|
||||
[path to libidn (default: search /usr/local ..)]),
|
||||
[], [withval="yes"])
|
||||
if test x_$withval = x_yes; then
|
||||
for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do
|
||||
if test -f "$dir/include/idna.h"; then
|
||||
CFLAGS="$CFLAGS -I$dir/include"
|
||||
LDFLAGS="$LDFLAGS -L$dir/lib"
|
||||
AC_MSG_NOTICE([Found libidn in $dir])
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/include/idn/idna.h"; then
|
||||
CFLAGS="$CFLAGS -I$dir/include/idn"
|
||||
LDFLAGS="$LDFLAGS -L$dir/lib"
|
||||
AC_MSG_NOTICE([Found libidn in $dir])
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -f "/usr/include/idn/idna.h"; then
|
||||
CFLAGS="$CFLAGS -I/usr/include/idn"
|
||||
#LDFLAGS="$LDFLAGS -L/usr/lib"
|
||||
AC_MSG_NOTICE([Found libidn in /usr])
|
||||
fi
|
||||
else
|
||||
if test x_$withval != x_no; then
|
||||
CFLAGS="$CFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
# find libldns
|
||||
AC_ARG_WITH(libldns, AS_HELP_STRING([--with-libldns=pathname],
|
||||
[path to libldns (default: search /usr/local ..)]),
|
||||
[], [withval="yes"])
|
||||
if test x_$withval = x_yes; then
|
||||
for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do
|
||||
if test -f "$dir/include/ldns/ldns.h"; then
|
||||
CFLAGS="$CFLAGS -I$dir/include"
|
||||
LDFLAGS="$LDFLAGS -L$dir/lib"
|
||||
AC_MSG_NOTICE([Found libldns in $dir])
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test x_$withval != x_no; then
|
||||
CFLAGS="$CFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
# find libunbound
|
||||
AC_ARG_WITH(libunbound, AS_HELP_STRING([--with-libunbound=pathname],
|
||||
[path to libunbound (default: search /usr/local ..)]),
|
||||
[], [withval="yes"])
|
||||
if test x_$withval = x_yes; then
|
||||
for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do
|
||||
if test -f "$dir/include/unbound.h"; then
|
||||
CFLAGS="$CFLAGS -I$dir/include"
|
||||
LDFLAGS="$LDFLAGS -L$dir/lib"
|
||||
AC_MSG_NOTICE([Found libunbound in $dir])
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test x_$withval != x_no; then
|
||||
CFLAGS="$CFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
found_all_libs=1
|
||||
AC_MSG_NOTICE([Checking for dependency ldns])
|
||||
AC_CHECK_LIB([ldns], [ldns_dname_new_frm_str], [], [found_all_libs=0])
|
||||
AC_MSG_NOTICE([Checking for dependency libidn])
|
||||
AC_CHECK_LIB([idn], [idna_to_ascii_8z], [], [found_all_libs=0])
|
||||
|
||||
AC_CHECK_MEMBER([struct ldns_struct_dnssec_zone.hashed_names],
|
||||
[AC_DEFINE_UNQUOTED([LDNS_DNSSEC_ZONE_HASHED_NAMES], [1], [When defined ldns_dnssec_zone contained the hashed_names member.])], [], [[#include <ldns/ldns.h>]])
|
||||
|
||||
if test $found_all_libs == 0
|
||||
then
|
||||
AC_MSG_ERROR([One more dependencies is missing])
|
||||
fi
|
||||
|
||||
# break out libunbound from other libraries since we are currently using a
|
||||
# patch to the sources
|
||||
found_libunbound=1
|
||||
AC_MSG_NOTICE([Checking for dependency libunbound])
|
||||
AC_CHECK_LIB([unbound], [ub_fd], [], [found_libunbound=0])
|
||||
if test $found_libunbound == 0
|
||||
then
|
||||
AC_MSG_ERROR([libunbound is missing.])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG([DOXYGEN], [doxygen])
|
||||
if test -z "$DOXYGEN";
|
||||
then AC_MSG_WARN([doxygen not found, continuing without])
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h],,, [AC_INCLUDES_DEFAULT])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_UINT8_T
|
||||
AC_CHECK_TYPE([u_char])
|
||||
|
||||
AC_CHECK_FUNCS([fcntl])
|
||||
# check ioctlsocket
|
||||
AC_MSG_CHECKING(for ioctlsocket)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
], [
|
||||
(void)ioctlsocket(0, 0, NULL);
|
||||
])], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IOCTLSOCKET, 1, [if the function 'ioctlsocket' is available])
|
||||
],[AC_MSG_RESULT(no)])
|
||||
|
||||
|
||||
# Check for libraries for other things than libgetdns after this point,
|
||||
# so the getdns libraries can be reset with:
|
||||
#
|
||||
# LIBS="$getdns_LIBS"
|
||||
# LDFLAGS="$getdns_LDFLAGS"
|
||||
#
|
||||
# afterwards.
|
||||
getdns_LIBS="$LIBS"
|
||||
getdns_LDFLAGS="$LDFLAGS"
|
||||
|
||||
#-------------------- libraries needed for libcheck
|
||||
LIBS="$initial_LIBS"
|
||||
|
||||
CHECK_GETDNS=""
|
||||
CHECK_LIBS=""
|
||||
CHECK_CFLAGS=""
|
||||
|
||||
PKG_CHECK_MODULES([CHECK],[check >= 0.9.6],[CHECK_GETDNS="check_getdns"],[
|
||||
AC_SEARCH_LIBS([floor], [m])
|
||||
AC_SEARCH_LIBS([timer_create], [rt])
|
||||
AC_SEARCH_LIBS([pthread_create], [pthread])
|
||||
AC_SEARCH_LIBS([srunner_create],[check check_pic],[
|
||||
CHECK_GETDNS="check_getdns"
|
||||
CHECK_LIBS="$LIBS"],[
|
||||
AC_SUBST(NOLIBCHECK, [nolibcheck])
|
||||
AC_MSG_WARN([libcheck not found or usable; unit tests will not be compiled and run])])])
|
||||
|
||||
LIBS="$getdns_LIBS"
|
||||
|
||||
AC_SUBST([CHECK_GETDNS])
|
||||
AC_SUBST([CHECK_LIBS])
|
||||
AC_SUBST([CHECK_CFLAGS])
|
||||
# end libraries needed for libcheck
|
||||
|
||||
#-------------------- libevent extension
|
||||
AC_ARG_WITH([libevent],
|
||||
[AS_HELP_STRING([--with-libevent], [path to libevent (default: search /usr/local ..)])],
|
||||
[with_libevent=search],
|
||||
[withval=no])
|
||||
|
||||
# libevent 1.x requires a u_char typedef which is not always available
|
||||
# on some systems so our check is a little complicated
|
||||
# we further need to ensure that this is included in the getdns headers
|
||||
# that get installed later so some users may not be building in an
|
||||
# environment that has the generated config.h SO we need to generate
|
||||
# this one extra header in that case
|
||||
|
||||
have_libevent=0
|
||||
EXTENSION_LIBEVENT_EXT_LIBS=""
|
||||
EXTENSION_LIBEVENT_LIB=""
|
||||
EXTENSION_LIBEVENT_LDFLAGS=""
|
||||
CHECK_EVENT_PROG=""
|
||||
AS_IF([test x_$withval = x_no],
|
||||
[],
|
||||
[AS_IF([test x_$withval = x_yes],
|
||||
[AC_SEARCH_LIBS([event_loop],
|
||||
[event_core event],
|
||||
[AC_CHECK_FUNCS([event_base_new event_base_free])]
|
||||
[AC_CHECK_HEADERS([event2/event.h],
|
||||
[have_libevent=1]
|
||||
[AS_IF([test "x_$ac_cv_search_event_loop" = "x_none required"],[],[EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop"])],
|
||||
[AC_CHECK_HEADERS([event.h],
|
||||
[have_libevent=1]
|
||||
[AS_IF([test "x_$ac_cv_search_event_loop" = "x_none required"],[],[EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop"])],
|
||||
[AC_MSG_ERROR([event2/event.h and event.h missing, try without libevent])]
|
||||
[have_libevent=0],
|
||||
[AC_INCLUDES_DEFAULT]
|
||||
[#if HAVE_U_CHAR == 0
|
||||
typedef unsigned char u_char;
|
||||
#endif])],
|
||||
[AC_INCLUDES_DEFAULT])],
|
||||
[AC_MSG_ERROR([libevent missing, try without libevent])]
|
||||
)],
|
||||
[have_libevent=1]
|
||||
[AC_MSG_NOTICE([assuming libevent in $withval])]
|
||||
[CFLAGS="$CFLAGS -I$withval/include"]
|
||||
[EXTENSION_LIBEVENT_LDFLAGS="-L$withval/lib"]
|
||||
[EXTENSION_LIBEVENT_EXT_LIBS="-levent"])]
|
||||
)
|
||||
|
||||
AS_IF([test x_$have_libevent = x_1],
|
||||
[EXTENSION_LIBEVENT_LIB="libgetdns_ext_event.la"]
|
||||
[CHECK_EVENT_PROG=check_getdns_event]
|
||||
# libunbound version 1.4.22 and older, not linked against libevent, on FreeBSD,
|
||||
# =============================================================================
|
||||
# cannot be linked against a program that also links libevent, because of
|
||||
# symbol clash. Libunbound has a libevent clone (called mini_event) build when
|
||||
# not linked against libevent that uses the same symbols as libevent.
|
||||
|
||||
# First detect if the libevent symbols are visible when linking with libunbound
|
||||
[LIBS="$getdns_LIBS"]
|
||||
[LDFLAGS="$getdns_LDFLAGS"]
|
||||
[AC_MSG_CHECKING([if event_get_version symbol is leaking from libunbound])]
|
||||
[AC_LANG_PUSH(C)]
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[const char *event_get_version(void);]],
|
||||
[[const char *v = event_get_version();]])
|
||||
],[[AC_MSG_RESULT([yes])]
|
||||
[AC_MSG_CHECKING([if libunbound is linked against libevent])]
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[const char *event_get_version(void);]],
|
||||
[[const char *v = event_get_version();]
|
||||
[return v@<:@0@:>@ == 'm' && v@<:@1@:>@ == 'i' &&
|
||||
v@<:@2@:>@ == 'n' && v@<:@3@:>@ == 'i' ? 1 : 0;]])
|
||||
],[[AC_MSG_RESULT([yes])]
|
||||
],[[AC_MSG_RESULT([no])]
|
||||
[AC_MSG_FAILURE([
|
||||
***
|
||||
*** On this system, when using libevent, libunbound must
|
||||
*** also have been compiled with libevent. Please recompile
|
||||
*** libunbound with libevent, or configure --without-libevent.
|
||||
***])]
|
||||
]
|
||||
)
|
||||
],[[AC_MSG_RESULT([no])]
|
||||
]
|
||||
)
|
||||
[AC_LANG_POP(C)])
|
||||
|
||||
AC_SUBST(have_libevent)
|
||||
AC_SUBST(EXTENSION_LIBEVENT_LIB)
|
||||
AC_SUBST(EXTENSION_LIBEVENT_EXT_LIBS)
|
||||
AC_SUBST(EXTENSION_LIBEVENT_LDFLAGS)
|
||||
AS_IF([test "x$have_libcheck" = x1], [AC_SUBST(CHECK_EVENT_PROG)])
|
||||
|
||||
LIBS="$getdns_LIBS"
|
||||
LDFLAGS="$getdns_LDFLAGS"
|
||||
# end libevent extension
|
||||
|
||||
#-------------------- libuv extension
|
||||
# if user says nothing about libuv, or specifies --with-libuv=no or --without-libuv
|
||||
# then we do not want libuv extensions built
|
||||
# if user specifies --with-libuv then search for it
|
||||
# if user specifies --with-libuv=/path then check the lib at that path
|
||||
AC_ARG_WITH([libuv],
|
||||
[AS_HELP_STRING([--with-libuv], [path to libuv (default: search /usr/local ..)])],
|
||||
[with_libuv=search],
|
||||
[withval=no])
|
||||
|
||||
have_libuv=0
|
||||
EXTENSION_LIBUV_EXT_LIBS=""
|
||||
EXTENSION_LIBUV_LIB=""
|
||||
EXTENSION_LIBUV_LDFLAGS=""
|
||||
CHECK_UV_PROG=""
|
||||
AS_IF([test x_$withval = x_no],
|
||||
[],
|
||||
[AS_IF([test x_$withval = x_yes],
|
||||
[AC_SEARCH_LIBS([uv_run],
|
||||
[uv],
|
||||
[AC_CHECK_HEADERS([uv.h],
|
||||
[have_libuv=1]
|
||||
[EXTENSION_LIBUV_EXT_LIBS="$ac_cv_search_uv_run"],
|
||||
[AC_MSG_ERROR([uv.h missing, try without libuv])]
|
||||
[have_libuv=0],
|
||||
[AC_INCLUDES_DEFAULT])],
|
||||
[AC_MSG_ERROR([libuv missing, try without libuv])]
|
||||
)],
|
||||
[have_libuv=1]
|
||||
[AC_MSG_NOTICE([assuming libuv in $withval])]
|
||||
[CFLAGS="$CFLAGS -I$withval/include"]
|
||||
[EXTENSION_LIBUV_LDFLAGS="-L$withval/lib"]
|
||||
[EXTENSION_LIBUV_EXT_LIBS="-luv"])]
|
||||
)
|
||||
|
||||
AS_IF([test x_$have_libuv = x_1],
|
||||
[EXTENSION_LIBUV_LIB="libgetdns_ext_uv.la"]
|
||||
[CHECK_UV_PROG=check_getdns_uv]
|
||||
[AC_MSG_CHECKING([for new signature of uv_timer_cb])
|
||||
AC_LANG_PUSH(C)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <uv.h>]
|
||||
[void test_cb(uv_timer_t *handle);]],
|
||||
[[uv_timer_cb cb = test_cb;]
|
||||
[(*cb)(0);]])
|
||||
],[AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_NEW_UV_TIMER_CB, [1], [Does libuv have the new uv_time_cb signature])
|
||||
],[AC_MSG_RESULT([no])
|
||||
])
|
||||
AC_LANG_POP(C)]
|
||||
)
|
||||
|
||||
AC_SUBST(have_libuv)
|
||||
AC_SUBST(EXTENSION_LIBUV_LIB)
|
||||
AC_SUBST(EXTENSION_LIBUV_EXT_LIBS)
|
||||
AC_SUBST(EXTENSION_LIBUV_LDFLAGS)
|
||||
AS_IF([test "x$have_libcheck" = x1], [AC_SUBST(CHECK_UV_PROG)])
|
||||
|
||||
LIBS="$getdns_LIBS"
|
||||
LDFLAGS="$getdns_LDFLAGS"
|
||||
# end libuv extension
|
||||
|
||||
#-------------------- libev extension
|
||||
AC_ARG_WITH([libev],
|
||||
[AS_HELP_STRING([--with-libev], [path to libev (default: search /usr/local ..)])],
|
||||
[with_libev=search],
|
||||
[withval=no])
|
||||
|
||||
have_libev=0
|
||||
EXTENSION_LIBEV_EXT_LIBS=""
|
||||
EXTENSION_LIBEV_LIB=""
|
||||
EXTENSION_LIBEV_LDFLAGS=""
|
||||
CHECK_EV_PROG=""
|
||||
AS_IF([test x_$withval = x_no],
|
||||
[],
|
||||
[AS_IF([test x_$withval = x_yes],
|
||||
[AC_SEARCH_LIBS([ev_run],
|
||||
[ev],
|
||||
[AC_CHECK_HEADERS([ev.h],
|
||||
[have_libev=1]
|
||||
[EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"],
|
||||
[AC_CHECK_HEADERS([libev/ev.h],
|
||||
[have_libev=1]
|
||||
[EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"],
|
||||
[AC_MSG_ERROR([ev.h missing, try without libev])]
|
||||
[have_libev=0],
|
||||
[AC_INCLUDES_DEFAULT])
|
||||
],
|
||||
[AC_INCLUDES_DEFAULT])
|
||||
],
|
||||
[AC_MSG_ERROR([libev missing, try without libev])]
|
||||
)],
|
||||
[have_libev=1]
|
||||
[AC_MSG_NOTICE([assuming libev in $withval])]
|
||||
[CFLAGS="$CFLAGS -I$withval/include"]
|
||||
[EXTENSION_LIBEV_LDFLAGS="-L$withval/lib"]
|
||||
[EXTENSION_LIBEV_EXT_LIBS="-lev"])]
|
||||
)
|
||||
|
||||
AS_IF([test x_$have_libev = x_1],
|
||||
[EXTENSION_LIBEV_LIB="libgetdns_ext_ev.la"]
|
||||
[CHECK_EV_PROG=check_getdns_ev])
|
||||
|
||||
AC_SUBST(have_libev)
|
||||
AC_SUBST(EXTENSION_LIBEV_LIB)
|
||||
AC_SUBST(EXTENSION_LIBEV_EXT_LIBS)
|
||||
AC_SUBST(EXTENSION_LIBEV_LDFLAGS)
|
||||
AS_IF([test "x$have_libcheck" = x1], [AC_SUBST(CHECK_EV_PROG)])
|
||||
|
||||
LIBS="$getdns_LIBS"
|
||||
LDFLAGS="$getdns_LDFLAGS"
|
||||
# end libev extension
|
||||
|
||||
# --with-trust-anchor=
|
||||
AC_DEFINE([SYSCONFDIR], [sysconfdir], [System configuration dir])
|
||||
AC_ARG_WITH(trust-anchor, AS_HELP_STRING([--with-trust-anchor=KEYFILE], [Default location of the trust anchor file. [default=SYSCONFDIR/unbound/getdns-root.key]]), [
|
||||
TRUST_ANCHOR_FILE="$withval"
|
||||
],[
|
||||
if test "x$TRUST_ANCHOR_FILE" = "x"; then
|
||||
if test "x$sysconfdir" = 'x${prefix}/etc' ; then
|
||||
if test "x$prefix" = 'xNONE' ; then
|
||||
TRUST_ANCHOR_FILE="/etc/unbound/getdns-root.key"
|
||||
else
|
||||
TRUST_ANCHOR_FILE="${prefix}/etc/unbound/getdns-root.key"
|
||||
fi
|
||||
else
|
||||
TRUST_ANCHOR_FILE="${sysconfdir}/unbound/getdns-root.key"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
AC_DEFINE_UNQUOTED([TRUST_ANCHOR_FILE], ["$TRUST_ANCHOR_FILE"], [Default trust anchor file])
|
||||
AC_SUBST(TRUST_ANCHOR_FILE)
|
||||
AC_MSG_NOTICE([Default trust anchor: $TRUST_ANCHOR_FILE])
|
||||
|
||||
AC_CONFIG_FILES([Makefile src/Makefile src/version.c src/getdns/getdns.h src/getdns/getdns_extra.h spec/example/Makefile src/test/Makefile doc/Makefile])
|
||||
if [ test -n "$DOXYGEN" ]
|
||||
then AC_CONFIG_FILES([src/Doxyfile])
|
||||
fi
|
||||
|
||||
|
||||
dnl -----
|
||||
dnl ----- Start of "Things needed for gldns" section
|
||||
dnl -----
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_CHECK_HEADERS([stdarg.h stdint.h netinet/in.h arpa/inet.h netdb.h sys/socket.h time.h sys/time.h bsd/string.h],,, [AC_INCLUDES_DEFAULT])
|
||||
|
||||
dnl Check the printf-format attribute (if any)
|
||||
dnl result in HAVE_ATTR_FORMAT.
|
||||
dnl
|
||||
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "format" attribute)
|
||||
AC_CACHE_VAL(ac_cv_c_format_attribute,
|
||||
[ac_cv_c_format_attribute=no
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdio.h>
|
||||
void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
], [
|
||||
f ("%s", "str");
|
||||
],
|
||||
[ac_cv_c_format_attribute="yes"],
|
||||
[ac_cv_c_format_attribute="no"])
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_c_format_attribute)
|
||||
if test $ac_cv_c_format_attribute = yes; then
|
||||
AC_DEFINE(HAVE_ATTR_FORMAT, 1, [Whether the C compiler accepts the "format" attribute])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "unused" attribute)
|
||||
AC_CACHE_VAL(ac_cv_c_unused_attribute,
|
||||
[ac_cv_c_unused_attribute=no
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdio.h>
|
||||
void f (char *u __attribute__((unused)));
|
||||
], [
|
||||
f ("x");
|
||||
],
|
||||
[ac_cv_c_unused_attribute="yes"],
|
||||
[ac_cv_c_unused_attribute="no"])
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_c_unused_attribute)
|
||||
if test $ac_cv_c_unused_attribute = yes; then
|
||||
AC_DEFINE(HAVE_ATTR_UNUSED, 1, [Whether the C compiler accepts the "unused" attribute])
|
||||
fi
|
||||
AC_CHECK_DECLS([strlcpy,arc4random,arc4random_uniform])
|
||||
AC_REPLACE_FUNCS(strlcpy)
|
||||
AC_REPLACE_FUNCS(arc4random)
|
||||
AC_REPLACE_FUNCS(arc4random_uniform)
|
||||
if test "$ac_cv_func_arc4random" = "no"; then
|
||||
AC_LIBOBJ(explicit_bzero)
|
||||
AC_LIBOBJ(arc4_lock)
|
||||
AC_CHECK_FUNCS([getentropy],,[
|
||||
if test "$USE_WINSOCK" = 1; then
|
||||
AC_LIBOBJ(getentropy_win)
|
||||
else
|
||||
case `uname` in
|
||||
Darwin)
|
||||
AC_LIBOBJ(getentropy_osx)
|
||||
;;
|
||||
SunOS)
|
||||
AC_LIBOBJ(getentropy_solaris)
|
||||
AC_CHECK_HEADERS([sys/sha2.h],, [
|
||||
AC_CHECK_FUNCS([SHA512_Update],,[
|
||||
AC_LIBOBJ(sha512)
|
||||
])
|
||||
], [AC_INCLUDES_DEFAULT])
|
||||
if test "$ac_cv_header_sys_sha2_h" = "yes"; then
|
||||
# this lib needed for sha2 on solaris
|
||||
LIBS="$LIBS -lmd"
|
||||
fi
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
;;
|
||||
Linux|*)
|
||||
AC_LIBOBJ(getentropy_linux)
|
||||
dnl AC_CHECK_FUNCS([SHA512_Update],,[
|
||||
dnl AC_DEFINE([COMPAT_SHA512], [1], [Do sha512 definitions in config.h])
|
||||
dnl AC_LIBOBJ(sha512)
|
||||
dnl])
|
||||
AC_CHECK_HEADERS([sys/sysctl.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_FUNCS([getauxval])
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
||||
AC_DEFINE(USE_MINI_EVENT, 1, [Needed for sync stub resolver functions])
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
case `uname` in
|
||||
FreeBSD)
|
||||
C99COMPATFLAGS=""
|
||||
;;
|
||||
*)
|
||||
C99COMPATFLAGS="-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(C99COMPATFLAGS)
|
||||
|
||||
AH_BOTTOM([
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#else
|
||||
#define __BSD_VISIBLE 1
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM
|
||||
uint32_t arc4random(void);
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM_UNIFORM) || !HAVE_DECL_ARC4RANDOM_UNIFORM
|
||||
uint32_t arc4random_uniform(uint32_t upper_bound);
|
||||
#endif
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
void explicit_bzero(void* buf, size_t len);
|
||||
int getentropy(void* buf, size_t len);
|
||||
void arc4random_buf(void* buf, size_t n);
|
||||
void _ARC4_LOCK(void);
|
||||
void _ARC4_UNLOCK(void);
|
||||
#endif
|
||||
#ifdef COMPAT_SHA512
|
||||
#ifndef SHA512_DIGEST_LENGTH
|
||||
#define SHA512_BLOCK_LENGTH 128
|
||||
#define SHA512_DIGEST_LENGTH 64
|
||||
#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
|
||||
typedef struct _SHA512_CTX {
|
||||
uint64_t state[8];
|
||||
uint64_t bitcount[2];
|
||||
uint8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
} SHA512_CTX;
|
||||
#endif /* SHA512_DIGEST_LENGTH */
|
||||
void SHA512_Init(SHA512_CTX*);
|
||||
void SHA512_Update(SHA512_CTX*, void*, size_t);
|
||||
void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
|
||||
unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
|
||||
#endif /* COMPAT_SHA512 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Use on-board gldns */
|
||||
#define USE_GLDNS 1
|
||||
#ifdef HAVE_SSL
|
||||
# define GLDNS_BUILD_CONFIG_HAVE_SSL 1
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENSSL_SSL_H
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ATTR_FORMAT
|
||||
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
|
||||
__attribute__ ((format (archetype, string_index, first_to_check)))
|
||||
#else /* !HAVE_ATTR_FORMAT */
|
||||
# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
|
||||
#endif /* !HAVE_ATTR_FORMAT */
|
||||
|
||||
#if defined(DOXYGEN)
|
||||
# define ATTR_UNUSED(x) x
|
||||
#elif defined(__cplusplus)
|
||||
# define ATTR_UNUSED(x)
|
||||
#elif defined(HAVE_ATTR_UNUSED)
|
||||
# define ATTR_UNUSED(x) x __attribute__((unused))
|
||||
#else /* !HAVE_ATTR_UNUSED */
|
||||
# define ATTR_UNUSED(x) x
|
||||
#endif /* !HAVE_ATTR_UNUSED */
|
||||
|
||||
/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#define FD_SET_T (u_int)
|
||||
#else
|
||||
#define FD_SET_T
|
||||
#endif
|
||||
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BSD_STRING_H
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl -----
|
||||
dnl ----- End of "Things needed for gldns" section
|
||||
dnl -----
|
||||
|
||||
|
||||
AC_CONFIG_HEADER([src/config.h])
|
||||
AC_OUTPUT
|
|
@ -1,90 +0,0 @@
|
|||
#
|
||||
# @configure_input@
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the names of the copyright holders nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package = @PACKAGE_NAME@
|
||||
version = @PACKAGE_VERSION@
|
||||
tarname = @PACKAGE_TARNAME@
|
||||
distdir = $(tarname)-$(version)
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
# datarootdir is here to please some checkers
|
||||
datarootdir=@datarootdir@
|
||||
mandir = @mandir@
|
||||
INSTALL = @INSTALL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
EDITS=-e 's/@''version@/$(version)/g'
|
||||
DOXYGEN = @DOXYGEN@
|
||||
|
||||
DOCDIRS = html latex man
|
||||
MANPAGES3 = libgetdns.3 getdns_address.3 getdns_cancel_callback.3 getdns_context.3 getdns_context_set.3 getdns_context_set_context_update_callback.3 getdns_convert.3 getdns_dict.3 getdns_dict_get.3 getdns_dict_set.3 getdns_display_ip_address.3 getdns_general.3 getdns_hostname.3 getdns_list.3 getdns_list_get.3 getdns_list_set.3 getdns_pretty_print_dict.3 getdns_root_trust_anchor.3 getdns_service.3 getdns_validate_dnssec.3
|
||||
|
||||
default: all
|
||||
|
||||
all: doc
|
||||
|
||||
doc: $(MANPAGES3)
|
||||
if test x_$(DOXYGEN) != x_ ; then cd ../src; doxygen; fi
|
||||
|
||||
.SUFFIXES: .3.in .3
|
||||
.3.in.3:
|
||||
sed $(EDITS) -e "s/@date@/`date +'%B %Y'`/g" $< > $@
|
||||
|
||||
# we assume that we want a separate file for each "name" specified for each man page
|
||||
# and consider these "alternate names" simple copies of the main man page
|
||||
install: $(MANPAGES3)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man3
|
||||
for x in $(MANPAGES3); do echo $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man3; $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man3; for altpg in $$($(srcdir)/manpgaltnames $$x); do cp $$x $$altpg; echo $(INSTALL) -m 644 $$altpg $(DESTDIR)$(mandir)/man3; $(INSTALL) -m 644 $$altpg $(DESTDIR)$(mandir)/man3; done; done
|
||||
|
||||
check: $(MANPAGES3)
|
||||
for x in $(MANPAGES3); do LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $$x 2>&1 >/dev/null | awk "-vpage=$$x" '{printf("%s: ", page);print}'; if ! lexgrog $$x >/dev/null 2>&1 ; then echo $$x: manpage-has-bad-whatis-entry; fi; done
|
||||
|
||||
uninstall:
|
||||
for x in $(MANPAGES3); do echo rm -f $(DESTDIR)$(mandir)/man3/$$x; rm -f $(DESTDIR)$(mandir)/man3/$$x; for altpg in $$($(srcdir)/manpgaltnames $$x); do echo rm -f $(DESTDIR)$(mandir)/man3/$$altpg; rm -f $(DESTDIR)$(mandir)/man3/$$altpg; done; done
|
||||
|
||||
clean:
|
||||
for x in $(MANPAGES3); do rm -f $$($(srcdir)/manpgaltnames $$x); done
|
||||
rm -rf $(DOCDIRS) $(MANPAGES3)
|
||||
|
||||
distclean : clean
|
||||
rm -f Makefile config.status config.log
|
||||
rm -Rf autom4te.cache
|
||||
|
||||
Makefile: Makefile.in ../config.status
|
||||
cd .. && ./config.status $@
|
||||
|
||||
configure.status: configure
|
||||
cd .. && ./config.status --recheck
|
||||
|
||||
.PHONY: clean $(DOC)
|
|
@ -33,7 +33,7 @@
|
|||
-- get ip address(es) for a name
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
-- cancel an outstanding asyn getdns request
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
.ad n
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
@ -134,6 +134,16 @@ will be called with a callback_type of GETDNS_CALLBACK_CANCEL.
|
|||
getdns_context_destroy() returns after all of the needed cleanup is done and
|
||||
callbacks are made.
|
||||
|
||||
.LP
|
||||
If you are using getdns in a multi-threaded manner, you are then of course using
|
||||
the underlying OpenSSL library multi-threaded and the version of that library
|
||||
in use might have a requirements on this issue. You may need to provide one or
|
||||
two functions to allow it to function properly. For example before you call
|
||||
getdns_context_create() you may need to use
|
||||
the openssl functions CRYPTO_set_id_callback and CRYPTO_set_locking_callback to set up
|
||||
asynchronous operation (the application calls these functions once for initialisation).
|
||||
Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function.
|
||||
|
||||
.HP 3
|
||||
.I context
|
||||
Used to return the pointer to an opaque structure. The caller passes the address of a pointer (decl: getdns_context *context; passed as &context) which will be populated as a result of returning from the function. The result is a newly allocated and initialized context (if there are no errors). In the getdns_destroy_context function this is the context whose associated memory will be released.
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
.ad n
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
-- get informed on getdns context updates
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
-- convert dname between presentation- and wire-format
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
.ad n
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
-- get value by name from a getdns dict
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
-- set a value by name in a getdns dict
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
-- convert an getdns ip address to string
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
-- do a getdns DNS lookup
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
@ -76,7 +76,7 @@ getdns_dict **response)
|
|||
The getdns_general(3) and getdns_general_sync functions provide public entry
|
||||
points into the getdns API library to retrieve any valid responses to a query
|
||||
from the DNS (note that other namespaces in the context are not used). Most
|
||||
typical use cases for applications are probably satisifed via calls to
|
||||
typical use cases for applications are probably satisfied via calls to
|
||||
getdns_address(3) which would replace getaddrinfo(3).
|
||||
|
||||
.HP 3
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
-- get hostname by address
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
.ad n
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
-- get a value by index from a getdns list
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
-- set a value by index from a getdns list
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
-- return a string representation of a getdns dict
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
||||
getdns_list *
|
||||
char *
|
||||
.br
|
||||
.B getdns_pretty_print_dict
|
||||
(const getdns_dict *this_dict)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
-- return the getdns list of default root trust anchors
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
-- getdns lookup of a service
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
-- DNSSEC validate a given getdns record
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
#include <getdns.h>
|
||||
|
|
|
@ -32,7 +32,7 @@ libgetdns
|
|||
-- an implementation of a modern asynchronous DNS API by and for application developers
|
||||
|
||||
.SH LIBRARY
|
||||
DNS Resolver library (libgetdns, -lgetdns)
|
||||
DNS Resolver library (libgetdns, \-lgetdns)
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B libgetdns
|
||||
|
@ -230,7 +230,7 @@ Set to GETDNS_EXTENSION_TRUE to include the DNSSEC status for each DNS record in
|
|||
.HP 3
|
||||
"dnssec_return_only_secure" (int)
|
||||
|
||||
Set to GETDNS_EXTENSION_TRUE to cause only records that the API can validate as secure withe DNSSEC to be returned in the
|
||||
Set to GETDNS_EXTENSION_TRUE to cause only records that the API can validate as secure with DNSSEC to be returned in the
|
||||
.I replies_tree
|
||||
and
|
||||
.I replies_full lists
|
||||
|
@ -275,10 +275,10 @@ GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE: query type for other than CNAME re
|
|||
Set to the DNS class number (other than Internet (IN) class desired in query.
|
||||
|
||||
.HP 3
|
||||
"return_call_debugging" (int)
|
||||
"return_call_reporting" (int)
|
||||
|
||||
Set to GETDNS_EXTENSION_TRUE to add the name
|
||||
.I call_debugging
|
||||
.I call_reporting
|
||||
(list) to the top level of the response object that includes a dict for each call made to the API. TBD: more detail
|
||||
|
||||
.LP
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir_for_pc_file@
|
||||
includedir=@includedir_for_pc_file@
|
||||
|
||||
Name: getdns
|
||||
Version: @GETDNS_VERSION@
|
||||
Description: A modern asynchronous DNS library
|
||||
|
||||
Libs: -L${libdir} -lgetdns
|
||||
Cflags: -I${includedir}
|
|
@ -0,0 +1,11 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: getdns_ext_event
|
||||
Version: @GETDNS_VERSION@
|
||||
Description: A modern asynchronous DNS library
|
||||
|
||||
Libs: -L${libdir} -lgetdns_ext_event
|
||||
Cflags: -I${includedir}
|
527
install-sh
527
install-sh
|
@ -1,527 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1,164 +0,0 @@
|
|||
# Taken from acx_nlnetlabs.m4 - common macros for configure checks
|
||||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||
# BSD licensed.
|
||||
#
|
||||
dnl Add a -R to the RUNTIME_PATH. Only if rpath is enabled and it is
|
||||
dnl an absolute path.
|
||||
dnl $1: the pathname to add.
|
||||
AC_DEFUN([ACX_RUNTIME_PATH_ADD], [
|
||||
if test "x$enable_rpath" = xyes; then
|
||||
if echo "$1" | grep "^/" >/dev/null; then
|
||||
RUNTIME_PATH="$RUNTIME_PATH -R$1"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Common code for both ACX_WITH_SSL and ACX_WITH_SSL_OPTIONAL
|
||||
dnl Takes one argument; the withval checked in those 2 functions
|
||||
dnl sets up the environment for the given openssl path
|
||||
AC_DEFUN([ACX_SSL_CHECKS], [
|
||||
withval=$1
|
||||
if test x_$withval != x_no; then
|
||||
AC_MSG_CHECKING(for SSL)
|
||||
if test x_$withval = x_ -o x_$withval = x_yes; then
|
||||
withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
|
||||
fi
|
||||
for dir in $withval; do
|
||||
ssldir="$dir"
|
||||
if test -f "$dir/include/openssl/ssl.h"; then
|
||||
found_ssl="yes"
|
||||
AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.])
|
||||
dnl assume /usr/include is already in the include-path.
|
||||
if test "$ssldir" != "/usr"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$ssldir/include"
|
||||
LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
|
||||
fi
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test x_$found_ssl != x_yes; then
|
||||
AC_MSG_ERROR(Cannot find the SSL libraries in $withval)
|
||||
else
|
||||
AC_MSG_RESULT(found in $ssldir)
|
||||
HAVE_SSL=yes
|
||||
dnl assume /usr is already in the lib and dynlib paths.
|
||||
if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
|
||||
LDFLAGS="$LDFLAGS -L$ssldir/lib"
|
||||
LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
|
||||
ACX_RUNTIME_PATH_ADD([$ssldir/lib])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for HMAC_CTX_init in -lcrypto])
|
||||
LIBS="$LIBS -lcrypto -lssl"
|
||||
LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto -lssl"
|
||||
AC_TRY_LINK(, [
|
||||
int HMAC_CTX_init(void);
|
||||
(void)HMAC_CTX_init();
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_HMAC_CTX_INIT], 1,
|
||||
[If you have HMAC_CTX_init])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
# check if -lwsock32 or -lgdi32 are needed.
|
||||
BAKLIBS="$LIBS"
|
||||
BAKSSLLIBS="$LIBSSL_LIBS"
|
||||
LIBS="$LIBS -lgdi32"
|
||||
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
|
||||
AC_MSG_CHECKING([if -lcrypto needs -lgdi32])
|
||||
AC_TRY_LINK([], [
|
||||
int HMAC_CTX_init(void);
|
||||
(void)HMAC_CTX_init();
|
||||
],[
|
||||
AC_DEFINE([HAVE_HMAC_CTX_INIT], 1,
|
||||
[If you have HMAC_CTX_init])
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
LIBS="$BAKLIBS"
|
||||
LIBSSL_LIBS="$BAKSSLLIBS"
|
||||
LIBS="$LIBS -ldl"
|
||||
LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
|
||||
AC_MSG_CHECKING([if -lcrypto needs -ldl])
|
||||
AC_TRY_LINK([], [
|
||||
int HMAC_CTX_init(void);
|
||||
(void)HMAC_CTX_init();
|
||||
],[
|
||||
AC_DEFINE([HAVE_HMAC_CTX_INIT], 1,
|
||||
[If you have HMAC_CTX_init])
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
|
||||
])
|
||||
])
|
||||
])
|
||||
fi
|
||||
AC_SUBST(HAVE_SSL)
|
||||
AC_SUBST(RUNTIME_PATH)
|
||||
# openssl engine functionality needs dlopen().
|
||||
BAKLIBS="$LIBS"
|
||||
AC_SEARCH_LIBS([dlopen], [dl])
|
||||
if test "$LIBS" != "$BAKLIBS"; then
|
||||
LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_HEADERS([openssl/ssl.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_LIB(ssl, TLSv1_2_client_method,AC_DEFINE([HAVE_LIBTLS1_2], [1],
|
||||
[Define if you have libssl with tls 1.2]),[AC_MSG_WARN([Cannot find TLSv1_2_client_method in libssl library. TLS will not be available.])])
|
||||
])dnl End of ACX_SSL_CHECKS
|
||||
|
||||
dnl Check for SSL, where SSL is mandatory
|
||||
dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found
|
||||
dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS.
|
||||
dnl Checks main header files of SSL.
|
||||
dnl
|
||||
AC_DEFUN([ACX_WITH_SSL],
|
||||
[
|
||||
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
|
||||
[enable SSL (will check /usr/local/ssl
|
||||
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[
|
||||
],[
|
||||
withval="yes"
|
||||
])
|
||||
if test x_$withval = x_no; then
|
||||
AC_MSG_ERROR([Need SSL library to do digital signature cryptography])
|
||||
fi
|
||||
ACX_SSL_CHECKS($withval)
|
||||
])dnl End of ACX_WITH_SSL
|
||||
|
||||
dnl Check for SSL, where ssl is optional (--without-ssl is allowed)
|
||||
dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found
|
||||
dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS.
|
||||
dnl Checks main header files of SSL.
|
||||
dnl
|
||||
AC_DEFUN([ACX_WITH_SSL_OPTIONAL],
|
||||
[
|
||||
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
|
||||
[enable SSL (will check /usr/local/ssl
|
||||
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[
|
||||
],[
|
||||
withval="yes"
|
||||
])
|
||||
ACX_SSL_CHECKS($withval)
|
||||
])dnl End of ACX_WITH_SSL_OPTIONAL
|
||||
|
||||
dnl Setup to use -lssl
|
||||
dnl To use -lcrypto, use the ACX_WITH_SSL setup (before this one).
|
||||
AC_DEFUN([ACX_LIB_SSL],
|
||||
[
|
||||
# check if libssl needs libdl
|
||||
BAKLIBS="$LIBS"
|
||||
LIBS="-lssl $LIBS"
|
||||
AC_MSG_CHECKING([if libssl needs libdl])
|
||||
AC_TRY_LINK_FUNC([SSL_CTX_new], [
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS="$BAKLIBS"
|
||||
] , [
|
||||
AC_MSG_RESULT([yes])
|
||||
LIBS="$BAKLIBS"
|
||||
AC_SEARCH_LIBS([dlopen], [dl])
|
||||
]) ])dnl End of ACX_LIB_SSL
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 3
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
File diff suppressed because it is too large
Load Diff
|
@ -1,437 +0,0 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -1,124 +0,0 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -1,23 +0,0 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -1,99 +0,0 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
214
m4/pkg.m4
214
m4/pkg.m4
|
@ -1,214 +0,0 @@
|
|||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 1 (pkg-config-0.24)
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
# only at the first occurence in configure.ac, so if the first place
|
||||
# it's called might be skipped (such as if it is within an "if", you
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
|
||||
|
||||
# PKG_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable pkgconfigdir as the location where a module
|
||||
# should install pkg-config .pc files. By default the directory is
|
||||
# $libdir/pkgconfig, but the default can be changed by passing
|
||||
# DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
# parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
# module should install arch-independent pkg-config .pc files. By
|
||||
# default the directory is $datadir/pkgconfig, but the default can be
|
||||
# changed by passing DIRECTORY. The user can override through the
|
||||
# --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# -------------------------------------------
|
||||
# Retrieves the value of the pkg-config variable for the given module.
|
||||
AC_DEFUN([PKG_CHECK_VAR],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||
|
||||
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])# PKG_CHECK_VAR
|
|
@ -13,10 +13,10 @@ Recursive Resolver Cache
|
|||
Caching is arguably an important feature for most recursive resolvers.
|
||||
In this case we are not intending a replacement for the fully
|
||||
functional recursive resolvers already available (BIND, Unbound, etc.)
|
||||
so we shoudl limit a cache implementation to behaviors important to
|
||||
so we should limit a cache implementation to behaviors important to
|
||||
proper operation of a recursive resolver.
|
||||
|
||||
DNSSEC validation can potentially triggers more queries than a simple
|
||||
DNSSEC validation can potentially trigger more queries than a simple
|
||||
request for a A RR so I think it makes sense to cache root and TLD
|
||||
data. Once we have gone that far it isn't much of a reach to cache
|
||||
at each layer in the hierarchy (depth will not increase the coding
|
||||
|
@ -53,9 +53,9 @@ Local configuration via API or local file (e.g. /etc/getdns.conf, ~/.getdnsrc)
|
|||
- max TTL/TTL override (separate for pos/neg cache entries)
|
||||
- inclusions (use cache for specified domains) (maybe over-eng)
|
||||
- exceptions (avoid ache for specified domains) (maybe over-eng)
|
||||
- persistant vs. transitory cache
|
||||
- persistent vs. transitory cache
|
||||
|
||||
- cache data store via Berkely db to allow for persistance
|
||||
- cache data store via Berkely db to allow for persistence
|
||||
|
||||
- negative cache TTL derived from SOA
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
pkg update
|
||||
pkg upgrade
|
||||
pkg install -y gawk unbound valgrind bash check cmake git libyaml libevent libuv
|
||||
git clone git@github.com:getdnsapi/getdns.git
|
||||
cd getdns/
|
||||
git checkout remotes/origin/release/1.6.0-beta.1
|
||||
mkdir test
|
||||
cd test/
|
||||
../src/test/tpkg/run-all.sh
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ ! -f git-archive-all.sh ] && wget "https://raw.githubusercontent.com/meitar/git-archive-all.sh/master/git-archive-all.sh"
|
||||
[ ! -x git-archive-all.sh ] && chmod +x git-archive-all.sh
|
||||
[ ! -f git-archive-all.sh ] && exit 1
|
||||
GIT_ARCHIVE="`pwd`/git-archive-all.sh"
|
||||
git submodule update --init
|
||||
GIT_ROOT=`git rev-parse --show-toplevel`
|
||||
version=`awk '/^set\(PACKAGE_VERSION/{V=$2}
|
||||
/^set\(RELEASE_CANDIDATE/{RC=$2}
|
||||
END{print V""RC}' "$GIT_ROOT/CMakeLists.txt" | sed 's/[")]//g'`
|
||||
output_file="getdns-${version}.tar.gz"
|
||||
( cd "$GIT_ROOT" \
|
||||
&& "$GIT_ARCHIVE" --prefix "getdns-$version/" --format tar.gz \
|
||||
--worktree-attributes -- - ) > "$output_file"
|
||||
openssl md5 "$output_file" > "${output_file}.md5"
|
||||
openssl sha1 "$output_file" > "${output_file}.sha1"
|
||||
openssl sha256 "$output_file" > "${output_file}.sha256"
|
||||
gpg --armor --detach-sig "$output_file"
|
||||
[ -f "$output_file" -a -f "${output_file}.md5" -a -f "${output_file}.sha1" -a -f "${output_file}.sha256" -a -f "${output_file}.asc" ] \
|
||||
&& rm git-archive-all.sh
|
|
@ -0,0 +1,20 @@
|
|||
Some notes about packages and maintainers.
|
||||
|
||||
For Homebrew, created and maintained by ilovezfs
|
||||
https://github.com/Homebrew/homebrew-core/Formula/getdns.rb
|
||||
https://github.com/Homebrew/homebrew-core/Formula/stubby.rb
|
||||
|
||||
For Arch, created and maintained by Bruno Pagani (ArchangeGabriel)
|
||||
|
||||
For OpenWRT, created and maintained by David Mora (iamperson347)
|
||||
https://github.com/openwrt/packages/tree/master/libs/getdns
|
||||
https://github.com/openwrt/packages/tree/master/net/stubby
|
||||
|
||||
For AstLinux Project, created and maintained by Lonnie Abelbeck (abelbeck)
|
||||
https://github.com/astlinux-project/astlinux/tree/master/package/getdns
|
||||
|
||||
For Genode, created and maintained by Emery Hemingway (ehmry)
|
||||
https://github.com/genodelabs/genode/blob/master/repos/ports/ports/getdns.port
|
||||
|
||||
For Gentoo, created and maintained by CaseOf (Quentin R.?)
|
||||
https://packages.gentoo.org/packages/net-dns/getdns
|
|
@ -1,168 +1,93 @@
|
|||
High level release procedure that we follow to make a formal release for the
|
||||
getdns API project. This is a recipe - if you have a better way to do it then
|
||||
update this document and share it with us.
|
||||
High level release procedure for formal release for the getdns API project.
|
||||
|
||||
- code freeze
|
||||
confirm with core team that all commits are in, from this point forward
|
||||
only bug fixes should be committed to the release branch, once the release
|
||||
is cut nothing should be committed to the release branch (make a new release)
|
||||
1) Git branching for a release
|
||||
-- Confirm with core team (preferably via email) that all commits to be included
|
||||
in the release are in the develop branch. Development for the next release can
|
||||
continue on develop.
|
||||
-- Create a release branch. We use the pattern "release/v1.0.0-b3" for naming
|
||||
release branches. This branch is used for testing
|
||||
and bug fixing while preparing the release (which can take several days
|
||||
if there are un-foreseen issues). Note that from this point forward _only_
|
||||
bug fixes for this release should be committed to the release branch.
|
||||
-- Once the release is published there should be no further commits on that
|
||||
release branch.
|
||||
|
||||
- create a release branch
|
||||
in git repository named for the release, e.g. "v0.1.2"
|
||||
we do this because folks may want to continue to work in the master branch
|
||||
and be free to commit changes without injuring the release process. Since
|
||||
building and testing binaries for a release takes a few days we don't want to
|
||||
force changes to queue up.
|
||||
2) Prepare the release
|
||||
-- Clone the upstream to a _new_ local directory. (Do NOT re-use and
|
||||
existing working copy as this can lead to issues).
|
||||
|
||||
One might argue that a release can be cut more quickly, however there are
|
||||
inevitably little tweaks that need to be made that get uncovered as a result
|
||||
of the binary builds - these tweaks need to be included in the souces for
|
||||
this release so building the source tarball can't be done until all of the
|
||||
binaries have been built and tested.
|
||||
# git clone -b v1.0.0-b3 https://github.com/getdnsapi/getdns.git getdns-1.0.0-b3
|
||||
|
||||
- clone repo release branch to a clean local repo
|
||||
this should be a brand spanking new directory - don't try to shortcut it and
|
||||
use a working directory with lots of cruft - crap will find its way into the
|
||||
release and embarass you:
|
||||
-- Update several files to reflect release number/date
|
||||
./README.md
|
||||
./ChangeLog
|
||||
./configure.ac
|
||||
- Check and change the values for:
|
||||
- AC_INIT
|
||||
- RELEASE_CANDIDATE
|
||||
- GETDNS_NUMERIC_VERSION
|
||||
- API_VERSION and API_NUMERUC_VERSION
|
||||
- read the section "Library version" and update GETDNS_LIBVERSION carefully!
|
||||
|
||||
# git clone -b v0.1.2 https://github.com/getdnsapi/getdns.git getdns-0.1.2
|
||||
# autoreconf -fi
|
||||
|
||||
- update files to reflect release number/date
|
||||
./README.md
|
||||
./ChangeLog
|
||||
./configure.ac (AC_INIT)
|
||||
./src/Makefile.in (-version-info, follow libtool guidelines)
|
||||
Commit these changes to the release branch
|
||||
|
||||
# make clean
|
||||
# autoreconf
|
||||
# git commit -a -m "release number and date updates"
|
||||
# git push
|
||||
|
||||
commit these changes to the release branch
|
||||
3) Test
|
||||
The unit and tpkg tests should be run on all the supported platforms. They must all
|
||||
be able to fulfil all requirements. So they must have libidn, libev, libuv, libevent,
|
||||
latest libunbound, latest openssl (at least 1.0.2) latest clang compiler
|
||||
(for static analysis), latest valgrind. The tests can be run using:
|
||||
|
||||
# git commit -a -m "release number and date updates"
|
||||
# git push
|
||||
# ${GETDNS_SRCDIR}/src/test/tpkg/run-all.sh
|
||||
|
||||
- prepare to build binaries for each target platform
|
||||
you need to remove libs and headers that might be lingering from previous builds
|
||||
to avoid accidentally including the wrong headers or linking the wrong libs
|
||||
and evaluating the results.
|
||||
|
||||
- create clean local repo
|
||||
|
||||
- build source distribution tar
|
||||
4) Build and sign source distribution tarball
|
||||
# rm -fr *
|
||||
# git reset --hard
|
||||
# git submodule update --init
|
||||
# autoreconf -fi
|
||||
# libtoolize -ci
|
||||
# ./configure
|
||||
# make dist
|
||||
# openssl sha1 getdns-0.1.2.tar.gz > getdns-0.1.2.tar.gz.sha1
|
||||
# openssl md5 getdns-0.1.2.tar.gz > getdns-0.1.2.tar.gz.md5
|
||||
# gpg --armor --detach-sig --default-key gwiley@verisign.com getdns-0.1.2.tar.gz
|
||||
# make pub
|
||||
|
||||
- test the resulting tar by building it and running the regression tests
|
||||
The resulting tarball must be built, installed and tested on all the supported
|
||||
platforms. Be sure to use a user that was NOT used for the build, this will uncover
|
||||
any issues related to absolute paths in the build
|
||||
|
||||
- build CentOS binary
|
||||
# tar -xzvf getdns-0.1.2.tar.gz
|
||||
# cd getdns-0.1.2
|
||||
# ./configure --with-libevent --prefix=$HOME/build
|
||||
# make
|
||||
# make install
|
||||
# cd ~/build
|
||||
- fix the libdir path in the *.la files to point to /usr/local/lib
|
||||
- fix the dependency_libs entry in the *.la files to point to /usr/local/lib
|
||||
# fpm -x "*.la" -a native -s dir --rpm-sign -t rpm -n getdns -v 0.1.2 -d "unbound" -d "ldns" -d "libevent" -d "libidn" --prefix /usr/local --vendor "Verisign Inc., NLnet Labs" --license "BSD New" --url "http://www.getdnsapi.net" --description "Modern asynchronous API to the DNS" .
|
||||
- make sure your signing key is in the keyring on the build machine
|
||||
- contents of ~/.rpmmacros
|
||||
%_signature gpg
|
||||
%_gpg_path /root/.gnupg
|
||||
%_gpg_name A6B73532
|
||||
%_gpgbin /usr/bin/gpg
|
||||
5) Fix any problems
|
||||
-- If a build breaks or an install fails then commit fixes to the release branch.
|
||||
Then re-run steps 3 and 4 for all supported platforms using the new code.
|
||||
|
||||
- name the rpm and checksum files something like this:
|
||||
getdns-0.1.3-1.CentOS_6_5.x86_64.rpm
|
||||
getdns-0.1.3-1.CentOS_6_5.x86_64.rpm.sha1
|
||||
getdns-0.1.3-1.CentOS_6_5.x86_64.rpm.md5
|
||||
- check the signature
|
||||
- install
|
||||
- test
|
||||
6) Merge branch changes back into master/develop
|
||||
-- If this is a production release - then the release branch must be merged into master
|
||||
Sign the merge tag if possible.
|
||||
-- Now the release is ready, all the relevant commits on the release branch
|
||||
should also be merged back into develop.
|
||||
|
||||
- build OSX binary disk image
|
||||
7) Create the tarball
|
||||
# make clean
|
||||
# make pub
|
||||
This generates getdns-1.0.0-b3.tar.gz + checksums + signatures.
|
||||
|
||||
- build code (no additional libraries, note that regression tests will not build)
|
||||
if you are building a simple binary tar then something like this works
|
||||
# ./configure --prefix=/Users/gwiley/getdnsox/export
|
||||
# make
|
||||
# make install
|
||||
# tar -C /Users/gwiley/getdnsosx/export -cvf getdns-0.1.2.tar *
|
||||
8) Upload source tarball and checksums and signatures to the getdnsapi.net site
|
||||
|
||||
- build code (with libevent)
|
||||
# ./configure --with-libevent2
|
||||
# scp getdns-1.0.0-b3.tar.gz* getdnsapi.net:/usr/local/www/apache24/data/dist
|
||||
|
||||
- run regression tests and verify that alls well
|
||||
9) Create and push signed tags to github
|
||||
|
||||
if you have do do anything even mildly interesting to get the build or install to
|
||||
work then we either have to add it to the README.md or, preferably, fix it
|
||||
and update the branch
|
||||
# git -s v1.0.0-b3
|
||||
# git push --tags
|
||||
|
||||
Be careful about tool sets loaded on your build hosts. You may have 'solved'
|
||||
problems while you are working that mask issues with the build for more typical
|
||||
users - this is why we want to build on hosts that are representative of
|
||||
our users.
|
||||
10) Update getdnsapi.net web site
|
||||
- Create an entry the the 'Checksum' page using the content of ChangeLog
|
||||
- Create a new 'News' entry
|
||||
|
||||
- install on each target platform
|
||||
- make sure and use a user that was NOT used for the build, this will uncover
|
||||
any silliness related to absolute paths in the build
|
||||
|
||||
- if a build breaks or an install fails then commit fixes to the relase branch
|
||||
- rebuild EVERY binary using the changed release branch
|
||||
|
||||
- merge branch changes back into master
|
||||
|
||||
- once all binaries are built and tested clean, create source tar ball
|
||||
and the actual package for each platform
|
||||
|
||||
you may need to run this as root to permit the chown
|
||||
# make clean
|
||||
# make dist
|
||||
generates getdns-0.1.2.tar.gz
|
||||
|
||||
- sign each binary/source tar using one or more developers keys
|
||||
- make sure that the keys you use to sign the release are also up to date
|
||||
on the getdnsapi.net site
|
||||
|
||||
- generate checksums for each binary/source tar
|
||||
|
||||
- upload source and binaries to the getdnsapi.net site
|
||||
|
||||
- create a release in the github repository
|
||||
- from the main repo choose 'releases'
|
||||
- choose 'Draft a new release'
|
||||
- use tag v0.x.y to match the branch being released
|
||||
- for a release name use v0.x.y
|
||||
- for description cut/paste the ChangeLog entry
|
||||
- check the 'pre-release' checkbox (unless this is a production release)
|
||||
|
||||
- update getdnsapi.net web site
|
||||
- push binaries to getdnsapi.net
|
||||
/usr/local/www/apache24/data/dist
|
||||
- news entry for the release
|
||||
/usr/local/www/apache24/data/news.html
|
||||
- download links and checksums
|
||||
/usr/local/www/apache24/data/frontpage.html
|
||||
- rebuild website
|
||||
# ./build.sh
|
||||
|
||||
- announce message to
|
||||
getdns mailing list
|
||||
stub-resolvers mailing list
|
||||
Verisign internal via the matrix
|
||||
|
||||
- update the
|
||||
11) Announce the release to the lists (make sure to sign the emails)
|
||||
users@getdnsapi.net, spec@getdnsapi.net and maintainers@nlnetlabs.nl
|
||||
|
||||
|
||||
List of Build Targets
|
||||
---------------------
|
||||
The naming conventions for each of these build products are specific to the
|
||||
platform they target. The result is that the naming seems a little inconsistent,
|
||||
however I felt that it is best to follow naming standards for the platform rather
|
||||
than try to impose a project specific standard across platforms.
|
||||
|
||||
- source tar: getdns-0.1.2.tar.gz
|
||||
- OSX binary package: getdns-0.1.2-OSX_10_8.dmg
|
||||
- RHEL/CentOS: getdns-0.1.0-1.CentOS_6_5.x86_64.rpm
|
||||
- Debian/Ubuntu:
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
#
|
||||
# @configure_input@
|
||||
#
|
||||
# Copyright (c) 2013, Verisign, Inc., NLNet Labs
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the names of the copyright holders nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package = @PACKAGE_NAME@
|
||||
version = @PACKAGE_VERSION@
|
||||
tarname = @PACKAGE_TARNAME@
|
||||
distdir = $(tarname)-$(version)
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
LIBTOOL = ../../libtool
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
||||
EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@
|
||||
EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@
|
||||
EXTENSION_LIBEVENT_LIB=../../src/libgetdns_ext_event.la
|
||||
|
||||
CC=@CC@
|
||||
CFLAGS=-I$(srcdir) -I$(srcdir)/../../src -I../../src @CFLAGS@
|
||||
LDFLAGS=@LDFLAGS@ -L../../src
|
||||
LDLIBS=../../src/libgetdns.la @LIBS@
|
||||
|
||||
|
||||
OBJS=example-all-functions.lo example-simple-answers.lo example-tree.lo example-synchronous.lo example-reverse.lo
|
||||
|
||||
PROGRAMS=example-all-functions example-synchronous example-simple-answers example-tree example-reverse
|
||||
|
||||
.SUFFIXES: .c .o .a .lo .h
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
default: all
|
||||
example: all
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
$(OBJS):
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@
|
||||
|
||||
example-all-functions: example-all-functions.lo
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ example-all-functions.lo
|
||||
|
||||
example-synchronous: example-synchronous.lo
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ example-synchronous.lo
|
||||
|
||||
$(EXTENSION_LIBEVENT_LIB):
|
||||
@echo "***"
|
||||
@echo "*** Three examples from the specification need libevent."
|
||||
@echo "*** libevent was not found or usable at configure time."
|
||||
@echo "*** To compile and run all examples from the spec, make sure"
|
||||
@echo "*** libevent is available and usable during configuration."
|
||||
@echo "***"
|
||||
@false
|
||||
|
||||
example-simple-answers: example-simple-answers.lo $(EXTENSION_LIBEVENT_LIB)
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-simple-answers.lo
|
||||
|
||||
example-tree: example-tree.lo $(EXTENSION_LIBEVENT_LIB)
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-tree.lo
|
||||
|
||||
example-reverse: example-reverse.lo $(EXTENSION_LIBEVENT_LIB)
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-reverse.lo
|
||||
|
||||
clean:
|
||||
rm -f *.o *.lo $(PROGRAMS)
|
||||
rm -rf .libs
|
||||
|
||||
distclean : clean
|
||||
rm -f Makefile config.status config.log
|
||||
rm -Rf autom4te.cache
|
||||
|
||||
$(distdir): FORCE
|
||||
mkdir -p $(distdir)/src
|
||||
cp configure.ac $(distdir)
|
||||
cp configure $(distdir)
|
||||
cp Makefile.in $(distdir)
|
||||
cp src/Makefile.in $(distdir)/src
|
||||
|
||||
distcheck: $(distdir).tar.gz
|
||||
gzip -cd $(distdir).tar.gz | tar xvf -
|
||||
cd $(distdir) && ./configure
|
||||
cd $(distdir) && $(MAKE) all
|
||||
cd $(distdir) && $(MAKE) check
|
||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
||||
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
||||
if test "$${remaining}" -ne 0; then
|
||||
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
||||
exit 1; \
|
||||
fi
|
||||
cd $(distdir) && $(MAKE) clean
|
||||
rm -rf $(distdir)
|
||||
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in ../../config.status
|
||||
cd ../.. && ./config.status spec/example/Makefile
|
||||
|
||||
configure.status: configure
|
||||
cd ../.. && ./config.status --recheck
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
depend:
|
||||
(cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new )
|
||||
(cd $(srcdir) ; gcc -MM -I. -I../../src *.c | \
|
||||
sed -e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \
|
||||
-e 's? \$$(srcdir)/config\.h? ../../src/config.h?g' \
|
||||
-e 's? \.\./\.\./src/getdns/getdns_extra\.h? $$(srcdir)/../../src/getdns/getdns_extra.h?g' \
|
||||
-e 's? \.\./\.\./src/getdns/getdns_ext_libevent\.h? $$(srcdir)/../../src/getdns/getdns_ext_libevent.h?g' \
|
||||
-e 's? \.\./\.\./src/getdns/getdns_ext_libev\.h? $$(srcdir)/../../src/getdns/getdns_ext_libev.h?g' \
|
||||
-e 's? \.\./\.\./src/getdns/getdns_ext_libuv\.h? $$(srcdir)/../../src/getdns/getdns_ext_libuv.h?g' \
|
||||
-e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new )
|
||||
(cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \
|
||||
|| mv Makefile.in.new Makefile.in )
|
||||
|
||||
|
||||
# Dependencies for the examples
|
||||
example-all-functions.lo example-all-functions.o: $(srcdir)/example-all-functions.c $(srcdir)/getdns_libevent.h \
|
||||
../../src/getdns/getdns.h $(srcdir)/../../src/getdns/getdns_ext_libevent.h \
|
||||
$(srcdir)/../../src/getdns/getdns_extra.h
|
||||
example-reverse.lo example-reverse.o: $(srcdir)/example-reverse.c $(srcdir)/getdns_libevent.h \
|
||||
../../src/getdns/getdns.h $(srcdir)/../../src/getdns/getdns_ext_libevent.h \
|
||||
$(srcdir)/../../src/getdns/getdns_extra.h
|
||||
example-simple-answers.lo example-simple-answers.o: $(srcdir)/example-simple-answers.c $(srcdir)/getdns_libevent.h \
|
||||
../../src/getdns/getdns.h $(srcdir)/../../src/getdns/getdns_ext_libevent.h \
|
||||
$(srcdir)/../../src/getdns/getdns_extra.h
|
||||
example-synchronous.lo example-synchronous.o: $(srcdir)/example-synchronous.c $(srcdir)/getdns_core_only.h \
|
||||
../../src/getdns/getdns.h
|
||||
example-tree.lo example-tree.o: $(srcdir)/example-tree.c $(srcdir)/getdns_libevent.h \
|
||||
../../src/getdns/getdns.h $(srcdir)/../../src/getdns/getdns_ext_libevent.h \
|
||||
$(srcdir)/../../src/getdns/getdns_extra.h
|
|
@ -1,135 +1,112 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <getdns_libevent.h>
|
||||
|
||||
#define UNUSED_PARAM(x) ((void)(x))
|
||||
|
||||
/* Set up the callback function, which will also do the processing of the results */
|
||||
void this_callbackfn(getdns_context *this_context,
|
||||
getdns_callback_type_t this_callback_type,
|
||||
getdns_dict *this_response,
|
||||
void *this_userarg,
|
||||
getdns_transaction_t this_transaction_id)
|
||||
void callback(getdns_context *context,
|
||||
getdns_callback_type_t callback_type,
|
||||
getdns_dict *response,
|
||||
void *userarg,
|
||||
getdns_transaction_t transaction_id)
|
||||
{
|
||||
getdns_return_t this_ret; /* Holder for all function returns */
|
||||
UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */
|
||||
UNUSED_PARAM(this_context); /* Not looking at the context for this example */
|
||||
UNUSED_PARAM(this_ret); /* Set, but not read */
|
||||
if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */
|
||||
{
|
||||
/* Be sure the search returned something */
|
||||
uint32_t this_error;
|
||||
this_ret = getdns_dict_get_int(this_response, "status", &this_error); // Ignore any error
|
||||
if (this_error != GETDNS_RESPSTATUS_GOOD) // If the search didn't return "good"
|
||||
{
|
||||
fprintf(stderr, "The search had no results, and a return value of %d. Exiting.\n", this_error);
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
getdns_list *replies_tree;
|
||||
this_ret = getdns_dict_get_list(this_response, "replies_tree", &replies_tree); // Ignore any error
|
||||
size_t num_replies;
|
||||
this_ret = getdns_list_get_length(replies_tree, &num_replies); // Ignore any error
|
||||
/* Go through each reply */
|
||||
for ( size_t reply_count = 0; reply_count < num_replies; ++reply_count)
|
||||
{
|
||||
getdns_dict * this_reply;
|
||||
this_ret = getdns_list_get_dict(replies_tree, reply_count, &this_reply); // Ignore any error
|
||||
/* Just print the address */
|
||||
getdns_list* reply_answers;
|
||||
this_ret = getdns_dict_get_list(this_reply, "answer", &reply_answers); // Ignore any error
|
||||
size_t num_answers;
|
||||
this_ret = getdns_list_get_length(reply_answers, &num_answers); // Ignore any error
|
||||
/* Go through each answer */
|
||||
for ( size_t answer_count = 0; answer_count < num_answers; ++answer_count)
|
||||
{
|
||||
getdns_dict * this_rr;
|
||||
this_ret = getdns_list_get_dict(reply_answers, answer_count, &this_rr);
|
||||
/* Get the RDATA type */
|
||||
uint32_t this_type;
|
||||
this_ret = getdns_dict_get_int(this_rr, "type", &this_type); // Ignore any error
|
||||
if (this_type == GETDNS_RRTYPE_PTR)
|
||||
{
|
||||
getdns_dict *this_rdata;
|
||||
this_ret = getdns_dict_get_dict(this_rr, "rdata", &this_rdata); // Ignore any error
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
getdns_list *answer;
|
||||
size_t n_answers, i;
|
||||
|
||||
getdns_bindata * this_dname;
|
||||
this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname);
|
||||
char *this_dname_str;
|
||||
this_ret = getdns_convert_dns_name_to_fqdn(this_dname, &this_dname_str); // Ignore any error
|
||||
printf("The dname is %s\n", this_dname_str);
|
||||
free(this_dname_str);
|
||||
}
|
||||
}
|
||||
(void) context; (void) userarg; /* unused parameters */
|
||||
|
||||
switch(callback_type) {
|
||||
case GETDNS_CALLBACK_CANCEL:
|
||||
printf("Transaction with ID %"PRIu64" was cancelled.\n", transaction_id);
|
||||
return;
|
||||
case GETDNS_CALLBACK_TIMEOUT:
|
||||
printf("Transaction with ID %"PRIu64" timed out.\n", transaction_id);
|
||||
return;
|
||||
case GETDNS_CALLBACK_ERROR:
|
||||
printf("An error occurred for transaction ID %"PRIu64".\n", transaction_id);
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
assert( callback_type == GETDNS_CALLBACK_COMPLETE );
|
||||
|
||||
if ((r = getdns_dict_get_list(response, "/replies_tree/0/answer", &answer)))
|
||||
fprintf(stderr, "Could not get \"answer\" section from first reply in the response");
|
||||
|
||||
else if ((r = getdns_list_get_length(answer, &n_answers)))
|
||||
fprintf(stderr, "Could not get replies_tree\'s length");
|
||||
|
||||
else for (i = 0; i < n_answers && r == GETDNS_RETURN_GOOD; i++) {
|
||||
getdns_dict *rr;
|
||||
getdns_bindata *dname;
|
||||
char *dname_str;
|
||||
|
||||
if ((r = getdns_list_get_dict(answer, i, &rr)))
|
||||
fprintf(stderr, "Could not get rr %zu from answer section", i);
|
||||
|
||||
else if (getdns_dict_get_bindata(rr, "/rdata/ptrdname", &dname))
|
||||
continue; /* Not a PTR */
|
||||
|
||||
else if ((r = getdns_convert_dns_name_to_fqdn(dname, &dname_str)))
|
||||
fprintf(stderr, "Could not convert PTR dname to string");
|
||||
|
||||
else {
|
||||
printf("The dname is %s\n", dname_str);
|
||||
free(dname_str);
|
||||
}
|
||||
}
|
||||
else if (this_callback_type == GETDNS_CALLBACK_CANCEL)
|
||||
fprintf(stderr, "The callback with ID %"PRIu64" was cancelled. Exiting.", this_transaction_id);
|
||||
else
|
||||
fprintf(stderr, "The callback got a callback_type of %d. Exiting.", this_callback_type);
|
||||
getdns_dict_destroy(this_response);
|
||||
if (r) {
|
||||
assert( r != GETDNS_RETURN_GOOD );
|
||||
fprintf(stderr, ": %d\n", r);
|
||||
}
|
||||
getdns_dict_destroy(response);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
/* Create the DNS context for this call */
|
||||
getdns_context *this_context = NULL;
|
||||
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
|
||||
if (context_create_return != GETDNS_RETURN_GOOD)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the context failed: %d", context_create_return);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
/* Create an event base and put it in the context using the unknown function name */
|
||||
struct event_base *this_event_base;
|
||||
this_event_base = event_base_new();
|
||||
if (this_event_base == NULL)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the event base failed.");
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
(void)getdns_extension_set_libevent_base(this_context, this_event_base);
|
||||
/* Set up the getdns call */
|
||||
getdns_dict * this_addr_to_look_up = getdns_dict_create();
|
||||
// TODO: check the return value above
|
||||
getdns_bindata this_type = { 4, (void *)"IPv4" };
|
||||
getdns_return_t this_ret = getdns_dict_set_bindata(this_addr_to_look_up, "address_type", &this_type);
|
||||
UNUSED_PARAM(this_ret);
|
||||
getdns_bindata this_ipv4_addr = { 4, (void *)"\x08\x08\x08\x08" };
|
||||
this_ret = getdns_dict_set_bindata(this_addr_to_look_up, "address_data", &this_ipv4_addr);
|
||||
char* this_userarg = "somestring"; // Could add things here to help identify this call
|
||||
getdns_transaction_t this_transaction_id = 0;
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
getdns_context *context = NULL;
|
||||
struct event_base *event_base = NULL;
|
||||
getdns_bindata address_type = { 4, (void *)"IPv4" };
|
||||
getdns_bindata address_data = { 4, (void *)"\x08\x08\x08\x08" };
|
||||
getdns_dict *address = NULL;
|
||||
getdns_dict *extensions = NULL;
|
||||
/* Could add things here to help identify this call */
|
||||
char *userarg = NULL;
|
||||
getdns_transaction_t transaction_id;
|
||||
|
||||
/* Make the call */
|
||||
getdns_return_t dns_request_return = getdns_hostname(this_context, this_addr_to_look_up,
|
||||
NULL, this_userarg, &this_transaction_id, this_callbackfn);
|
||||
if (dns_request_return == GETDNS_RETURN_BAD_DOMAIN_NAME)
|
||||
{
|
||||
char *ip_address_str = getdns_display_ip_address(&this_ipv4_addr);
|
||||
if ((r = getdns_context_create(&context, 1)))
|
||||
fprintf(stderr, "Trying to create the context failed");
|
||||
|
||||
else if (!(event_base = event_base_new()))
|
||||
fprintf(stderr, "Trying to create the event base failed.\n");
|
||||
|
||||
else if ((r = getdns_extension_set_libevent_base(context, event_base)))
|
||||
fprintf(stderr, "Setting the event base failed");
|
||||
|
||||
else if (!(address = getdns_dict_create()))
|
||||
fprintf(stderr, "Could not create address dict.\n");
|
||||
|
||||
else if ((r = getdns_dict_set_bindata(address, "address_type", &address_type)))
|
||||
fprintf(stderr, "Could not set address_type in address dict.\n");
|
||||
|
||||
else if ((r = getdns_dict_set_bindata(address, "address_data", &address_data)))
|
||||
fprintf(stderr, "Could not set address_data in address dict.\n");
|
||||
|
||||
else if ((r = getdns_hostname( context, address, extensions
|
||||
, userarg, &transaction_id, callback)))
|
||||
fprintf(stderr, "Error scheduling asynchronous request");
|
||||
|
||||
else if (event_base_dispatch(event_base) < 0)
|
||||
fprintf(stderr, "Error dispatching events\n");
|
||||
|
||||
fprintf(stderr, "A bad IP address was used: %s. Exiting.\n", ip_address_str);
|
||||
free(ip_address_str);
|
||||
getdns_dict_destroy(this_addr_to_look_up);
|
||||
event_base_free(this_event_base);
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Call the event loop */
|
||||
int dispatch_return = event_base_dispatch(this_event_base);
|
||||
UNUSED_PARAM(dispatch_return);
|
||||
// TODO: check the return value above
|
||||
}
|
||||
/* Clean up */
|
||||
getdns_dict_destroy(this_addr_to_look_up);
|
||||
event_base_free(this_event_base);
|
||||
getdns_context_destroy(this_context);
|
||||
if (event_base)
|
||||
event_base_free(event_base);
|
||||
|
||||
if (context)
|
||||
getdns_context_destroy(context);
|
||||
|
||||
/* Assuming we get here, leave gracefully */
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -1,108 +1,109 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <getdns_libevent.h>
|
||||
|
||||
#define UNUSED_PARAM(x) ((void)(x))
|
||||
|
||||
/* Set up the callback function, which will also do the processing of the results */
|
||||
void this_callbackfn(getdns_context *this_context,
|
||||
getdns_callback_type_t this_callback_type,
|
||||
getdns_dict *this_response,
|
||||
void *this_userarg,
|
||||
getdns_transaction_t this_transaction_id)
|
||||
void callback(getdns_context *context,
|
||||
getdns_callback_type_t callback_type,
|
||||
getdns_dict *response,
|
||||
void *userarg,
|
||||
getdns_transaction_t transaction_id)
|
||||
{
|
||||
UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */
|
||||
UNUSED_PARAM(this_context); /* Not looking at the context for this example */
|
||||
getdns_return_t this_ret; /* Holder for all function returns */
|
||||
if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */
|
||||
{
|
||||
/* Be sure the search returned something */
|
||||
uint32_t this_error;
|
||||
this_ret = getdns_dict_get_int(this_response, "status", &this_error); // Ignore any error
|
||||
if (this_error != GETDNS_RESPSTATUS_GOOD) // If the search didn't return "good"
|
||||
{
|
||||
fprintf(stderr, "The search had no results, and a return value of %d. Exiting.\n", this_error);
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
getdns_list * just_the_addresses_ptr;
|
||||
this_ret = getdns_dict_get_list(this_response, "just_address_answers", &just_the_addresses_ptr);
|
||||
if (this_ret != GETDNS_RETURN_GOOD) // This check is really not needed, but prevents a compiler error under "pedantic"
|
||||
{
|
||||
fprintf(stderr, "Trying to get the answers failed: %d\n", this_ret);
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
size_t num_addresses;
|
||||
this_ret = getdns_list_get_length(just_the_addresses_ptr, &num_addresses); // Ignore any error
|
||||
/* Go through each record */
|
||||
for ( size_t rec_count = 0; rec_count < num_addresses; ++rec_count )
|
||||
{
|
||||
getdns_dict * this_address;
|
||||
this_ret = getdns_list_get_dict(just_the_addresses_ptr, rec_count, &this_address); // Ignore any error
|
||||
/* Just print the address */
|
||||
getdns_bindata * this_address_data;
|
||||
this_ret = getdns_dict_get_bindata(this_address, "address_data", &this_address_data); // Ignore any error
|
||||
char *this_address_str = getdns_display_ip_address(this_address_data);
|
||||
printf("The address is %s\n", this_address_str);
|
||||
free(this_address_str);
|
||||
}
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
uint32_t status;
|
||||
getdns_bindata *address_data;
|
||||
char *first = NULL, *second = NULL;
|
||||
|
||||
(void) context; /* unused parameter */
|
||||
|
||||
printf( "Callback for query \"%s\" with request ID %"PRIu64".\n"
|
||||
, (char *)userarg, transaction_id );
|
||||
|
||||
switch(callback_type) {
|
||||
case GETDNS_CALLBACK_CANCEL:
|
||||
printf("Transaction with ID %"PRIu64" was cancelled.\n", transaction_id);
|
||||
return;
|
||||
case GETDNS_CALLBACK_TIMEOUT:
|
||||
printf("Transaction with ID %"PRIu64" timed out.\n", transaction_id);
|
||||
return;
|
||||
case GETDNS_CALLBACK_ERROR:
|
||||
printf("An error occurred for transaction ID %"PRIu64".\n", transaction_id);
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
else if (this_callback_type == GETDNS_CALLBACK_CANCEL)
|
||||
fprintf(stderr, "The callback with ID %"PRIu64" was cancelled. Exiting.\n", this_transaction_id);
|
||||
else
|
||||
fprintf(stderr, "The callback got a callback_type of %d. Exiting.\n", this_callback_type);
|
||||
getdns_dict_destroy(this_response);
|
||||
assert( callback_type == GETDNS_CALLBACK_COMPLETE );
|
||||
|
||||
if ((r = getdns_dict_get_int(response, "status", &status)))
|
||||
fprintf(stderr, "Could not get \"status\" from response");
|
||||
|
||||
else if (status != GETDNS_RESPSTATUS_GOOD)
|
||||
fprintf(stderr, "The search had no results, and a return value of %"PRIu32".\n", status);
|
||||
|
||||
else if ((r = getdns_dict_get_bindata(response, "/just_address_answers/0/address_data", &address_data)))
|
||||
fprintf(stderr, "Could not get first address");
|
||||
|
||||
else if (!(first = getdns_display_ip_address(address_data)))
|
||||
fprintf(stderr, "Could not convert first address to string\n");
|
||||
|
||||
else if ((r = getdns_dict_get_bindata(response, "/just_address_answers/1/address_data", &address_data)))
|
||||
fprintf(stderr, "Could not get second address");
|
||||
|
||||
else if (!(second = getdns_display_ip_address(address_data)))
|
||||
fprintf(stderr, "Could not convert second address to string\n");
|
||||
|
||||
if (first) {
|
||||
printf("The address is %s\n", first);
|
||||
free(first);
|
||||
}
|
||||
if (second) {
|
||||
printf("The address is %s\n", second);
|
||||
free(second);
|
||||
}
|
||||
if (r) {
|
||||
assert( r != GETDNS_RETURN_GOOD );
|
||||
fprintf(stderr, ": %d\n", r);
|
||||
}
|
||||
getdns_dict_destroy(response);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
/* Create the DNS context for this call */
|
||||
getdns_context *this_context = NULL;
|
||||
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
|
||||
if (context_create_return != GETDNS_RETURN_GOOD)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the context failed: %d", context_create_return);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
/* Create an event base and put it in the context using the unknown function name */
|
||||
struct event_base *this_event_base;
|
||||
this_event_base = event_base_new();
|
||||
if (this_event_base == NULL)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the event base failed.\n");
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
(void)getdns_extension_set_libevent_base(this_context, this_event_base);
|
||||
/* Set up the getdns call */
|
||||
const char * this_name = "www.example.com";
|
||||
char* this_userarg = "somestring"; // Could add things here to help identify this call
|
||||
getdns_transaction_t this_transaction_id = 0;
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
getdns_context *context = NULL;
|
||||
struct event_base *event_base = NULL;
|
||||
getdns_dict *extensions = NULL;
|
||||
char *query_name = "www.example.com";
|
||||
/* Could add things here to help identify this call */
|
||||
char *userarg = query_name;
|
||||
getdns_transaction_t transaction_id;
|
||||
|
||||
/* Make the call */
|
||||
getdns_return_t dns_request_return = getdns_address(this_context, this_name,
|
||||
NULL, this_userarg, &this_transaction_id, this_callbackfn);
|
||||
if (dns_request_return == GETDNS_RETURN_BAD_DOMAIN_NAME)
|
||||
{
|
||||
fprintf(stderr, "A bad domain name was used: %s. Exiting.\n", this_name);
|
||||
event_base_free(this_event_base);
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Call the event loop */
|
||||
int dispatch_return = event_base_dispatch(this_event_base);
|
||||
UNUSED_PARAM(dispatch_return);
|
||||
// TODO: check the return value above
|
||||
if ((r = getdns_context_create(&context, 1)))
|
||||
fprintf(stderr, "Trying to create the context failed");
|
||||
|
||||
else if (!(event_base = event_base_new()))
|
||||
fprintf(stderr, "Trying to create the event base failed.\n");
|
||||
|
||||
else if ((r = getdns_extension_set_libevent_base(context, event_base)))
|
||||
fprintf(stderr, "Setting the event base failed");
|
||||
|
||||
else if ((r = getdns_address( context, query_name, extensions
|
||||
, userarg, &transaction_id, callback)))
|
||||
fprintf(stderr, "Error scheduling asynchronous request");
|
||||
|
||||
else {
|
||||
printf("Request with transaction ID %"PRIu64" scheduled.\n", transaction_id);
|
||||
if (event_base_dispatch(event_base) < 0)
|
||||
fprintf(stderr, "Error dispatching events\n");
|
||||
}
|
||||
|
||||
/* Clean up */
|
||||
event_base_free(this_event_base);
|
||||
getdns_context_destroy(this_context);
|
||||
if (event_base)
|
||||
event_base_free(event_base);
|
||||
|
||||
if (context)
|
||||
getdns_context_destroy(context);
|
||||
|
||||
/* Assuming we get here, leave gracefully */
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -1,81 +1,66 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
#include <getdns_core_only.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
getdns_return_t this_ret; /* Holder for all function returns */
|
||||
/* Create the DNS context for this call */
|
||||
getdns_context *this_context = NULL;
|
||||
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
|
||||
if (context_create_return != GETDNS_RETURN_GOOD)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the context failed: %d\n", context_create_return);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
/* Set up the getdns_sync_request call */
|
||||
const char * this_name = "www.example.com";
|
||||
uint8_t this_request_type = GETDNS_RRTYPE_A;
|
||||
/* Get the A and AAAA records */
|
||||
getdns_dict * this_extensions = getdns_dict_create();
|
||||
this_ret = getdns_dict_set_int(this_extensions, "return_both_v4_and_v6", GETDNS_EXTENSION_TRUE);
|
||||
if (this_ret != GETDNS_RETURN_GOOD)
|
||||
{
|
||||
fprintf(stderr, "Trying to set an extension do both IPv4 and IPv6 failed: %d\n", this_ret);
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
getdns_dict * this_response = NULL;
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
getdns_context *context = NULL;
|
||||
getdns_dict *response = NULL;
|
||||
getdns_dict *extensions = NULL;
|
||||
getdns_bindata *address_data;
|
||||
char *first = NULL, *second = NULL;
|
||||
|
||||
/* Make the call */
|
||||
getdns_return_t dns_request_return = getdns_general_sync(this_context, this_name, this_request_type,
|
||||
this_extensions, &this_response);
|
||||
if (dns_request_return == GETDNS_RETURN_BAD_DOMAIN_NAME)
|
||||
{
|
||||
fprintf(stderr, "A bad domain name was used: %s. Exiting.\n", this_name);
|
||||
getdns_dict_destroy(this_response);
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
/* Create the DNS context for this call */
|
||||
if ((r = getdns_context_create(&context, 1)))
|
||||
fprintf(stderr, "Trying to create the context failed");
|
||||
|
||||
else if (!(extensions = getdns_dict_create()))
|
||||
fprintf(stderr, "Could not create extensions dict.\n");
|
||||
|
||||
else if ((r = getdns_dict_set_int(extensions, "return_both_v4_and_v6", GETDNS_EXTENSION_TRUE)))
|
||||
fprintf(stderr, "Trying to set an extension do both IPv4 and IPv6 failed");
|
||||
|
||||
else if ((r = getdns_general_sync(context, "example.com", GETDNS_RRTYPE_A, extensions, &response)))
|
||||
fprintf(stderr, "Error scheduling synchronous request");
|
||||
|
||||
else if ((r = getdns_dict_get_bindata(response, "/just_address_answers/0/address_data", &address_data)))
|
||||
fprintf(stderr, "Could not get first address");
|
||||
|
||||
else if (!(first = getdns_display_ip_address(address_data)))
|
||||
fprintf(stderr, "Could not convert first address to string\n");
|
||||
|
||||
else if ((r = getdns_dict_get_bindata(response, "/just_address_answers/1/address_data", &address_data)))
|
||||
fprintf(stderr, "Could not get second address");
|
||||
|
||||
else if (!(second = getdns_display_ip_address(address_data)))
|
||||
fprintf(stderr, "Could not convert second address to string\n");
|
||||
|
||||
if (first) {
|
||||
printf("The address is %s\n", first);
|
||||
free(first);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Be sure the search returned something */
|
||||
uint32_t this_error;
|
||||
this_ret = getdns_dict_get_int(this_response, "status", &this_error); // Ignore any error
|
||||
if (this_error != GETDNS_RESPSTATUS_GOOD) // If the search didn't return "good"
|
||||
{
|
||||
fprintf(stderr, "The search had no results, and a return value of %d. Exiting.\n", this_error);
|
||||
getdns_dict_destroy(this_response);
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
getdns_list * just_the_addresses_ptr;
|
||||
this_ret = getdns_dict_get_list(this_response, "just_address_answers", &just_the_addresses_ptr); // Ignore any error
|
||||
size_t num_addresses;
|
||||
this_ret = getdns_list_get_length(just_the_addresses_ptr, &num_addresses); // Ignore any error
|
||||
/* Go through each record */
|
||||
for ( size_t rec_count = 0; rec_count < num_addresses; ++rec_count )
|
||||
{
|
||||
getdns_dict * this_address;
|
||||
this_ret = getdns_list_get_dict(just_the_addresses_ptr, rec_count, &this_address); // Ignore any error
|
||||
/* Just print the address */
|
||||
getdns_bindata * this_address_data;
|
||||
this_ret = getdns_dict_get_bindata(this_address, "address_data", &this_address_data); // Ignore any error
|
||||
char *this_address_str = getdns_display_ip_address(this_address_data);
|
||||
printf("The address is %s\n", this_address_str);
|
||||
free(this_address_str);
|
||||
}
|
||||
if (second) {
|
||||
printf("The address is %s\n", second);
|
||||
free(second);
|
||||
}
|
||||
/* Clean up */
|
||||
getdns_dict_destroy(this_response);
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
if (response)
|
||||
getdns_dict_destroy(response);
|
||||
|
||||
if (extensions)
|
||||
getdns_dict_destroy(extensions);
|
||||
|
||||
if (context)
|
||||
getdns_context_destroy(context);
|
||||
|
||||
if (r) {
|
||||
assert( r != GETDNS_RETURN_GOOD );
|
||||
|
||||
fprintf(stderr, ": %d\n", r);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/* Assuming we get here, leave gracefully */
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,151 +1,121 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <getdns_libevent.h>
|
||||
|
||||
#define UNUSED_PARAM(x) ((void)(x))
|
||||
|
||||
/* Set up the callback function, which will also do the processing of the results */
|
||||
void this_callbackfn(getdns_context *this_context,
|
||||
getdns_callback_type_t this_callback_type,
|
||||
getdns_dict *this_response,
|
||||
void *this_userarg,
|
||||
getdns_transaction_t this_transaction_id)
|
||||
void callback(getdns_context *context,
|
||||
getdns_callback_type_t callback_type,
|
||||
getdns_dict *response,
|
||||
void *userarg,
|
||||
getdns_transaction_t transaction_id)
|
||||
{
|
||||
UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */
|
||||
UNUSED_PARAM(this_context); /* Not looking at the context for this example */
|
||||
getdns_return_t this_ret; /* Holder for all function returns */
|
||||
if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */
|
||||
{
|
||||
/* Be sure the search returned something */
|
||||
uint32_t this_error;
|
||||
this_ret = getdns_dict_get_int(this_response, "status", &this_error); // Ignore any error
|
||||
if (this_error != GETDNS_RESPSTATUS_GOOD) // If the search didn't return "good"
|
||||
{
|
||||
fprintf(stderr, "The search had no results, and a return value of %d. Exiting.\n", this_error);
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
/* Find all the answers returned */
|
||||
getdns_list * these_answers;
|
||||
this_ret = getdns_dict_get_list(this_response, "replies_tree", &these_answers);
|
||||
if (this_ret == GETDNS_RETURN_NO_SUCH_DICT_NAME)
|
||||
{
|
||||
fprintf(stderr, "Weird: the response had no error, but also no replies_tree. Exiting.\n");
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
size_t num_answers;
|
||||
this_ret = getdns_list_get_length(these_answers, &num_answers);
|
||||
/* Go through each answer */
|
||||
for ( size_t rec_count = 0; rec_count < num_answers; ++rec_count )
|
||||
{
|
||||
getdns_dict * this_record;
|
||||
this_ret = getdns_list_get_dict(these_answers, rec_count, &this_record); // Ignore any error
|
||||
/* Get the answer section */
|
||||
getdns_list * this_answer;
|
||||
this_ret = getdns_dict_get_list(this_record, "answer", &this_answer); // Ignore any error
|
||||
/* Get each RR in the answer section */
|
||||
size_t num_rrs;
|
||||
this_ret = getdns_list_get_length(this_answer, &num_rrs);
|
||||
for ( size_t rr_count = 0; rr_count < num_rrs; ++rr_count )
|
||||
{
|
||||
getdns_dict *this_rr = NULL;
|
||||
this_ret = getdns_list_get_dict(this_answer, rr_count, &this_rr); // Ignore any error
|
||||
/* Get the RDATA */
|
||||
getdns_dict * this_rdata = NULL;
|
||||
this_ret = getdns_dict_get_dict(this_rr, "rdata", &this_rdata); // Ignore any error
|
||||
/* Get the RDATA type */
|
||||
uint32_t this_type;
|
||||
this_ret = getdns_dict_get_int(this_rr, "type", &this_type); // Ignore any error
|
||||
/* If it is type A or AAAA, print the value */
|
||||
if (this_type == GETDNS_RRTYPE_A)
|
||||
{
|
||||
getdns_bindata * this_a_record = NULL;
|
||||
this_ret = getdns_dict_get_bindata(this_rdata, "ipv4_address", &this_a_record);
|
||||
if (this_ret == GETDNS_RETURN_NO_SUCH_DICT_NAME)
|
||||
{
|
||||
fprintf(stderr, "Weird: the A record at %d in record at %d had no address. Exiting.\n",
|
||||
(int) rr_count, (int) rec_count);
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
char *this_address_str = getdns_display_ip_address(this_a_record);
|
||||
printf("The IPv4 address is %s\n", this_address_str);
|
||||
free(this_address_str);
|
||||
}
|
||||
else if (this_type == GETDNS_RRTYPE_AAAA)
|
||||
{
|
||||
getdns_bindata * this_aaaa_record = NULL;
|
||||
this_ret = getdns_dict_get_bindata(this_rdata, "ipv6_address", &this_aaaa_record);
|
||||
if (this_ret == GETDNS_RETURN_NO_SUCH_DICT_NAME)
|
||||
{
|
||||
fprintf(stderr, "Weird: the AAAA record at %d in record at %d had no address. Exiting.\n",
|
||||
(int) rr_count, (int) rec_count);
|
||||
getdns_dict_destroy(this_response);
|
||||
return;
|
||||
}
|
||||
char *this_address_str = getdns_display_ip_address(this_aaaa_record);
|
||||
printf("The IPv6 address is %s\n", this_address_str);
|
||||
free(this_address_str);
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
getdns_list *replies_tree;
|
||||
size_t n_replies, i;
|
||||
|
||||
(void) context; (void) userarg; /* unused parameters */
|
||||
|
||||
switch(callback_type) {
|
||||
case GETDNS_CALLBACK_CANCEL:
|
||||
printf("Transaction with ID %"PRIu64" was cancelled.\n", transaction_id);
|
||||
return;
|
||||
case GETDNS_CALLBACK_TIMEOUT:
|
||||
printf("Transaction with ID %"PRIu64" timed out.\n", transaction_id);
|
||||
return;
|
||||
case GETDNS_CALLBACK_ERROR:
|
||||
printf("An error occurred for transaction ID %"PRIu64".\n", transaction_id);
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
assert( callback_type == GETDNS_CALLBACK_COMPLETE );
|
||||
|
||||
if ((r = getdns_dict_get_list(response, "replies_tree", &replies_tree)))
|
||||
fprintf(stderr, "Could not get \"replies_tree\" from response");
|
||||
|
||||
else if ((r = getdns_list_get_length(replies_tree, &n_replies)))
|
||||
fprintf(stderr, "Could not get replies_tree\'s length");
|
||||
|
||||
else for (i = 0; i < n_replies && r == GETDNS_RETURN_GOOD; i++) {
|
||||
getdns_dict *reply;
|
||||
getdns_list *answer;
|
||||
size_t n_answers, j;
|
||||
|
||||
if ((r = getdns_list_get_dict(replies_tree, i, &reply)))
|
||||
fprintf(stderr, "Could not get address %zu from just_address_answers", i);
|
||||
|
||||
else if ((r = getdns_dict_get_list(reply, "answer", &answer)))
|
||||
fprintf(stderr, "Could not get \"address_data\" from address");
|
||||
|
||||
else if ((r = getdns_list_get_length(answer, &n_answers)))
|
||||
fprintf(stderr, "Could not get answer section\'s length");
|
||||
|
||||
else for (j = 0; j < n_answers && r == GETDNS_RETURN_GOOD; j++) {
|
||||
getdns_dict *rr;
|
||||
getdns_bindata *address = NULL;
|
||||
|
||||
if ((r = getdns_list_get_dict(answer, j, &rr)))
|
||||
fprintf(stderr, "Could net get rr %zu from answer section", j);
|
||||
|
||||
else if (getdns_dict_get_bindata(rr, "/rdata/ipv4_address", &address) == GETDNS_RETURN_GOOD)
|
||||
printf("The IPv4 address is ");
|
||||
|
||||
else if (getdns_dict_get_bindata(rr, "/rdata/ipv6_address", &address) == GETDNS_RETURN_GOOD)
|
||||
printf("The IPv6 address is ");
|
||||
|
||||
if (address) {
|
||||
char *address_str;
|
||||
if (!(address_str = getdns_display_ip_address(address))) {
|
||||
fprintf(stderr, "Could not convert second address to string");
|
||||
r = GETDNS_RETURN_MEMORY_ERROR;
|
||||
break;
|
||||
}
|
||||
printf("%s\n", address_str);
|
||||
free(address_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this_callback_type == GETDNS_CALLBACK_CANCEL)
|
||||
fprintf(stderr, "The callback with ID %"PRIu64" was cancelled. Exiting.\n", this_transaction_id);
|
||||
else
|
||||
fprintf(stderr, "The callback got a callback_type of %d. Exiting.\n", this_callback_type);
|
||||
getdns_dict_destroy(this_response);
|
||||
if (r) {
|
||||
assert( r != GETDNS_RETURN_GOOD );
|
||||
fprintf(stderr, ": %d\n", r);
|
||||
}
|
||||
getdns_dict_destroy(response);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
/* Create the DNS context for this call */
|
||||
getdns_context *this_context = NULL;
|
||||
getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
|
||||
if (context_create_return != GETDNS_RETURN_GOOD)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the context failed: %d\n", context_create_return);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
/* Create an event base and put it in the context using the unknown function name */
|
||||
struct event_base *this_event_base;
|
||||
this_event_base = event_base_new();
|
||||
if (this_event_base == NULL)
|
||||
{
|
||||
fprintf(stderr, "Trying to create the event base failed.\n");
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
(void)getdns_extension_set_libevent_base(this_context, this_event_base);
|
||||
/* Set up the getdns call */
|
||||
const char * this_name = "www.example.com";
|
||||
char* this_userarg = "somestring"; // Could add things here to help identify this call
|
||||
getdns_transaction_t this_transaction_id = 0;
|
||||
getdns_return_t r; /* Holder for all function returns */
|
||||
getdns_context *context = NULL;
|
||||
struct event_base *event_base = NULL;
|
||||
getdns_dict *extensions = NULL;
|
||||
char *query_name = "www.example.com";
|
||||
/* Could add things here to help identify this call */
|
||||
char *userarg = NULL;
|
||||
getdns_transaction_t transaction_id;
|
||||
|
||||
if ((r = getdns_context_create(&context, 1)))
|
||||
fprintf(stderr, "Trying to create the context failed");
|
||||
|
||||
else if (!(event_base = event_base_new()))
|
||||
fprintf(stderr, "Trying to create the event base failed.\n");
|
||||
|
||||
else if ((r = getdns_extension_set_libevent_base(context, event_base)))
|
||||
fprintf(stderr, "Setting the event base failed");
|
||||
|
||||
else if ((r = getdns_address( context, query_name, extensions
|
||||
, userarg, &transaction_id, callback)))
|
||||
fprintf(stderr, "Error scheduling asynchronous request");
|
||||
|
||||
else if (event_base_dispatch(event_base) < 0)
|
||||
fprintf(stderr, "Error dispatching events\n");
|
||||
|
||||
/* Make the call */
|
||||
getdns_return_t dns_request_return = getdns_address(this_context, this_name,
|
||||
NULL, this_userarg, &this_transaction_id, this_callbackfn);
|
||||
if (dns_request_return == GETDNS_RETURN_BAD_DOMAIN_NAME)
|
||||
{
|
||||
fprintf(stderr, "A bad domain name was used: %s. Exiting.\n", this_name);
|
||||
event_base_free(this_event_base);
|
||||
getdns_context_destroy(this_context);
|
||||
return(GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Call the event loop */
|
||||
int dispatch_return = event_base_dispatch(this_event_base);
|
||||
UNUSED_PARAM(dispatch_return);
|
||||
// TODO: check the return value above
|
||||
}
|
||||
/* Clean up */
|
||||
event_base_free(this_event_base);
|
||||
getdns_context_destroy(this_context);
|
||||
if (event_base)
|
||||
event_base_free(event_base);
|
||||
|
||||
if (context)
|
||||
getdns_context_destroy(context);
|
||||
|
||||
/* Assuming we get here, leave gracefully */
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
Binary file not shown.
860
spec/index.html
860
spec/index.html
File diff suppressed because it is too large
Load Diff
2514
src/Doxyfile.in
2514
src/Doxyfile.in
File diff suppressed because it is too large
Load Diff
323
src/Makefile.in
323
src/Makefile.in
|
@ -1,323 +0,0 @@
|
|||
#
|
||||
# @configure_input@
|
||||
#
|
||||
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the names of the copyright holders nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package = @PACKAGE_NAME@
|
||||
version = @PACKAGE_VERSION@
|
||||
tarname = @PACKAGE_TARNAME@
|
||||
distdir = $(tarname)-$(version)
|
||||
libversion = @GETDNS_LIBVERSION@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
includedir = @includedir@
|
||||
have_libevent = @have_libevent@
|
||||
have_libuv = @have_libuv@
|
||||
have_libev = @have_libev@
|
||||
# datarootdir is here to please some checkers
|
||||
datarootdir=@datarootdir@
|
||||
INSTALL = @INSTALL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
LIBTOOL = ../libtool
|
||||
|
||||
CC=@CC@
|
||||
CFLAGS=-I$(srcdir) -I. @CFLAGS@
|
||||
LDFLAGS=@LDFLAGS@ @LIBS@
|
||||
|
||||
EXTENSION_LIBEVENT_LIB=@EXTENSION_LIBEVENT_LIB@
|
||||
EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@
|
||||
EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@
|
||||
EXTENSION_LIBEV_LIB=@EXTENSION_LIBEV_LIB@
|
||||
EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@
|
||||
EXTENSION_LIBEV_LDFLAGS=@EXTENSION_LIBEV_LDFLAGS@
|
||||
EXTENSION_LIBUV_LIB=@EXTENSION_LIBUV_LIB@
|
||||
EXTENSION_LIBUV_EXT_LIBS=@EXTENSION_LIBUV_EXT_LIBS@
|
||||
EXTENSION_LIBUV_LDFLAGS=@EXTENSION_LIBUV_LDFLAGS@
|
||||
|
||||
C99COMPATFLAGS=@C99COMPATFLAGS@
|
||||
|
||||
GETDNS_OBJ=const-info.lo convert.lo dict.lo dnssec.lo general.lo \
|
||||
list.lo request-internal.lo rr-dict.lo rr-iter.lo stub.lo sync.lo \
|
||||
util-internal.lo version.lo
|
||||
|
||||
GLDNS_OBJ=keyraw.lo gbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo \
|
||||
str2wire.lo
|
||||
|
||||
LIBOBJDIR=
|
||||
LIBOBJS=@LIBOBJS@
|
||||
COMPAT_OBJ=$(LIBOBJS:.o=.lo)
|
||||
|
||||
UTIL_OBJ=mini_event.lo rbtree.lo
|
||||
|
||||
EXTENSION_OBJ=libmini_event.lo libevent.lo libev.lo
|
||||
|
||||
NON_C99_OBJS=context.lo libuv.lo
|
||||
|
||||
.SUFFIXES: .c .o .a .lo .h
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
default: all
|
||||
|
||||
all: libgetdns.la $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBUV_LIB) $(EXTENSION_LIBEV_LIB)
|
||||
|
||||
$(GETDNS_OBJ):
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@
|
||||
|
||||
$(GLDNS_OBJ):
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/gldns/$(@:.lo=.c) -o $@
|
||||
|
||||
$(COMPAT_OBJ):
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/compat/$(@:.lo=.c) -o $@
|
||||
|
||||
$(UTIL_OBJ):
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/util/$(@:.lo=.c) -o $@
|
||||
|
||||
$(EXTENSION_OBJ):
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/extension/$(@:.lo=.c) -o $@
|
||||
|
||||
context.lo:
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(C99COMPATFLAGS) -c $(srcdir)/context.c -o context.lo
|
||||
|
||||
libuv.lo:
|
||||
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(C99COMPATFLAGS) -c $(srcdir)/extension/libuv.c -o libuv.lo
|
||||
|
||||
install: libgetdns.la
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/getdns
|
||||
$(INSTALL) -m 644 getdns/getdns.h $(DESTDIR)$(includedir)/getdns/getdns.h
|
||||
$(INSTALL) -m 644 $(srcdir)/getdns/getdns_extra.h $(DESTDIR)$(includedir)/getdns/getdns_extra.h
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(libdir)
|
||||
$(LIBTOOL) --mode=install cp libgetdns.la $(DESTDIR)$(libdir)
|
||||
if test $(have_libevent) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/ ; $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEVENT_LIB) $(DESTDIR)$(libdir) ; fi
|
||||
if test $(have_libuv) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libuv.h $(DESTDIR)$(includedir)/getdns/ ; $(LIBTOOL) --mode=install cp $(EXTENSION_LIBUV_LIB) $(DESTDIR)$(libdir) ; fi
|
||||
if test $(have_libev) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libev.h $(DESTDIR)$(includedir)/getdns/ ; $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEV_LIB) $(DESTDIR)$(libdir) ; fi
|
||||
|
||||
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
|
||||
|
||||
uninstall:
|
||||
rm -rf $(DESTDIR)$(includedir)/getdns
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libgetdns.la
|
||||
if test $(have_libevent) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEVENT_LIB) ; fi
|
||||
if test $(have_libuv) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBUV_LIB) ; fi
|
||||
if test $(have_libev) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEV_LIB) ; fi
|
||||
|
||||
libgetdns_ext_event.la: libgetdns.la libevent.lo
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ libevent.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libevent.symbols
|
||||
|
||||
libgetdns_ext_uv.la: libgetdns.la libuv.lo
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ libuv.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libuv.symbols
|
||||
|
||||
|
||||
libgetdns_ext_ev.la: libgetdns.la libev.lo
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ libev.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libev.symbols
|
||||
|
||||
|
||||
libgetdns.la: $(GETDNS_OBJ) context.lo libmini_event.lo $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ)
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $(GETDNS_OBJ) context.lo libmini_event.lo $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/libgetdns.symbols
|
||||
|
||||
|
||||
test: FORCE
|
||||
cd test && $(MAKE) $@
|
||||
|
||||
getdns_query: FORCE
|
||||
cd test && $(MAKE) $@
|
||||
|
||||
clean:
|
||||
cd test && $(MAKE) $@
|
||||
rm -f *.o *.lo extension/*.lo extension/*.o $(PROGRAMS) libgetdns.la libgetdns_ext_*.la
|
||||
rm -rf .libs extension/.libs
|
||||
|
||||
distclean : clean
|
||||
cd test && $(MAKE) $@
|
||||
rmdir test 2>/dev/null || true
|
||||
rm -f Makefile config.status config.log Doxyfile config.h getdns/Makefile getdns/getdns.h
|
||||
rmdir getdns 2>/dev/null || true
|
||||
rmdir extension 2>/dev/null || true
|
||||
rm -Rf autom4te.cache
|
||||
|
||||
$(distdir): FORCE
|
||||
mkdir -p $(distdir)/src
|
||||
cp configure.ac $(distdir)
|
||||
cp configure $(distdir)
|
||||
cp Makefile.in $(distdir)
|
||||
cp src/Makefile.in $(distdir)/src
|
||||
|
||||
distcheck: $(distdir).tar.gz
|
||||
gzip -cd $(distdir).tar.gz | tar xvf -
|
||||
cd $(distdir) && ./configure
|
||||
cd $(distdir) && $(MAKE) all
|
||||
cd $(distdir) && $(MAKE) check
|
||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
||||
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
||||
if test "$${remaining}" -ne 0; then
|
||||
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
||||
exit 1; \
|
||||
fi
|
||||
cd $(distdir) && $(MAKE) clean
|
||||
rm -rf $(distdir)
|
||||
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in ../config.status
|
||||
cd .. && ./config.status src/Makefile
|
||||
|
||||
configure.status: configure
|
||||
cd .. && ./config.status --recheck
|
||||
|
||||
depend:
|
||||
(cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new )
|
||||
(cd $(srcdir) ; gcc -MM -I. *.c gldns/*.c compat/*.c util/*.c extension/*.c| \
|
||||
sed -e 's?gldns/?$$(srcdir)/gldns/?g' \
|
||||
-e 's?compat/?$$(srcdir)/compat/?g' \
|
||||
-e 's?util/?$$(srcdir)/util/?g' \
|
||||
-e 's?extension/?$$(srcdir)/extension/?g' \
|
||||
-e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \
|
||||
-e 's? \$$(srcdir)/config\.h? config.h?g' \
|
||||
-e 's? getdns/getdns_extra\.h? $$(srcdir)/getdns/getdns_extra.h?g' \
|
||||
-e 's? getdns/getdns_ext_libevent\.h? $$(srcdir)/getdns/getdns_ext_libevent.h?g' \
|
||||
-e 's? getdns/getdns_ext_libev\.h? $$(srcdir)/getdns/getdns_ext_libev.h?g' \
|
||||
-e 's? getdns/getdns_ext_libuv\.h? $$(srcdir)/getdns/getdns_ext_libuv.h?g' \
|
||||
-e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new )
|
||||
(cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \
|
||||
|| mv Makefile.in.new Makefile.in )
|
||||
|
||||
.PHONY: clean test
|
||||
FORCE:
|
||||
|
||||
# Dependencies for gldns, utils, the extensions and compat functions
|
||||
const-info.lo const-info.o: $(srcdir)/const-info.c getdns/getdns.h $(srcdir)/const-info.h
|
||||
context.lo context.o: $(srcdir)/context.c config.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h \
|
||||
$(srcdir)/gldns/wire2str.h $(srcdir)/context.h getdns/getdns.h $(srcdir)/getdns/getdns_extra.h \
|
||||
getdns/getdns.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/extension/libmini_event.h \
|
||||
config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h \
|
||||
$(srcdir)/util-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
|
||||
$(srcdir)/dnssec.h $(srcdir)/stub.h $(srcdir)/list.h
|
||||
convert.lo convert.o: $(srcdir)/convert.c getdns/getdns.h $(srcdir)/getdns/getdns_extra.h \
|
||||
getdns/getdns.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h $(srcdir)/types-internal.h \
|
||||
$(srcdir)/util/rbtree.h $(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h \
|
||||
$(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h
|
||||
dict.lo dict.o: $(srcdir)/dict.c $(srcdir)/types-internal.h getdns/getdns.h $(srcdir)/getdns/getdns_extra.h \
|
||||
getdns/getdns.h $(srcdir)/util/rbtree.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h \
|
||||
$(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
|
||||
$(srcdir)/dict.h $(srcdir)/const-info.h $(srcdir)/gldns/wire2str.h
|
||||
dnssec.lo dnssec.o: $(srcdir)/dnssec.c getdns/getdns.h config.h $(srcdir)/context.h \
|
||||
$(srcdir)/getdns/getdns_extra.h getdns/getdns.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/util-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/gldns/pkthdr.h $(srcdir)/dnssec.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h \
|
||||
$(srcdir)/gldns/keyraw.h $(srcdir)/gldns/parseutil.h $(srcdir)/general.h $(srcdir)/dict.h $(srcdir)/list.h
|
||||
general.lo general.o: $(srcdir)/general.c config.h $(srcdir)/gldns/wire2str.h $(srcdir)/context.h getdns/getdns.h \
|
||||
$(srcdir)/getdns/getdns_extra.h getdns/getdns.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/util-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/gldns/pkthdr.h $(srcdir)/dnssec.h $(srcdir)/stub.h
|
||||
list.lo list.o: $(srcdir)/list.c $(srcdir)/types-internal.h getdns/getdns.h $(srcdir)/getdns/getdns_extra.h \
|
||||
getdns/getdns.h $(srcdir)/util/rbtree.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h \
|
||||
$(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
|
||||
$(srcdir)/list.h
|
||||
request-internal.lo request-internal.o: $(srcdir)/request-internal.c config.h $(srcdir)/types-internal.h \
|
||||
getdns/getdns.h $(srcdir)/getdns/getdns_extra.h getdns/getdns.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/extension/libmini_event.h config.h \
|
||||
$(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
|
||||
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h \
|
||||
$(srcdir)/gldns/rrdef.h $(srcdir)/dict.h
|
||||
rr-dict.lo rr-dict.o: $(srcdir)/rr-dict.c $(srcdir)/rr-dict.h config.h getdns/getdns.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/getdns/getdns_extra.h getdns/getdns.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/extension/libmini_event.h config.h \
|
||||
$(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/rr-iter.h \
|
||||
$(srcdir)/gldns/pkthdr.h $(srcdir)/dict.h
|
||||
rr-iter.lo rr-iter.o: $(srcdir)/rr-iter.c $(srcdir)/rr-iter.h getdns/getdns.h $(srcdir)/rr-dict.h config.h \
|
||||
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/rrdef.h
|
||||
stub.lo stub.o: $(srcdir)/stub.c config.h $(srcdir)/stub.h getdns/getdns.h $(srcdir)/types-internal.h \
|
||||
$(srcdir)/getdns/getdns_extra.h getdns/getdns.h $(srcdir)/util/rbtree.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/rr-iter.h \
|
||||
$(srcdir)/rr-dict.h $(srcdir)/context.h $(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h \
|
||||
$(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/util-internal.h $(srcdir)/general.h
|
||||
sync.lo sync.o: $(srcdir)/sync.c getdns/getdns.h config.h $(srcdir)/context.h $(srcdir)/getdns/getdns_extra.h \
|
||||
getdns/getdns.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/extension/libmini_event.h \
|
||||
config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/general.h \
|
||||
$(srcdir)/util-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
|
||||
$(srcdir)/dnssec.h $(srcdir)/stub.h $(srcdir)/gldns/wire2str.h
|
||||
util-internal.lo util-internal.o: $(srcdir)/util-internal.c getdns/getdns.h $(srcdir)/dict.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/getdns/getdns_extra.h getdns/getdns.h $(srcdir)/list.h \
|
||||
$(srcdir)/util-internal.h config.h $(srcdir)/context.h $(srcdir)/extension/libmini_event.h config.h \
|
||||
$(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
|
||||
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h
|
||||
version.lo version.o: $(srcdir)/version.c
|
||||
gbuffer.lo gbuffer.o: $(srcdir)/gldns/gbuffer.c config.h $(srcdir)/gldns/gbuffer.h
|
||||
keyraw.lo keyraw.o: $(srcdir)/gldns/keyraw.c config.h $(srcdir)/gldns/keyraw.h $(srcdir)/gldns/rrdef.h
|
||||
parse.lo parse.o: $(srcdir)/gldns/parse.c config.h $(srcdir)/gldns/parse.h $(srcdir)/gldns/parseutil.h \
|
||||
$(srcdir)/gldns/gbuffer.h
|
||||
parseutil.lo parseutil.o: $(srcdir)/gldns/parseutil.c config.h $(srcdir)/gldns/parseutil.h
|
||||
rrdef.lo rrdef.o: $(srcdir)/gldns/rrdef.c config.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/parseutil.h
|
||||
str2wire.lo str2wire.o: $(srcdir)/gldns/str2wire.c config.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h \
|
||||
$(srcdir)/gldns/wire2str.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/parse.h $(srcdir)/gldns/parseutil.h
|
||||
wire2str.lo wire2str.o: $(srcdir)/gldns/wire2str.c config.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h \
|
||||
$(srcdir)/gldns/rrdef.h $(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/parseutil.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/gldns/keyraw.h
|
||||
arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c config.h
|
||||
arc4random.lo arc4random.o: $(srcdir)/compat/arc4random.c config.h $(srcdir)/compat/chacha_private.h
|
||||
arc4random_uniform.lo arc4random_uniform.o: $(srcdir)/compat/arc4random_uniform.c config.h
|
||||
explicit_bzero.lo explicit_bzero.o: $(srcdir)/compat/explicit_bzero.c config.h
|
||||
getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c config.h
|
||||
getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c config.h
|
||||
getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c config.h
|
||||
getentropy_win.lo getentropy_win.o: $(srcdir)/compat/getentropy_win.c
|
||||
sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h
|
||||
strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h
|
||||
mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/util/fptr_wlist.h
|
||||
rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \
|
||||
$(srcdir)/util/rbtree.h
|
||||
libev.lo libev.o: $(srcdir)/extension/libev.c $(srcdir)/getdns/getdns_ext_libev.h getdns/getdns.h \
|
||||
$(srcdir)/getdns/getdns_extra.h $(srcdir)/types-internal.h getdns/getdns.h \
|
||||
$(srcdir)/getdns/getdns_extra.h $(srcdir)/util/rbtree.h config.h
|
||||
libevent.lo libevent.o: $(srcdir)/extension/libevent.c $(srcdir)/getdns/getdns_ext_libevent.h \
|
||||
getdns/getdns.h $(srcdir)/getdns/getdns_extra.h $(srcdir)/types-internal.h getdns/getdns.h \
|
||||
$(srcdir)/getdns/getdns_extra.h $(srcdir)/util/rbtree.h config.h
|
||||
libmini_event.lo libmini_event.o: $(srcdir)/extension/libmini_event.c $(srcdir)/extension/libmini_event.h \
|
||||
config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h \
|
||||
getdns/getdns.h $(srcdir)/getdns/getdns_extra.h getdns/getdns.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/context.h config.h $(srcdir)/types-internal.h $(srcdir)/extension/libmini_event.h \
|
||||
$(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
|
||||
$(srcdir)/gldns/pkthdr.h
|
||||
libuv.lo libuv.o: $(srcdir)/extension/libuv.c config.h $(srcdir)/getdns/getdns_ext_libuv.h \
|
||||
getdns/getdns.h $(srcdir)/getdns/getdns_extra.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h \
|
||||
getdns/getdns.h $(srcdir)/getdns/getdns_extra.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/extension/libmini_event.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
|
||||
$(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
*
|
||||
* /brief functions for DNSSEC trust anchor management
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017, NLnet Labs
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the names of the copyright holders nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef ANCHOR_H_
|
||||
#define ANCHOR_H_
|
||||
|
||||
#include "getdns/getdns.h"
|
||||
#include "getdns/getdns_extra.h"
|
||||
#include <time.h>
|
||||
#include "rr-iter.h"
|
||||
|
||||
#include "types-internal.h"
|
||||
|
||||
/**
|
||||
** Internal functions, implemented in anchor-internal.c.
|
||||
**/
|
||||
void _getdns_context_equip_with_anchor(getdns_context *context, uint64_t *now_ms);
|
||||
|
||||
uint8_t *_getdns_tas_validate(struct mem_funcs *mf,
|
||||
const getdns_bindata *xml_bd, const getdns_bindata *p7s_bd,
|
||||
const getdns_bindata *crt_bd, const char *p7signer,
|
||||
uint64_t *now_ms, uint8_t *tas, size_t *tas_len);
|
||||
|
||||
|
||||
/**
|
||||
** anchor.c functions used by anchor-internal.c.
|
||||
**/
|
||||
time_t _getdns_xml_convertdate(const char* str);
|
||||
|
||||
uint16_t _getdns_parse_xml_trust_anchors_buf(gldns_buffer *gbuf, uint64_t *now_ms, char *xml_data, size_t xml_len);
|
||||
|
||||
/**
|
||||
** Public interface.
|
||||
**/
|
||||
void _getdns_context_equip_with_anchor(getdns_context *context, uint64_t *now_ms);
|
||||
|
||||
void _getdns_start_fetching_ta(
|
||||
getdns_context *context, getdns_eventloop *loop, uint64_t *now_ms);
|
||||
|
||||
#define MAX_KSKS 16
|
||||
#define RRSIG_RDATA_LEN 16
|
||||
typedef struct _getdns_ksks {
|
||||
size_t n;
|
||||
uint16_t ids[MAX_KSKS];
|
||||
size_t n_rrsigs;
|
||||
uint8_t rrsigs[MAX_KSKS][RRSIG_RDATA_LEN];
|
||||
} _getdns_ksks;
|
||||
|
||||
void _getdns_context_update_root_ksk(
|
||||
getdns_context *context, _getdns_rrset *dnskey_set);
|
||||
|
||||
#endif
|
||||
/* anchor.h */
|
|
@ -34,6 +34,79 @@
|
|||
#include "config.h"
|
||||
#define LOCKRET(func) func
|
||||
|
||||
#ifdef HAVE_PTHREAD
|
||||
#include "pthread.h"
|
||||
|
||||
static pthread_mutex_t arc_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
void _ARC4_LOCK(void)
|
||||
{
|
||||
pthread_mutex_lock(&arc_lock);
|
||||
}
|
||||
|
||||
void _ARC4_UNLOCK(void)
|
||||
{
|
||||
pthread_mutex_unlock(&arc_lock);
|
||||
}
|
||||
#elif defined(GETDNS_ON_WINDOWS)
|
||||
/*
|
||||
* There is no explicit arc4random_init call, and thus
|
||||
* the critical section must be allocated on the first call to
|
||||
* ARC4_LOCK(). The interlocked test is used to verify that
|
||||
* the critical section will be allocated only once.
|
||||
*
|
||||
* The work around is for the main program to call arc4random()
|
||||
* at the beginning of execution, before spinning new threads.
|
||||
*
|
||||
* There is also no explicit arc4random_close call, and thus
|
||||
* the critical section is never deleted. It will remain allocated
|
||||
* as long as the program runs.
|
||||
*/
|
||||
static CRITICAL_SECTION arc_critical_section;
|
||||
static volatile long arc_critical_section_initialized = 0;
|
||||
|
||||
void _ARC4_LOCK(void)
|
||||
{
|
||||
long r = InterlockedCompareExchange(&arc_critical_section_initialized, 1, 0);
|
||||
|
||||
if (r != 2)
|
||||
{
|
||||
if (r == 0)
|
||||
{
|
||||
InitializeCriticalSection(&arc_critical_section);
|
||||
arc_critical_section_initialized = 2;
|
||||
}
|
||||
else if (r == 1)
|
||||
{
|
||||
/*
|
||||
* If the critical section is initialized, the first test
|
||||
* will return the value 2.
|
||||
*
|
||||
* If several threads try to initialize the arc4random
|
||||
* state "at the same time", the first one will find
|
||||
* the "initialized" variable at 0, the other ones at 1.
|
||||
*
|
||||
* Since this is a fairly rare event, we resolve it with a
|
||||
* simple active wait loop.
|
||||
*/
|
||||
|
||||
while (arc_critical_section_initialized != 2)
|
||||
{
|
||||
Sleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EnterCriticalSection(&arc_critical_section);
|
||||
}
|
||||
|
||||
void _ARC4_UNLOCK(void)
|
||||
{
|
||||
LeaveCriticalSection(&arc_critical_section);
|
||||
}
|
||||
|
||||
#else
|
||||
/* XXX - add non pthread specific lock routines here */
|
||||
void _ARC4_LOCK(void)
|
||||
{
|
||||
}
|
||||
|
@ -41,4 +114,4 @@ void _ARC4_LOCK(void)
|
|||
void _ARC4_UNLOCK(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,16 +26,21 @@
|
|||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef GETDNS_ON_WINDOWS
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#ifndef UB_ON_WINDOWS
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#if defined(GETDNS_ON_WINDOWS) && !defined(MAP_INHERIT_ZERO)
|
||||
#define explicit_bzero(rnd, rnd_size) memset(rnd, 0, rnd_size)
|
||||
#endif
|
||||
|
||||
#define KEYSTREAM_ONLY
|
||||
#include "chacha_private.h"
|
||||
|
@ -46,6 +51,9 @@
|
|||
#else /* !__GNUC__ */
|
||||
#define inline
|
||||
#endif /* !__GNUC__ */
|
||||
#ifndef MAP_ANON
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#endif
|
||||
|
||||
#define KEYSZ 32
|
||||
#define IVSZ 8
|
||||
|
@ -66,6 +74,72 @@ static struct {
|
|||
|
||||
static inline void _rs_rekey(u_char *dat, size_t datlen);
|
||||
|
||||
/*
|
||||
* Basic sanity checking; wish we could do better.
|
||||
*/
|
||||
static int
|
||||
fallback_gotdata(char *buf, size_t len)
|
||||
{
|
||||
char any_set = 0;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
any_set |= buf[i];
|
||||
if (any_set == 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* fallback for getentropy in case libc returns failure */
|
||||
static int
|
||||
fallback_getentropy_urandom(void *buf, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
int fd, flags;
|
||||
int save_errno = errno;
|
||||
|
||||
start:
|
||||
|
||||
flags = O_RDONLY;
|
||||
#ifdef O_NOFOLLOW
|
||||
flags |= O_NOFOLLOW;
|
||||
#endif
|
||||
#ifdef O_CLOEXEC
|
||||
flags |= O_CLOEXEC;
|
||||
#endif
|
||||
fd = open("/dev/urandom", flags, 0);
|
||||
if (fd == -1) {
|
||||
if (errno == EINTR)
|
||||
goto start;
|
||||
goto nodevrandom;
|
||||
}
|
||||
#ifndef O_CLOEXEC
|
||||
# ifdef HAVE_FCNTL
|
||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
||||
# endif
|
||||
#endif
|
||||
for (i = 0; i < len; ) {
|
||||
size_t wanted = len - i;
|
||||
ssize_t ret = read(fd, (char*)buf + i, wanted);
|
||||
|
||||
if (ret == -1) {
|
||||
if (errno == EAGAIN || errno == EINTR)
|
||||
continue;
|
||||
close(fd);
|
||||
goto nodevrandom;
|
||||
}
|
||||
i += ret;
|
||||
}
|
||||
close(fd);
|
||||
if (fallback_gotdata(buf, len) == 0) {
|
||||
errno = save_errno;
|
||||
return 0; /* satisfied */
|
||||
}
|
||||
nodevrandom:
|
||||
errno = EIO;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void
|
||||
_rs_init(u_char *buf, size_t n)
|
||||
{
|
||||
|
@ -73,7 +147,7 @@ _rs_init(u_char *buf, size_t n)
|
|||
return;
|
||||
|
||||
if (rs == NULL) {
|
||||
#ifndef UB_ON_WINDOWS
|
||||
#ifndef GETDNS_ON_WINDOWS
|
||||
if ((rs = mmap(NULL, sizeof(*rs), PROT_READ|PROT_WRITE,
|
||||
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
|
||||
abort();
|
||||
|
@ -88,7 +162,7 @@ _rs_init(u_char *buf, size_t n)
|
|||
#endif
|
||||
}
|
||||
if (rsx == NULL) {
|
||||
#ifndef UB_ON_WINDOWS
|
||||
#ifndef GETDNS_ON_WINDOWS
|
||||
if ((rsx = mmap(NULL, sizeof(*rsx), PROT_READ|PROT_WRITE,
|
||||
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
|
||||
abort();
|
||||
|
@ -97,6 +171,9 @@ _rs_init(u_char *buf, size_t n)
|
|||
if(!rsx)
|
||||
abort();
|
||||
#endif
|
||||
/* Pleast older clang scan-build */
|
||||
if (!buf)
|
||||
buf = rsx->rs_buf;
|
||||
}
|
||||
|
||||
chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0);
|
||||
|
@ -109,11 +186,14 @@ _rs_stir(void)
|
|||
u_char rnd[KEYSZ + IVSZ];
|
||||
|
||||
if (getentropy(rnd, sizeof rnd) == -1) {
|
||||
if(errno != ENOSYS ||
|
||||
fallback_getentropy_urandom(rnd, sizeof rnd) == -1) {
|
||||
#ifdef SIGKILL
|
||||
raise(SIGKILL);
|
||||
raise(SIGKILL);
|
||||
#else
|
||||
exit(9); /* windows */
|
||||
exit(9); /* windows */
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (!rs)
|
||||
|
@ -132,7 +212,7 @@ _rs_stir(void)
|
|||
static inline void
|
||||
_rs_stir_if_needed(size_t len)
|
||||
{
|
||||
#ifndef MAP_INHERIT_ZERO
|
||||
#if !defined(GETDNS_ON_WINDOWS) && !defined(MAP_INHERIT_ZERO)
|
||||
static pid_t _rs_pid = 0;
|
||||
pid_t pid = getpid();
|
||||
|
||||
|
|
|
@ -6,17 +6,12 @@
|
|||
#include "config.h"
|
||||
#include <string.h>
|
||||
|
||||
__attribute__((weak)) void
|
||||
__explicit_bzero_hook(void *ATTR_UNUSED(buf), size_t ATTR_UNUSED(len))
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
explicit_bzero(void *buf, size_t len)
|
||||
{
|
||||
#ifdef UB_ON_WINDOWS
|
||||
#ifdef GETDNS_ON_WINDOWS
|
||||
SecureZeroMemory(buf, len);
|
||||
#endif
|
||||
#else
|
||||
memset(buf, 0, len);
|
||||
__explicit_bzero_hook(buf, len);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -46,7 +46,12 @@
|
|||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(HAVE_SSL)
|
||||
#include <openssl/sha.h>
|
||||
#elif defined(HAVE_NETTLE)
|
||||
#include <nettle/sha.h>
|
||||
#endif
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/random.h>
|
||||
|
@ -55,6 +60,9 @@
|
|||
#include <sys/auxv.h>
|
||||
#endif
|
||||
#include <sys/vfs.h>
|
||||
#ifndef MAP_ANON
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#endif
|
||||
|
||||
#define REPEAT 5
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
@ -67,9 +75,21 @@
|
|||
HD(b); \
|
||||
} while (0)
|
||||
|
||||
#if defined(HAVE_SSL)
|
||||
#define CRYPTO_SHA512_CTX SHA512_CTX
|
||||
#define CRYPTO_SHA512_INIT(x) SHA512_Init(x)
|
||||
#define CRYPTO_SHA512_FINAL(r, c) SHA512_Final(r, c)
|
||||
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
|
||||
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
|
||||
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
|
||||
#elif defined(HAVE_NETTLE)
|
||||
#define CRYPTO_SHA512_CTX struct sha512_ctx
|
||||
#define CRYPTO_SHA512_INIT(x) sha512_init(x)
|
||||
#define CRYPTO_SHA512_FINAL(r, c) sha512_digest(c, SHA512_DIGEST_SIZE, r)
|
||||
#define HR(x, l) (sha512_update(&ctx, (l), (uint8_t *)(x)))
|
||||
#define HD(x) (sha512_update(&ctx, sizeof (x), (uint8_t *)&(x)))
|
||||
#define HF(x) (sha512_update(&ctx, sizeof (void*), (uint8_t *)&(x)))
|
||||
#endif
|
||||
|
||||
int getentropy(void *buf, size_t len);
|
||||
|
||||
|
@ -77,7 +97,7 @@ int getentropy(void *buf, size_t len);
|
|||
extern int main(int, char *argv[]);
|
||||
#endif
|
||||
static int gotdata(char *buf, size_t len);
|
||||
#ifdef SYS_getrandom
|
||||
#if defined(SYS_getrandom) && defined(__NR_getrandom)
|
||||
static int getentropy_getrandom(void *buf, size_t len);
|
||||
#endif
|
||||
static int getentropy_urandom(void *buf, size_t len);
|
||||
|
@ -96,7 +116,7 @@ getentropy(void *buf, size_t len)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef SYS_getrandom
|
||||
#if defined(SYS_getrandom) && defined(__NR_getrandom)
|
||||
/*
|
||||
* Try descriptor-less getrandom()
|
||||
*/
|
||||
|
@ -122,7 +142,7 @@ getentropy(void *buf, size_t len)
|
|||
* Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID.
|
||||
* sysctl is a failsafe API, so it guarantees a result. This
|
||||
* should work inside a chroot, or when file descriptors are
|
||||
* exhuasted.
|
||||
* exhausted.
|
||||
*
|
||||
* However this can fail if the Linux kernel removes support
|
||||
* for sysctl. Starting in 2007, there have been efforts to
|
||||
|
@ -192,7 +212,7 @@ gotdata(char *buf, size_t len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef SYS_getrandom
|
||||
#if defined(SYS_getrandom) && defined(__NR_getrandom)
|
||||
static int
|
||||
getentropy_getrandom(void *buf, size_t len)
|
||||
{
|
||||
|
@ -337,7 +357,7 @@ getentropy_fallback(void *buf, size_t len)
|
|||
struct rusage ru;
|
||||
sigset_t sigset;
|
||||
struct stat st;
|
||||
SHA512_CTX ctx;
|
||||
CRYPTO_SHA512_CTX ctx;
|
||||
static pid_t lastpid;
|
||||
pid_t pid;
|
||||
size_t i, ii, m;
|
||||
|
@ -354,7 +374,7 @@ getentropy_fallback(void *buf, size_t len)
|
|||
}
|
||||
for (i = 0; i < len; ) {
|
||||
int j;
|
||||
SHA512_Init(&ctx);
|
||||
CRYPTO_SHA512_INIT(&ctx);
|
||||
for (j = 0; j < repeat; j++) {
|
||||
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
|
||||
if (e != -1) {
|
||||
|
@ -526,7 +546,7 @@ getentropy_fallback(void *buf, size_t len)
|
|||
# endif
|
||||
#endif /* HAVE_GETAUXVAL */
|
||||
|
||||
SHA512_Final(results, &ctx);
|
||||
CRYPTO_SHA512_FINAL(results, &ctx);
|
||||
memcpy((char*)buf + i, results, min(sizeof(results), len - i));
|
||||
i += min(sizeof(results), len - i);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -39,10 +41,14 @@
|
|||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#ifdef HAVE_SYS_SHA2_H
|
||||
#include <sys/sha2.h>
|
||||
#define SHA512_Init SHA512Init
|
||||
#define SHA512_Update SHA512Update
|
||||
#define SHA512_Final SHA512Final
|
||||
#else
|
||||
#include "openssl/sha.h"
|
||||
#endif
|
||||
|
||||
#include <sys/vfs.h>
|
||||
#include <sys/statfs.h>
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Christian Huitema <huitema@huitema.net>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Numerous places in the code make reference to the Unix/Linux
|
||||
* "gettimeofday()" function, which is not available in the standard
|
||||
* windows libraries. This code provides a compatible implementation.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
|
||||
int gettimeofday(struct timeval* tv, void* tz)
|
||||
{
|
||||
FILETIME ft;
|
||||
uint64_t now = 0;
|
||||
|
||||
/*
|
||||
* The GetSystemTimeAsFileTime API returns the number
|
||||
* of 100-nanosecond intervals since January 1, 1601 (UTC),
|
||||
* in FILETIME format.
|
||||
*/
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
/*
|
||||
* Convert to plain 64 bit format, without making
|
||||
* assumptions about the FILETIME structure alignment.
|
||||
*/
|
||||
now |= ft.dwHighDateTime;
|
||||
now <<= 32;
|
||||
now |= ft.dwLowDateTime;
|
||||
/*
|
||||
* Convert units from 100ns to 1us
|
||||
*/
|
||||
now /= 10;
|
||||
/*
|
||||
* Account for microseconds elapsed between 1601 and 1970.
|
||||
*/
|
||||
now -= 11644473600000000ULL;
|
||||
|
||||
if (tv != NULL)
|
||||
{
|
||||
uint64_t sec = now / 1000000;
|
||||
uint64_t usec = now % 1000000;
|
||||
|
||||
tv->tv_sec = (long)sec;
|
||||
tv->tv_usec = (long)usec;
|
||||
}
|
||||
|
||||
if (tz != NULL)
|
||||
{
|
||||
/*
|
||||
* TODO: implement a timezone retrieval function.
|
||||
* Not urgent, since the GetDNS code always set this parameter to NULL.
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_GETTIMEOFDAY */
|
|
@ -0,0 +1,214 @@
|
|||
/* From openssh 4.3p2 compat/inet_ntop.c */
|
||||
/* Copyright (c) 1996 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* OPENBSD ORIGINAL: lib/libc/net/inet_ntop.c */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef IN6ADDRSZ
|
||||
#define IN6ADDRSZ 16 /* IPv6 T_AAAA */
|
||||
#endif
|
||||
|
||||
#ifndef INT16SZ
|
||||
#define INT16SZ 2 /* for systems without 16-bit ints */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
*/
|
||||
|
||||
static const char *inet_ntop4(const u_char *src, char *dst, size_t size);
|
||||
static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
|
||||
|
||||
/* char *
|
||||
* inet_ntop(af, src, dst, size)
|
||||
* convert a network format address to presentation format.
|
||||
* return:
|
||||
* pointer to presentation format address (`dst'), or NULL (see errno).
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
const char *
|
||||
inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_ntop4(src, dst, size));
|
||||
case AF_INET6:
|
||||
return (inet_ntop6(src, dst, size));
|
||||
default:
|
||||
#ifdef EAFNOSUPPORT
|
||||
errno = EAFNOSUPPORT;
|
||||
#else
|
||||
errno = ENOSYS;
|
||||
#endif
|
||||
return (NULL);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
/* const char *
|
||||
* inet_ntop4(src, dst, size)
|
||||
* format an IPv4 address, more or less like inet_ntoa()
|
||||
* return:
|
||||
* `dst' (as a const)
|
||||
* notes:
|
||||
* (1) uses no statics
|
||||
* (2) takes a u_char* not an in_addr as input
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
static const char *
|
||||
inet_ntop4(const u_char *src, char *dst, size_t size)
|
||||
{
|
||||
static const char fmt[] = "%u.%u.%u.%u";
|
||||
char tmp[sizeof "255.255.255.255"];
|
||||
int l;
|
||||
|
||||
l = snprintf(tmp, size, fmt, src[0], src[1], src[2], src[3]);
|
||||
if (l <= 0 || l >= (int)size) {
|
||||
errno = ENOSPC;
|
||||
return (NULL);
|
||||
}
|
||||
strlcpy(dst, tmp, size);
|
||||
return (dst);
|
||||
}
|
||||
|
||||
/* const char *
|
||||
* inet_ntop6(src, dst, size)
|
||||
* convert IPv6 binary address into presentation (printable) format
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
static const char *
|
||||
inet_ntop6(const u_char *src, char *dst, size_t size)
|
||||
{
|
||||
/*
|
||||
* Note that int32_t and int16_t need only be "at least" large enough
|
||||
* to contain a value of the specified size. On some systems, like
|
||||
* Crays, there is no such thing as an integer variable with 16 bits.
|
||||
* Keep this in mind if you think this function should have been coded
|
||||
* to use pointer overlays. All the world's not a VAX.
|
||||
*/
|
||||
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
|
||||
char *tp, *ep;
|
||||
struct { int base, len; } best, cur;
|
||||
u_int words[IN6ADDRSZ / INT16SZ];
|
||||
int i;
|
||||
int advance;
|
||||
|
||||
/*
|
||||
* Preprocess:
|
||||
* Copy the input (bytewise) array into a wordwise array.
|
||||
* Find the longest run of 0x00's in src[] for :: shorthanding.
|
||||
*/
|
||||
memset(words, '\0', sizeof words);
|
||||
for (i = 0; i < IN6ADDRSZ; i++)
|
||||
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
|
||||
best.base = -1;
|
||||
best.len = 0;
|
||||
cur.base = -1;
|
||||
cur.len = 0;
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
if (words[i] == 0) {
|
||||
if (cur.base == -1)
|
||||
cur.base = i, cur.len = 1;
|
||||
else
|
||||
cur.len++;
|
||||
} else {
|
||||
if (cur.base != -1) {
|
||||
if (best.base == -1 || cur.len > best.len)
|
||||
best = cur;
|
||||
cur.base = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cur.base != -1) {
|
||||
if (best.base == -1 || cur.len > best.len)
|
||||
best = cur;
|
||||
}
|
||||
if (best.base != -1 && best.len < 2)
|
||||
best.base = -1;
|
||||
|
||||
/*
|
||||
* Format the result.
|
||||
*/
|
||||
tp = tmp;
|
||||
ep = tmp + sizeof(tmp);
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ) && tp < ep; i++) {
|
||||
/* Are we inside the best run of 0x00's? */
|
||||
if (best.base != -1 && i >= best.base &&
|
||||
i < (best.base + best.len)) {
|
||||
if (i == best.base) {
|
||||
if (tp + 1 >= ep)
|
||||
return (NULL);
|
||||
*tp++ = ':';
|
||||
}
|
||||
continue;
|
||||
}
|
||||
/* Are we following an initial run of 0x00s or any real hex? */
|
||||
if (i != 0) {
|
||||
if (tp + 1 >= ep)
|
||||
return (NULL);
|
||||
*tp++ = ':';
|
||||
}
|
||||
/* Is this address an encapsulated IPv4? */
|
||||
if (i == 6 && best.base == 0 &&
|
||||
(best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
|
||||
if (!inet_ntop4(src+12, tp, (size_t)(ep - tp)))
|
||||
return (NULL);
|
||||
tp += strlen(tp);
|
||||
break;
|
||||
}
|
||||
advance = snprintf(tp, ep - tp, "%x", words[i]);
|
||||
if (advance <= 0 || advance >= ep - tp)
|
||||
return (NULL);
|
||||
tp += advance;
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ)) {
|
||||
if (tp + 1 >= ep)
|
||||
return (NULL);
|
||||
*tp++ = ':';
|
||||
}
|
||||
if (tp + 1 >= ep)
|
||||
return (NULL);
|
||||
*tp++ = '\0';
|
||||
|
||||
/*
|
||||
* Check for overflow, copy, and we're done.
|
||||
*/
|
||||
if ((size_t)(tp - tmp) > size) {
|
||||
errno = ENOSPC;
|
||||
return (NULL);
|
||||
}
|
||||
strlcpy(dst, tmp, size);
|
||||
return (dst);
|
||||
}
|
|
@ -0,0 +1,229 @@
|
|||
/* $KAME: inet_pton.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
|
||||
|
||||
/* Copyright (c) 1996 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
*/
|
||||
|
||||
static int inet_pton4 (const char *src, uint8_t *dst);
|
||||
static int inet_pton6 (const char *src, uint8_t *dst);
|
||||
|
||||
/*
|
||||
*
|
||||
* The definitions we might miss.
|
||||
*
|
||||
*/
|
||||
#ifndef NS_INT16SZ
|
||||
#define NS_INT16SZ 2
|
||||
#endif
|
||||
|
||||
#ifndef NS_IN6ADDRSZ
|
||||
#define NS_IN6ADDRSZ 16
|
||||
#endif
|
||||
|
||||
#ifndef NS_INADDRSZ
|
||||
#define NS_INADDRSZ 4
|
||||
#endif
|
||||
|
||||
/* int
|
||||
* inet_pton(af, src, dst)
|
||||
* convert from presentation format (which usually means ASCII printable)
|
||||
* to network format (which is usually some kind of binary format).
|
||||
* return:
|
||||
* 1 if the address was valid for the specified address family
|
||||
* 0 if the address wasn't valid (`dst' is untouched in this case)
|
||||
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
int
|
||||
inet_pton(af, src, dst)
|
||||
int af;
|
||||
const char *src;
|
||||
void *dst;
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_pton4(src, dst));
|
||||
case AF_INET6:
|
||||
return (inet_pton6(src, dst));
|
||||
default:
|
||||
#ifdef EAFNOSUPPORT
|
||||
errno = EAFNOSUPPORT;
|
||||
#else
|
||||
errno = ENOSYS;
|
||||
#endif
|
||||
return (-1);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
/* int
|
||||
* inet_pton4(src, dst)
|
||||
* like inet_aton() but without all the hexadecimal and shorthand.
|
||||
* return:
|
||||
* 1 if `src' is a valid dotted quad, else 0.
|
||||
* notice:
|
||||
* does not touch `dst' unless it's returning 1.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
static int
|
||||
inet_pton4(src, dst)
|
||||
const char *src;
|
||||
uint8_t *dst;
|
||||
{
|
||||
static const char digits[] = "0123456789";
|
||||
int saw_digit, octets, ch;
|
||||
uint8_t tmp[NS_INADDRSZ], *tp;
|
||||
|
||||
saw_digit = 0;
|
||||
octets = 0;
|
||||
*(tp = tmp) = 0;
|
||||
while ((ch = *src++) != '\0') {
|
||||
const char *pch;
|
||||
|
||||
if ((pch = strchr(digits, ch)) != NULL) {
|
||||
uint32_t new = *tp * 10 + (pch - digits);
|
||||
|
||||
if (new > 255)
|
||||
return (0);
|
||||
*tp = new;
|
||||
if (! saw_digit) {
|
||||
if (++octets > 4)
|
||||
return (0);
|
||||
saw_digit = 1;
|
||||
}
|
||||
} else if (ch == '.' && saw_digit) {
|
||||
if (octets == 4)
|
||||
return (0);
|
||||
*++tp = 0;
|
||||
saw_digit = 0;
|
||||
} else
|
||||
return (0);
|
||||
}
|
||||
if (octets < 4)
|
||||
return (0);
|
||||
|
||||
memcpy(dst, tmp, NS_INADDRSZ);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/* int
|
||||
* inet_pton6(src, dst)
|
||||
* convert presentation level address to network order binary form.
|
||||
* return:
|
||||
* 1 if `src' is a valid [RFC1884 2.2] address, else 0.
|
||||
* notice:
|
||||
* (1) does not touch `dst' unless it's returning 1.
|
||||
* (2) :: in a full address is silently ignored.
|
||||
* credit:
|
||||
* inspired by Mark Andrews.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
static int
|
||||
inet_pton6(src, dst)
|
||||
const char *src;
|
||||
uint8_t *dst;
|
||||
{
|
||||
static const char xdigits_l[] = "0123456789abcdef",
|
||||
xdigits_u[] = "0123456789ABCDEF";
|
||||
uint8_t tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
|
||||
const char *xdigits, *curtok;
|
||||
int ch, saw_xdigit;
|
||||
uint32_t val;
|
||||
|
||||
memset((tp = tmp), '\0', NS_IN6ADDRSZ);
|
||||
endp = tp + NS_IN6ADDRSZ;
|
||||
colonp = NULL;
|
||||
/* Leading :: requires some special handling. */
|
||||
if (*src == ':')
|
||||
if (*++src != ':')
|
||||
return (0);
|
||||
curtok = src;
|
||||
saw_xdigit = 0;
|
||||
val = 0;
|
||||
while ((ch = *src++) != '\0') {
|
||||
const char *pch;
|
||||
|
||||
if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
|
||||
pch = strchr((xdigits = xdigits_u), ch);
|
||||
if (pch != NULL) {
|
||||
val <<= 4;
|
||||
val |= (pch - xdigits);
|
||||
if (val > 0xffff)
|
||||
return (0);
|
||||
saw_xdigit = 1;
|
||||
continue;
|
||||
}
|
||||
if (ch == ':') {
|
||||
curtok = src;
|
||||
if (!saw_xdigit) {
|
||||
if (colonp)
|
||||
return (0);
|
||||
colonp = tp;
|
||||
continue;
|
||||
}
|
||||
if (tp + NS_INT16SZ > endp)
|
||||
return (0);
|
||||
*tp++ = (uint8_t) (val >> 8) & 0xff;
|
||||
*tp++ = (uint8_t) val & 0xff;
|
||||
saw_xdigit = 0;
|
||||
val = 0;
|
||||
continue;
|
||||
}
|
||||
if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
|
||||
inet_pton4(curtok, tp) > 0) {
|
||||
tp += NS_INADDRSZ;
|
||||
saw_xdigit = 0;
|
||||
break; /* '\0' was seen by inet_pton4(). */
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
if (saw_xdigit) {
|
||||
if (tp + NS_INT16SZ > endp)
|
||||
return (0);
|
||||
*tp++ = (uint8_t) (val >> 8) & 0xff;
|
||||
*tp++ = (uint8_t) val & 0xff;
|
||||
}
|
||||
if (colonp != NULL) {
|
||||
/*
|
||||
* Since some memmove()'s erroneously fail to handle
|
||||
* overlapping regions, we'll do the shift by hand.
|
||||
*/
|
||||
const int n = tp - colonp;
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= n; i++) {
|
||||
endp[- i] = colonp[n - i];
|
||||
colonp[n - i] = 0;
|
||||
}
|
||||
tp = endp;
|
||||
}
|
||||
if (tp != endp)
|
||||
return (0);
|
||||
memcpy(dst, tmp, NS_IN6ADDRSZ);
|
||||
return (1);
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* \file mkstemp.c
|
||||
* @brief Implementation of mkstemp for Windows.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019 Sinodun
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the names of the copyright holders nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int mkstemp(char *template)
|
||||
{
|
||||
if (_mktemp_s(template, strlen(template) + 1) != 0)
|
||||
return -1;
|
||||
return open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD);
|
||||
}
|
|
@ -70,7 +70,7 @@ unsigned char *SHA512(void *data, unsigned int data_len, unsigned char *digest);
|
|||
* Please make sure that your system defines BYTE_ORDER. If your
|
||||
* architecture is little-endian, make sure it also defines
|
||||
* LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
|
||||
* equivilent.
|
||||
* equivalent.
|
||||
*
|
||||
* If your system does not define the above, then you can do so by
|
||||
* hand like this:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
/* OPENBSD ORIGINAL: lib/libc/string/strlcpy.c */
|
||||
|
||||
#include <config.h>
|
||||
#ifndef HAVE_STRLCPY
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
@ -53,5 +52,3 @@ strlcpy(char *dst, const char *src, size_t siz)
|
|||
|
||||
return(s - src - 1); /* count does not include NUL */
|
||||
}
|
||||
|
||||
#endif /* !HAVE_STRLCPY */
|
||||
|
|
|
@ -0,0 +1,345 @@
|
|||
/** strptime workaround (for oa macos leopard)
|
||||
* This strptime follows the man strptime (2001-11-12)
|
||||
* conforming to SUSv2, POSIX.1-2001
|
||||
*
|
||||
* This very simple version of strptime has no:
|
||||
* - E alternatives
|
||||
* - O alternatives
|
||||
* - Glibc additions
|
||||
* - Does not process week numbers
|
||||
* - Does not properly processes year day
|
||||
*
|
||||
* LICENSE
|
||||
* Copyright (c) 2008, NLnet Labs, Matthijs Mekking
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NLnetLabs nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
**/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_CONFIG_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#ifndef STRPTIME_WORKS
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
static const char *abb_weekdays[] = {
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL
|
||||
};
|
||||
static const char *full_weekdays[] = {
|
||||
"Sunday", "Monday", "Tuesday", "Wednesday",
|
||||
"Thursday", "Friday", "Saturday", NULL
|
||||
};
|
||||
static const char *abb_months[] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL
|
||||
};
|
||||
static const char *full_months[] = {
|
||||
"January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December", NULL
|
||||
};
|
||||
static const char *ampm[] = {
|
||||
"am", "pm", NULL
|
||||
};
|
||||
|
||||
static int
|
||||
match_string(const char **buf, const char **strs)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; strs[i] != NULL; i++) {
|
||||
int len = strlen(strs[i]);
|
||||
if (strncasecmp (*buf, strs[i], len) == 0) {
|
||||
*buf += len;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
str2int(const char **buf, int max)
|
||||
{
|
||||
int ret=0, count=0;
|
||||
|
||||
while (*buf[0] != '\0' && isdigit((unsigned char)*buf[0]) && count<max) {
|
||||
ret = ret*10 + (*buf[0] - '0');
|
||||
(*buf)++;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (!count)
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Converts the character string s to values which are stored in tm
|
||||
* using the format specified by format
|
||||
**/
|
||||
char *
|
||||
unbound_strptime(const char *s, const char *format, struct tm *tm)
|
||||
{
|
||||
int c, ret;
|
||||
int split_year = 0;
|
||||
|
||||
while ((c = *format) != '\0') {
|
||||
/* whitespace, literal or format */
|
||||
if (isspace((unsigned char)c)) { /* whitespace */
|
||||
/** whitespace matches zero or more whitespace characters in the
|
||||
* input string.
|
||||
**/
|
||||
while (isspace((unsigned char)*s))
|
||||
s++;
|
||||
}
|
||||
else if (c == '%') { /* format */
|
||||
format++;
|
||||
c = *format;
|
||||
switch (c) {
|
||||
case '%': /* %% is converted to % */
|
||||
if (*s != c) {
|
||||
return NULL;
|
||||
}
|
||||
s++;
|
||||
break;
|
||||
case 'a': /* weekday name, abbreviated or full */
|
||||
case 'A':
|
||||
ret = match_string(&s, full_weekdays);
|
||||
if (ret < 0)
|
||||
ret = match_string(&s, abb_weekdays);
|
||||
if (ret < 0) {
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_wday = ret;
|
||||
break;
|
||||
case 'b': /* month name, abbreviated or full */
|
||||
case 'B':
|
||||
case 'h':
|
||||
ret = match_string(&s, full_months);
|
||||
if (ret < 0)
|
||||
ret = match_string(&s, abb_months);
|
||||
if (ret < 0) {
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_mon = ret;
|
||||
break;
|
||||
case 'c': /* date and time representation */
|
||||
if (!(s = unbound_strptime(s, "%x %X", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'C': /* century number */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 0 || ret > 99) { /* must be in [00,99] */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (split_year) {
|
||||
tm->tm_year = ret*100 + (tm->tm_year%100);
|
||||
}
|
||||
else {
|
||||
tm->tm_year = ret*100 - TM_YEAR_BASE;
|
||||
split_year = 1;
|
||||
}
|
||||
break;
|
||||
case 'd': /* day of month */
|
||||
case 'e':
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 1 || ret > 31) { /* must be in [01,31] */
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_mday = ret;
|
||||
break;
|
||||
case 'D': /* equivalent to %m/%d/%y */
|
||||
if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'H': /* hour */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 0 || ret > 23) { /* must be in [00,23] */
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_hour = ret;
|
||||
break;
|
||||
case 'I': /* 12hr clock hour */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 1 || ret > 12) { /* must be in [01,12] */
|
||||
return NULL;
|
||||
}
|
||||
if (ret == 12) /* actually [0,11] */
|
||||
ret = 0;
|
||||
tm->tm_hour = ret;
|
||||
break;
|
||||
case 'j': /* day of year */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 1 || ret > 366) { /* must be in [001,366] */
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_yday = ret;
|
||||
break;
|
||||
case 'm': /* month */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 1 || ret > 12) { /* must be in [01,12] */
|
||||
return NULL;
|
||||
}
|
||||
/* months go from 0-11 */
|
||||
tm->tm_mon = (ret-1);
|
||||
break;
|
||||
case 'M': /* minute */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 0 || ret > 59) { /* must be in [00,59] */
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_min = ret;
|
||||
break;
|
||||
case 'n': /* arbitrary whitespace */
|
||||
case 't':
|
||||
while (isspace((unsigned char)*s))
|
||||
s++;
|
||||
break;
|
||||
case 'p': /* am pm */
|
||||
ret = match_string(&s, ampm);
|
||||
if (ret < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (tm->tm_hour < 0 || tm->tm_hour > 11) { /* %I */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ret == 1) /* pm */
|
||||
tm->tm_hour += 12;
|
||||
break;
|
||||
case 'r': /* equivalent of %I:%M:%S %p */
|
||||
if (!(s = unbound_strptime(s, "%I:%M:%S %p", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'R': /* equivalent of %H:%M */
|
||||
if (!(s = unbound_strptime(s, "%H:%M", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'S': /* seconds */
|
||||
ret = str2int(&s, 2);
|
||||
/* 60 may occur for leap seconds */
|
||||
/* earlier 61 was also allowed */
|
||||
if (ret < 0 || ret > 60) { /* must be in [00,60] */
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_sec = ret;
|
||||
break;
|
||||
case 'T': /* equivalent of %H:%M:%S */
|
||||
if (!(s = unbound_strptime(s, "%H:%M:%S", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'U': /* week number, with the first Sun of Jan being w1 */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 0 || ret > 53) { /* must be in [00,53] */
|
||||
return NULL;
|
||||
}
|
||||
/** it is hard (and not necessary for nsd) to determine time
|
||||
* data from week number.
|
||||
**/
|
||||
break;
|
||||
case 'w': /* day of week */
|
||||
ret = str2int(&s, 1);
|
||||
if (ret < 0 || ret > 6) { /* must be in [0,6] */
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_wday = ret;
|
||||
break;
|
||||
case 'W': /* week number, with the first Mon of Jan being w1 */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 0 || ret > 53) { /* must be in [00,53] */
|
||||
return NULL;
|
||||
}
|
||||
/** it is hard (and not necessary for nsd) to determine time
|
||||
* data from week number.
|
||||
**/
|
||||
break;
|
||||
case 'x': /* date format */
|
||||
if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'X': /* time format */
|
||||
if (!(s = unbound_strptime(s, "%H:%M:%S", tm))) {
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'y': /* last two digits of a year */
|
||||
ret = str2int(&s, 2);
|
||||
if (ret < 0 || ret > 99) { /* must be in [00,99] */
|
||||
return NULL;
|
||||
}
|
||||
if (split_year) {
|
||||
tm->tm_year = ((tm->tm_year/100) * 100) + ret;
|
||||
}
|
||||
else {
|
||||
split_year = 1;
|
||||
|
||||
/** currently:
|
||||
* if in [0,68] we are in 21th century,
|
||||
* if in [69,99] we are in 20th century.
|
||||
**/
|
||||
if (ret < 69) /* 2000 */
|
||||
ret += 100;
|
||||
tm->tm_year = ret;
|
||||
}
|
||||
break;
|
||||
case 'Y': /* year */
|
||||
ret = str2int(&s, 4);
|
||||
if (ret < 0 || ret > 9999) {
|
||||
return NULL;
|
||||
}
|
||||
tm->tm_year = ret - TM_YEAR_BASE;
|
||||
break;
|
||||
case '\0':
|
||||
default: /* unsupported, cannot match format */
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { /* literal */
|
||||
/* if input cannot match format, return NULL */
|
||||
if (*s != c)
|
||||
return NULL;
|
||||
s++;
|
||||
}
|
||||
|
||||
format++;
|
||||
}
|
||||
|
||||
/* return pointer to remainder of s */
|
||||
return (char*) s;
|
||||
}
|
||||
|
||||
#endif /* STRPTIME_WORKS */
|
375
src/config.h.in
375
src/config.h.in
|
@ -1,375 +0,0 @@
|
|||
/* src/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define this to enable the experimental draft edns cookies. */
|
||||
#undef EDNS_COOKIES
|
||||
|
||||
/* The edns cookie option code. */
|
||||
#undef EDNS_COOKIE_OPCODE
|
||||
|
||||
/* How often the edns client cookie is refreshed. */
|
||||
#undef EDNS_COOKIE_ROLLOVER_TIME
|
||||
|
||||
/* Define to 1 if you have the `arc4random' function. */
|
||||
#undef HAVE_ARC4RANDOM
|
||||
|
||||
/* Define to 1 if you have the `arc4random_uniform' function. */
|
||||
#undef HAVE_ARC4RANDOM_UNIFORM
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Whether the C compiler accepts the "format" attribute */
|
||||
#undef HAVE_ATTR_FORMAT
|
||||
|
||||
/* Whether the C compiler accepts the "unused" attribute */
|
||||
#undef HAVE_ATTR_UNUSED
|
||||
|
||||
/* Define to 1 if you have the <bsd/string.h> header file. */
|
||||
#undef HAVE_BSD_STRING_H
|
||||
|
||||
/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_ARC4RANDOM
|
||||
|
||||
/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
|
||||
if you don't. */
|
||||
#undef HAVE_DECL_ARC4RANDOM_UNIFORM
|
||||
|
||||
/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <event2/event.h> header file. */
|
||||
#undef HAVE_EVENT2_EVENT_H
|
||||
|
||||
/* Define to 1 if you have the `event_base_free' function. */
|
||||
#undef HAVE_EVENT_BASE_FREE
|
||||
|
||||
/* Define to 1 if you have the `event_base_new' function. */
|
||||
#undef HAVE_EVENT_BASE_NEW
|
||||
|
||||
/* Define to 1 if you have the <event.h> header file. */
|
||||
#undef HAVE_EVENT_H
|
||||
|
||||
/* Define to 1 if you have the <ev.h> header file. */
|
||||
#undef HAVE_EV_H
|
||||
|
||||
/* Define to 1 if you have the `fcntl' function. */
|
||||
#undef HAVE_FCNTL
|
||||
|
||||
/* Define to 1 if you have the `getauxval' function. */
|
||||
#undef HAVE_GETAUXVAL
|
||||
|
||||
/* Define to 1 if you have the `getentropy' function. */
|
||||
#undef HAVE_GETENTROPY
|
||||
|
||||
/* If you have HMAC_CTX_init */
|
||||
#undef HAVE_HMAC_CTX_INIT
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* if the function 'ioctlsocket' is available */
|
||||
#undef HAVE_IOCTLSOCKET
|
||||
|
||||
/* Define to 1 if you have the <libev/ev.h> header file. */
|
||||
#undef HAVE_LIBEV_EV_H
|
||||
|
||||
/* Define to 1 if you have the `idn' library (-lidn). */
|
||||
#undef HAVE_LIBIDN
|
||||
|
||||
/* Define to 1 if you have the `ldns' library (-lldns). */
|
||||
#undef HAVE_LIBLDNS
|
||||
|
||||
/* Define if you have libssl with tls 1.2 */
|
||||
#undef HAVE_LIBTLS1_2
|
||||
|
||||
/* Define to 1 if you have the `unbound' library (-lunbound). */
|
||||
#undef HAVE_LIBUNBOUND
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Does libuv have the new uv_time_cb signature */
|
||||
#undef HAVE_NEW_UV_TIMER_CB
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/rand.h> header file. */
|
||||
#undef HAVE_OPENSSL_RAND_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define to 1 if you have the `SHA512_Update' function. */
|
||||
#undef HAVE_SHA512_UPDATE
|
||||
|
||||
/* Define if you have the SSL libraries installed. */
|
||||
#undef HAVE_SSL
|
||||
|
||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||
#undef HAVE_STDARG_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the <sys/sha2.h> header file. */
|
||||
#undef HAVE_SYS_SHA2_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
#undef HAVE_SYS_SYSCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the <uv.h> header file. */
|
||||
#undef HAVE_UV_H
|
||||
|
||||
/* When defined ldns_dnssec_zone contained the hashed_names member. */
|
||||
#undef LDNS_DNSSEC_ZONE_HASHED_NAMES
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define this to enable printing of scheduling debugging messages. */
|
||||
#undef SCHED_DEBUG
|
||||
|
||||
/* Define this to enable printing of dnssec debugging messages. */
|
||||
#undef SEC_DEBUG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define this to enable printing of stub debugging messages. */
|
||||
#undef STUB_DEBUG
|
||||
|
||||
/* Define this to enable native stub DNSSEC support. */
|
||||
#undef STUB_NATIVE_DNSSEC
|
||||
|
||||
/* System configuration dir */
|
||||
#undef SYSCONFDIR
|
||||
|
||||
/* Default trust anchor file */
|
||||
#undef TRUST_ANCHOR_FILE
|
||||
|
||||
/* Needed for sync stub resolver functions */
|
||||
#undef USE_MINI_EVENT
|
||||
|
||||
/* Define this to enable TCP fast open. */
|
||||
#undef USE_TCP_FASTOPEN
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT32_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT64_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT8_T
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 16 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint16_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint32_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint64_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint8_t
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#else
|
||||
#define __BSD_VISIBLE 1
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM
|
||||
uint32_t arc4random(void);
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM_UNIFORM) || !HAVE_DECL_ARC4RANDOM_UNIFORM
|
||||
uint32_t arc4random_uniform(uint32_t upper_bound);
|
||||
#endif
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
void explicit_bzero(void* buf, size_t len);
|
||||
int getentropy(void* buf, size_t len);
|
||||
void arc4random_buf(void* buf, size_t n);
|
||||
void _ARC4_LOCK(void);
|
||||
void _ARC4_UNLOCK(void);
|
||||
#endif
|
||||
#ifdef COMPAT_SHA512
|
||||
#ifndef SHA512_DIGEST_LENGTH
|
||||
#define SHA512_BLOCK_LENGTH 128
|
||||
#define SHA512_DIGEST_LENGTH 64
|
||||
#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
|
||||
typedef struct _SHA512_CTX {
|
||||
uint64_t state[8];
|
||||
uint64_t bitcount[2];
|
||||
uint8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
} SHA512_CTX;
|
||||
#endif /* SHA512_DIGEST_LENGTH */
|
||||
void SHA512_Init(SHA512_CTX*);
|
||||
void SHA512_Update(SHA512_CTX*, void*, size_t);
|
||||
void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
|
||||
unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
|
||||
#endif /* COMPAT_SHA512 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Use on-board gldns */
|
||||
#define USE_GLDNS 1
|
||||
#ifdef HAVE_SSL
|
||||
# define GLDNS_BUILD_CONFIG_HAVE_SSL 1
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENSSL_SSL_H
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ATTR_FORMAT
|
||||
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
|
||||
__attribute__ ((format (archetype, string_index, first_to_check)))
|
||||
#else /* !HAVE_ATTR_FORMAT */
|
||||
# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
|
||||
#endif /* !HAVE_ATTR_FORMAT */
|
||||
|
||||
#if defined(DOXYGEN)
|
||||
# define ATTR_UNUSED(x) x
|
||||
#elif defined(__cplusplus)
|
||||
# define ATTR_UNUSED(x)
|
||||
#elif defined(HAVE_ATTR_UNUSED)
|
||||
# define ATTR_UNUSED(x) x __attribute__((unused))
|
||||
#else /* !HAVE_ATTR_UNUSED */
|
||||
# define ATTR_UNUSED(x) x
|
||||
#endif /* !HAVE_ATTR_UNUSED */
|
||||
|
||||
/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#define FD_SET_T (u_int)
|
||||
#else
|
||||
#define FD_SET_T
|
||||
#endif
|
||||
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BSD_STRING_H
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
|
467
src/const-info.c
467
src/const-info.c
|
@ -3,87 +3,132 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include "getdns/getdns.h"
|
||||
#include "getdns/getdns_extra.h"
|
||||
#include "const-info.h"
|
||||
#include <string.h>
|
||||
|
||||
static struct const_info consts_info[] = {
|
||||
{ -1, NULL, "/* <unknown getdns value> */" },
|
||||
{ 0, "GETDNS_RETURN_GOOD", GETDNS_RETURN_GOOD_TEXT },
|
||||
{ 1, "GETDNS_RETURN_GENERIC_ERROR", GETDNS_RETURN_GENERIC_ERROR_TEXT },
|
||||
{ 300, "GETDNS_RETURN_BAD_DOMAIN_NAME", GETDNS_RETURN_BAD_DOMAIN_NAME_TEXT },
|
||||
{ 301, "GETDNS_RETURN_BAD_CONTEXT", GETDNS_RETURN_BAD_CONTEXT_TEXT },
|
||||
{ 302, "GETDNS_RETURN_CONTEXT_UPDATE_FAIL", GETDNS_RETURN_CONTEXT_UPDATE_FAIL_TEXT },
|
||||
{ 303, "GETDNS_RETURN_UNKNOWN_TRANSACTION", GETDNS_RETURN_UNKNOWN_TRANSACTION_TEXT },
|
||||
{ 304, "GETDNS_RETURN_NO_SUCH_LIST_ITEM", GETDNS_RETURN_NO_SUCH_LIST_ITEM_TEXT },
|
||||
{ 305, "GETDNS_RETURN_NO_SUCH_DICT_NAME", GETDNS_RETURN_NO_SUCH_DICT_NAME_TEXT },
|
||||
{ 306, "GETDNS_RETURN_WRONG_TYPE_REQUESTED", GETDNS_RETURN_WRONG_TYPE_REQUESTED_TEXT },
|
||||
{ 307, "GETDNS_RETURN_NO_SUCH_EXTENSION", GETDNS_RETURN_NO_SUCH_EXTENSION_TEXT },
|
||||
{ 308, "GETDNS_RETURN_EXTENSION_MISFORMAT", GETDNS_RETURN_EXTENSION_MISFORMAT_TEXT },
|
||||
{ 309, "GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED", GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED_TEXT },
|
||||
{ 310, "GETDNS_RETURN_MEMORY_ERROR", GETDNS_RETURN_MEMORY_ERROR_TEXT },
|
||||
{ 311, "GETDNS_RETURN_INVALID_PARAMETER", GETDNS_RETURN_INVALID_PARAMETER_TEXT },
|
||||
{ 400, "GETDNS_DNSSEC_SECURE", GETDNS_DNSSEC_SECURE_TEXT },
|
||||
{ 401, "GETDNS_DNSSEC_BOGUS", GETDNS_DNSSEC_BOGUS_TEXT },
|
||||
{ 402, "GETDNS_DNSSEC_INDETERMINATE", GETDNS_DNSSEC_INDETERMINATE_TEXT },
|
||||
{ 403, "GETDNS_DNSSEC_INSECURE", GETDNS_DNSSEC_INSECURE_TEXT },
|
||||
{ 404, "GETDNS_DNSSEC_NOT_PERFORMED", GETDNS_DNSSEC_NOT_PERFORMED_TEXT },
|
||||
{ 500, "GETDNS_NAMESPACE_DNS", GETDNS_NAMESPACE_DNS_TEXT },
|
||||
{ 501, "GETDNS_NAMESPACE_LOCALNAMES", GETDNS_NAMESPACE_LOCALNAMES_TEXT },
|
||||
{ 502, "GETDNS_NAMESPACE_NETBIOS", GETDNS_NAMESPACE_NETBIOS_TEXT },
|
||||
{ 503, "GETDNS_NAMESPACE_MDNS", GETDNS_NAMESPACE_MDNS_TEXT },
|
||||
{ 504, "GETDNS_NAMESPACE_NIS", GETDNS_NAMESPACE_NIS_TEXT },
|
||||
{ 520, "GETDNS_RESOLUTION_STUB", GETDNS_RESOLUTION_STUB_TEXT },
|
||||
{ 521, "GETDNS_RESOLUTION_RECURSING", GETDNS_RESOLUTION_RECURSING_TEXT },
|
||||
{ 530, "GETDNS_REDIRECTS_FOLLOW", GETDNS_REDIRECTS_FOLLOW_TEXT },
|
||||
{ 531, "GETDNS_REDIRECTS_DO_NOT_FOLLOW", GETDNS_REDIRECTS_DO_NOT_FOLLOW_TEXT },
|
||||
{ 540, "GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP", GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP_TEXT },
|
||||
{ 541, "GETDNS_TRANSPORT_UDP_ONLY", GETDNS_TRANSPORT_UDP_ONLY_TEXT },
|
||||
{ 542, "GETDNS_TRANSPORT_TCP_ONLY", GETDNS_TRANSPORT_TCP_ONLY_TEXT },
|
||||
{ 543, "GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 544, "GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 545, "GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 546, "GETDNS_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_STARTTLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 550, "GETDNS_APPEND_NAME_ALWAYS", GETDNS_APPEND_NAME_ALWAYS_TEXT },
|
||||
{ 551, "GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE", GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE_TEXT },
|
||||
{ 552, "GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE", GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE_TEXT },
|
||||
{ 553, "GETDNS_APPEND_NAME_NEVER", GETDNS_APPEND_NAME_NEVER_TEXT },
|
||||
{ 600, "GETDNS_CONTEXT_CODE_NAMESPACES", GETDNS_CONTEXT_CODE_NAMESPACES_TEXT },
|
||||
{ 601, "GETDNS_CONTEXT_CODE_RESOLUTION_TYPE", GETDNS_CONTEXT_CODE_RESOLUTION_TYPE_TEXT },
|
||||
{ 602, "GETDNS_CONTEXT_CODE_FOLLOW_REDIRECTS", GETDNS_CONTEXT_CODE_FOLLOW_REDIRECTS_TEXT },
|
||||
{ 603, "GETDNS_CONTEXT_CODE_UPSTREAM_RECURSIVE_SERVERS", GETDNS_CONTEXT_CODE_UPSTREAM_RECURSIVE_SERVERS_TEXT },
|
||||
{ 604, "GETDNS_CONTEXT_CODE_DNS_ROOT_SERVERS", GETDNS_CONTEXT_CODE_DNS_ROOT_SERVERS_TEXT },
|
||||
{ 605, "GETDNS_CONTEXT_CODE_DNS_TRANSPORT", GETDNS_CONTEXT_CODE_DNS_TRANSPORT_TEXT },
|
||||
{ 606, "GETDNS_CONTEXT_CODE_LIMIT_OUTSTANDING_QUERIES", GETDNS_CONTEXT_CODE_LIMIT_OUTSTANDING_QUERIES_TEXT },
|
||||
{ 607, "GETDNS_CONTEXT_CODE_APPEND_NAME", GETDNS_CONTEXT_CODE_APPEND_NAME_TEXT },
|
||||
{ 608, "GETDNS_CONTEXT_CODE_SUFFIX", GETDNS_CONTEXT_CODE_SUFFIX_TEXT },
|
||||
{ 609, "GETDNS_CONTEXT_CODE_DNSSEC_TRUST_ANCHORS", GETDNS_CONTEXT_CODE_DNSSEC_TRUST_ANCHORS_TEXT },
|
||||
{ 610, "GETDNS_CONTEXT_CODE_EDNS_MAXIMUM_UDP_PAYLOAD_SIZE", GETDNS_CONTEXT_CODE_EDNS_MAXIMUM_UDP_PAYLOAD_SIZE_TEXT },
|
||||
{ 611, "GETDNS_CONTEXT_CODE_EDNS_EXTENDED_RCODE", GETDNS_CONTEXT_CODE_EDNS_EXTENDED_RCODE_TEXT },
|
||||
{ 612, "GETDNS_CONTEXT_CODE_EDNS_VERSION", GETDNS_CONTEXT_CODE_EDNS_VERSION_TEXT },
|
||||
{ 613, "GETDNS_CONTEXT_CODE_EDNS_DO_BIT", GETDNS_CONTEXT_CODE_EDNS_DO_BIT_TEXT },
|
||||
{ 614, "GETDNS_CONTEXT_CODE_DNSSEC_ALLOWED_SKEW", GETDNS_CONTEXT_CODE_DNSSEC_ALLOWED_SKEW_TEXT },
|
||||
{ 615, "GETDNS_CONTEXT_CODE_MEMORY_FUNCTIONS", GETDNS_CONTEXT_CODE_MEMORY_FUNCTIONS_TEXT },
|
||||
{ 616, "GETDNS_CONTEXT_CODE_TIMEOUT", GETDNS_CONTEXT_CODE_TIMEOUT_TEXT },
|
||||
{ 617, "GETDNS_CONTEXT_CODE_IDLE_TIMEOUT", GETDNS_CONTEXT_CODE_IDLE_TIMEOUT_TEXT },
|
||||
{ 700, "GETDNS_CALLBACK_COMPLETE", GETDNS_CALLBACK_COMPLETE_TEXT },
|
||||
{ 701, "GETDNS_CALLBACK_CANCEL", GETDNS_CALLBACK_CANCEL_TEXT },
|
||||
{ 702, "GETDNS_CALLBACK_TIMEOUT", GETDNS_CALLBACK_TIMEOUT_TEXT },
|
||||
{ 703, "GETDNS_CALLBACK_ERROR", GETDNS_CALLBACK_ERROR_TEXT },
|
||||
{ 800, "GETDNS_NAMETYPE_DNS", GETDNS_NAMETYPE_DNS_TEXT },
|
||||
{ 801, "GETDNS_NAMETYPE_WINS", GETDNS_NAMETYPE_WINS_TEXT },
|
||||
{ 900, "GETDNS_RESPSTATUS_GOOD", GETDNS_RESPSTATUS_GOOD_TEXT },
|
||||
{ 901, "GETDNS_RESPSTATUS_NO_NAME", GETDNS_RESPSTATUS_NO_NAME_TEXT },
|
||||
{ 902, "GETDNS_RESPSTATUS_ALL_TIMEOUT", GETDNS_RESPSTATUS_ALL_TIMEOUT_TEXT },
|
||||
{ 903, "GETDNS_RESPSTATUS_NO_SECURE_ANSWERS", GETDNS_RESPSTATUS_NO_SECURE_ANSWERS_TEXT },
|
||||
{ 904, "GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS", GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS_TEXT },
|
||||
{ 1000, "GETDNS_EXTENSION_TRUE", GETDNS_EXTENSION_TRUE_TEXT },
|
||||
{ 1001, "GETDNS_EXTENSION_FALSE", GETDNS_EXTENSION_FALSE_TEXT },
|
||||
{ 1100, "GETDNS_BAD_DNS_CNAME_IN_TARGET", GETDNS_BAD_DNS_CNAME_IN_TARGET_TEXT },
|
||||
{ 1101, "GETDNS_BAD_DNS_ALL_NUMERIC_LABEL", GETDNS_BAD_DNS_ALL_NUMERIC_LABEL_TEXT },
|
||||
{ 1102, "GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE", GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE_TEXT },
|
||||
{ 1200, "GETDNS_TRANSPORT_UDP", GETDNS_TRANSPORT_UDP_TEXT },
|
||||
{ 1201, "GETDNS_TRANSPORT_TCP", GETDNS_TRANSPORT_TCP_TEXT },
|
||||
{ 1202, "GETDNS_TRANSPORT_TLS", GETDNS_TRANSPORT_TLS_TEXT },
|
||||
{ 1203, "GETDNS_TRANSPORT_STARTTLS", GETDNS_TRANSPORT_STARTTLS_TEXT },
|
||||
{ -1, NULL, "/* <unknown getdns value> */" },
|
||||
{ 0, "GETDNS_RETURN_GOOD", GETDNS_RETURN_GOOD_TEXT },
|
||||
{ 1, "GETDNS_RETURN_GENERIC_ERROR", GETDNS_RETURN_GENERIC_ERROR_TEXT },
|
||||
{ 2, "GETDNS_LOG_CRIT", GETDNS_LOG_CRIT_TEXT },
|
||||
{ 3, "GETDNS_LOG_ERR", GETDNS_LOG_ERR_TEXT },
|
||||
{ 4, "GETDNS_LOG_WARNING", GETDNS_LOG_WARNING_TEXT },
|
||||
{ 5, "GETDNS_LOG_NOTICE", GETDNS_LOG_NOTICE_TEXT },
|
||||
{ 6, "GETDNS_LOG_INFO", GETDNS_LOG_INFO_TEXT },
|
||||
{ 7, "GETDNS_LOG_DEBUG", GETDNS_LOG_DEBUG_TEXT },
|
||||
{ 300, "GETDNS_RETURN_BAD_DOMAIN_NAME", GETDNS_RETURN_BAD_DOMAIN_NAME_TEXT },
|
||||
{ 301, "GETDNS_RETURN_BAD_CONTEXT", GETDNS_RETURN_BAD_CONTEXT_TEXT },
|
||||
{ 302, "GETDNS_RETURN_CONTEXT_UPDATE_FAIL", GETDNS_RETURN_CONTEXT_UPDATE_FAIL_TEXT },
|
||||
{ 303, "GETDNS_RETURN_UNKNOWN_TRANSACTION", GETDNS_RETURN_UNKNOWN_TRANSACTION_TEXT },
|
||||
{ 304, "GETDNS_RETURN_NO_SUCH_LIST_ITEM", GETDNS_RETURN_NO_SUCH_LIST_ITEM_TEXT },
|
||||
{ 305, "GETDNS_RETURN_NO_SUCH_DICT_NAME", GETDNS_RETURN_NO_SUCH_DICT_NAME_TEXT },
|
||||
{ 306, "GETDNS_RETURN_WRONG_TYPE_REQUESTED", GETDNS_RETURN_WRONG_TYPE_REQUESTED_TEXT },
|
||||
{ 307, "GETDNS_RETURN_NO_SUCH_EXTENSION", GETDNS_RETURN_NO_SUCH_EXTENSION_TEXT },
|
||||
{ 308, "GETDNS_RETURN_EXTENSION_MISFORMAT", GETDNS_RETURN_EXTENSION_MISFORMAT_TEXT },
|
||||
{ 309, "GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED", GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED_TEXT },
|
||||
{ 310, "GETDNS_RETURN_MEMORY_ERROR", GETDNS_RETURN_MEMORY_ERROR_TEXT },
|
||||
{ 311, "GETDNS_RETURN_INVALID_PARAMETER", GETDNS_RETURN_INVALID_PARAMETER_TEXT },
|
||||
{ 312, "GETDNS_RETURN_NOT_IMPLEMENTED", GETDNS_RETURN_NOT_IMPLEMENTED_TEXT },
|
||||
{ 397, "GETDNS_RETURN_IO_ERROR", GETDNS_RETURN_IO_ERROR_TEXT },
|
||||
{ 398, "GETDNS_RETURN_NO_UPSTREAM_AVAILABLE", GETDNS_RETURN_NO_UPSTREAM_AVAILABLE_TEXT },
|
||||
{ 399, "GETDNS_RETURN_NEED_MORE_SPACE", GETDNS_RETURN_NEED_MORE_SPACE_TEXT },
|
||||
{ 400, "GETDNS_DNSSEC_SECURE", GETDNS_DNSSEC_SECURE_TEXT },
|
||||
{ 401, "GETDNS_DNSSEC_BOGUS", GETDNS_DNSSEC_BOGUS_TEXT },
|
||||
{ 402, "GETDNS_DNSSEC_INDETERMINATE", GETDNS_DNSSEC_INDETERMINATE_TEXT },
|
||||
{ 403, "GETDNS_DNSSEC_INSECURE", GETDNS_DNSSEC_INSECURE_TEXT },
|
||||
{ 404, "GETDNS_DNSSEC_NOT_PERFORMED", GETDNS_DNSSEC_NOT_PERFORMED_TEXT },
|
||||
{ 500, "GETDNS_NAMESPACE_DNS", GETDNS_NAMESPACE_DNS_TEXT },
|
||||
{ 501, "GETDNS_NAMESPACE_LOCALNAMES", GETDNS_NAMESPACE_LOCALNAMES_TEXT },
|
||||
{ 502, "GETDNS_NAMESPACE_NETBIOS", GETDNS_NAMESPACE_NETBIOS_TEXT },
|
||||
{ 503, "GETDNS_NAMESPACE_MDNS", GETDNS_NAMESPACE_MDNS_TEXT },
|
||||
{ 504, "GETDNS_NAMESPACE_NIS", GETDNS_NAMESPACE_NIS_TEXT },
|
||||
{ 520, "GETDNS_RESOLUTION_STUB", GETDNS_RESOLUTION_STUB_TEXT },
|
||||
{ 521, "GETDNS_RESOLUTION_RECURSING", GETDNS_RESOLUTION_RECURSING_TEXT },
|
||||
{ 530, "GETDNS_REDIRECTS_FOLLOW", GETDNS_REDIRECTS_FOLLOW_TEXT },
|
||||
{ 531, "GETDNS_REDIRECTS_DO_NOT_FOLLOW", GETDNS_REDIRECTS_DO_NOT_FOLLOW_TEXT },
|
||||
{ 540, "GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP", GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP_TEXT },
|
||||
{ 541, "GETDNS_TRANSPORT_UDP_ONLY", GETDNS_TRANSPORT_UDP_ONLY_TEXT },
|
||||
{ 542, "GETDNS_TRANSPORT_TCP_ONLY", GETDNS_TRANSPORT_TCP_ONLY_TEXT },
|
||||
{ 543, "GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 544, "GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 545, "GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN", GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN_TEXT },
|
||||
{ 550, "GETDNS_APPEND_NAME_ALWAYS", GETDNS_APPEND_NAME_ALWAYS_TEXT },
|
||||
{ 551, "GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE", GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE_TEXT },
|
||||
{ 552, "GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE", GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE_TEXT },
|
||||
{ 553, "GETDNS_APPEND_NAME_NEVER", GETDNS_APPEND_NAME_NEVER_TEXT },
|
||||
{ 554, "GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST", GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST_TEXT },
|
||||
{ 600, "GETDNS_CONTEXT_CODE_NAMESPACES", GETDNS_CONTEXT_CODE_NAMESPACES_TEXT },
|
||||
{ 601, "GETDNS_CONTEXT_CODE_RESOLUTION_TYPE", GETDNS_CONTEXT_CODE_RESOLUTION_TYPE_TEXT },
|
||||
{ 602, "GETDNS_CONTEXT_CODE_FOLLOW_REDIRECTS", GETDNS_CONTEXT_CODE_FOLLOW_REDIRECTS_TEXT },
|
||||
{ 603, "GETDNS_CONTEXT_CODE_UPSTREAM_RECURSIVE_SERVERS", GETDNS_CONTEXT_CODE_UPSTREAM_RECURSIVE_SERVERS_TEXT },
|
||||
{ 604, "GETDNS_CONTEXT_CODE_DNS_ROOT_SERVERS", GETDNS_CONTEXT_CODE_DNS_ROOT_SERVERS_TEXT },
|
||||
{ 605, "GETDNS_CONTEXT_CODE_DNS_TRANSPORT", GETDNS_CONTEXT_CODE_DNS_TRANSPORT_TEXT },
|
||||
{ 606, "GETDNS_CONTEXT_CODE_LIMIT_OUTSTANDING_QUERIES", GETDNS_CONTEXT_CODE_LIMIT_OUTSTANDING_QUERIES_TEXT },
|
||||
{ 607, "GETDNS_CONTEXT_CODE_APPEND_NAME", GETDNS_CONTEXT_CODE_APPEND_NAME_TEXT },
|
||||
{ 608, "GETDNS_CONTEXT_CODE_SUFFIX", GETDNS_CONTEXT_CODE_SUFFIX_TEXT },
|
||||
{ 609, "GETDNS_CONTEXT_CODE_DNSSEC_TRUST_ANCHORS", GETDNS_CONTEXT_CODE_DNSSEC_TRUST_ANCHORS_TEXT },
|
||||
{ 610, "GETDNS_CONTEXT_CODE_EDNS_MAXIMUM_UDP_PAYLOAD_SIZE", GETDNS_CONTEXT_CODE_EDNS_MAXIMUM_UDP_PAYLOAD_SIZE_TEXT },
|
||||
{ 611, "GETDNS_CONTEXT_CODE_EDNS_EXTENDED_RCODE", GETDNS_CONTEXT_CODE_EDNS_EXTENDED_RCODE_TEXT },
|
||||
{ 612, "GETDNS_CONTEXT_CODE_EDNS_VERSION", GETDNS_CONTEXT_CODE_EDNS_VERSION_TEXT },
|
||||
{ 613, "GETDNS_CONTEXT_CODE_EDNS_DO_BIT", GETDNS_CONTEXT_CODE_EDNS_DO_BIT_TEXT },
|
||||
{ 614, "GETDNS_CONTEXT_CODE_DNSSEC_ALLOWED_SKEW", GETDNS_CONTEXT_CODE_DNSSEC_ALLOWED_SKEW_TEXT },
|
||||
{ 615, "GETDNS_CONTEXT_CODE_MEMORY_FUNCTIONS", GETDNS_CONTEXT_CODE_MEMORY_FUNCTIONS_TEXT },
|
||||
{ 616, "GETDNS_CONTEXT_CODE_TIMEOUT", GETDNS_CONTEXT_CODE_TIMEOUT_TEXT },
|
||||
{ 617, "GETDNS_CONTEXT_CODE_IDLE_TIMEOUT", GETDNS_CONTEXT_CODE_IDLE_TIMEOUT_TEXT },
|
||||
{ 618, "GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION", GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION_TEXT },
|
||||
{ 619, "GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE", GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE_TEXT },
|
||||
{ 620, "GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE", GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE_TEXT },
|
||||
{ 621, "GETDNS_CONTEXT_CODE_PUBKEY_PINSET", GETDNS_CONTEXT_CODE_PUBKEY_PINSET_TEXT },
|
||||
{ 622, "GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS", GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS_TEXT },
|
||||
{ 623, "GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME", GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME_TEXT },
|
||||
{ 624, "GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES", GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES_TEXT },
|
||||
{ 625, "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL", GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL_TEXT },
|
||||
{ 626, "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA", GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA_TEXT },
|
||||
{ 627, "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL", GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL_TEXT },
|
||||
{ 628, "GETDNS_CONTEXT_CODE_APPDATA_DIR", GETDNS_CONTEXT_CODE_APPDATA_DIR_TEXT },
|
||||
{ 629, "GETDNS_CONTEXT_CODE_RESOLVCONF", GETDNS_CONTEXT_CODE_RESOLVCONF_TEXT },
|
||||
{ 630, "GETDNS_CONTEXT_CODE_HOSTS", GETDNS_CONTEXT_CODE_HOSTS_TEXT },
|
||||
{ 631, "GETDNS_CONTEXT_CODE_TLS_CA_PATH", GETDNS_CONTEXT_CODE_TLS_CA_PATH_TEXT },
|
||||
{ 632, "GETDNS_CONTEXT_CODE_TLS_CA_FILE", GETDNS_CONTEXT_CODE_TLS_CA_FILE_TEXT },
|
||||
{ 633, "GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST", GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST_TEXT },
|
||||
{ 634, "GETDNS_CONTEXT_CODE_TLS_CURVES_LIST", GETDNS_CONTEXT_CODE_TLS_CURVES_LIST_TEXT },
|
||||
{ 635, "GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES", GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES_TEXT },
|
||||
{ 636, "GETDNS_CONTEXT_CODE_TLS_MIN_VERSION", GETDNS_CONTEXT_CODE_TLS_MIN_VERSION_TEXT },
|
||||
{ 637, "GETDNS_CONTEXT_CODE_TLS_MAX_VERSION", GETDNS_CONTEXT_CODE_TLS_MAX_VERSION_TEXT },
|
||||
{ 638, "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME", GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME_TEXT },
|
||||
{ 699, "GETDNS_CONTEXT_CODE_MAX_BACKOFF_VALUE", GETDNS_CONTEXT_CODE_MAX_BACKOFF_VALUE_TEXT },
|
||||
{ 700, "GETDNS_CALLBACK_COMPLETE", GETDNS_CALLBACK_COMPLETE_TEXT },
|
||||
{ 701, "GETDNS_CALLBACK_CANCEL", GETDNS_CALLBACK_CANCEL_TEXT },
|
||||
{ 702, "GETDNS_CALLBACK_TIMEOUT", GETDNS_CALLBACK_TIMEOUT_TEXT },
|
||||
{ 703, "GETDNS_CALLBACK_ERROR", GETDNS_CALLBACK_ERROR_TEXT },
|
||||
{ 800, "GETDNS_NAMETYPE_DNS", GETDNS_NAMETYPE_DNS_TEXT },
|
||||
{ 801, "GETDNS_NAMETYPE_WINS", GETDNS_NAMETYPE_WINS_TEXT },
|
||||
{ 900, "GETDNS_RESPSTATUS_GOOD", GETDNS_RESPSTATUS_GOOD_TEXT },
|
||||
{ 901, "GETDNS_RESPSTATUS_NO_NAME", GETDNS_RESPSTATUS_NO_NAME_TEXT },
|
||||
{ 902, "GETDNS_RESPSTATUS_ALL_TIMEOUT", GETDNS_RESPSTATUS_ALL_TIMEOUT_TEXT },
|
||||
{ 903, "GETDNS_RESPSTATUS_NO_SECURE_ANSWERS", GETDNS_RESPSTATUS_NO_SECURE_ANSWERS_TEXT },
|
||||
{ 904, "GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS", GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS_TEXT },
|
||||
{ 1000, "GETDNS_EXTENSION_TRUE", GETDNS_EXTENSION_TRUE_TEXT },
|
||||
{ 1001, "GETDNS_EXTENSION_FALSE", GETDNS_EXTENSION_FALSE_TEXT },
|
||||
{ 1100, "GETDNS_BAD_DNS_CNAME_IN_TARGET", GETDNS_BAD_DNS_CNAME_IN_TARGET_TEXT },
|
||||
{ 1101, "GETDNS_BAD_DNS_ALL_NUMERIC_LABEL", GETDNS_BAD_DNS_ALL_NUMERIC_LABEL_TEXT },
|
||||
{ 1102, "GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE", GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE_TEXT },
|
||||
{ 1200, "GETDNS_TRANSPORT_UDP", GETDNS_TRANSPORT_UDP_TEXT },
|
||||
{ 1201, "GETDNS_TRANSPORT_TCP", GETDNS_TRANSPORT_TCP_TEXT },
|
||||
{ 1202, "GETDNS_TRANSPORT_TLS", GETDNS_TRANSPORT_TLS_TEXT },
|
||||
{ 1300, "GETDNS_AUTHENTICATION_NONE", GETDNS_AUTHENTICATION_NONE_TEXT },
|
||||
{ 1301, "GETDNS_AUTHENTICATION_REQUIRED", GETDNS_AUTHENTICATION_REQUIRED_TEXT },
|
||||
{ 1400, "GETDNS_SSL3", GETDNS_SSL3_TEXT },
|
||||
{ 1401, "GETDNS_TLS1", GETDNS_TLS1_TEXT },
|
||||
{ 1402, "GETDNS_TLS1_1", GETDNS_TLS1_1_TEXT },
|
||||
{ 1403, "GETDNS_TLS1_2", GETDNS_TLS1_2_TEXT },
|
||||
{ 1404, "GETDNS_TLS1_3", GETDNS_TLS1_3_TEXT },
|
||||
{ 8192, "GETDNS_LOG_SYS_STUB", GETDNS_LOG_SYS_STUB_TEXT },
|
||||
{ 12288, "GETDNS_LOG_UPSTREAM_STATS", GETDNS_LOG_UPSTREAM_STATS_TEXT },
|
||||
{ 16384, "GETDNS_LOG_SYS_RECURSING", GETDNS_LOG_SYS_RECURSING_TEXT },
|
||||
{ 24576, "GETDNS_LOG_SYS_RESOLVING", GETDNS_LOG_SYS_RESOLVING_TEXT },
|
||||
{ 32768, "GETDNS_LOG_SYS_ANCHOR", GETDNS_LOG_SYS_ANCHOR_TEXT },
|
||||
};
|
||||
|
||||
static int const_info_cmp(const void *a, const void *b)
|
||||
|
@ -91,7 +136,7 @@ static int const_info_cmp(const void *a, const void *b)
|
|||
return ((struct const_info *) a)->code - ((struct const_info *) b)->code;
|
||||
}
|
||||
struct const_info *
|
||||
priv_getdns_get_const_info(int value)
|
||||
_getdns_get_const_info(int value)
|
||||
{
|
||||
struct const_info key = { value, "", "" };
|
||||
struct const_info *i = bsearch(&key, consts_info,
|
||||
|
@ -114,3 +159,267 @@ getdns_get_errorstr_by_id(uint16_t err)
|
|||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct const_name_info consts_name_info[] = {
|
||||
{ "GETDNS_APPEND_NAME_ALWAYS", 550 },
|
||||
{ "GETDNS_APPEND_NAME_NEVER", 553 },
|
||||
{ "GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE", 552 },
|
||||
{ "GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE", 551 },
|
||||
{ "GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST", 554 },
|
||||
{ "GETDNS_AUTHENTICATION_NONE", 1300 },
|
||||
{ "GETDNS_AUTHENTICATION_REQUIRED", 1301 },
|
||||
{ "GETDNS_BAD_DNS_ALL_NUMERIC_LABEL", 1101 },
|
||||
{ "GETDNS_BAD_DNS_CNAME_IN_TARGET", 1100 },
|
||||
{ "GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE", 1102 },
|
||||
{ "GETDNS_CALLBACK_CANCEL", 701 },
|
||||
{ "GETDNS_CALLBACK_COMPLETE", 700 },
|
||||
{ "GETDNS_CALLBACK_ERROR", 703 },
|
||||
{ "GETDNS_CALLBACK_TIMEOUT", 702 },
|
||||
{ "GETDNS_CONTEXT_CODE_APPDATA_DIR", 628 },
|
||||
{ "GETDNS_CONTEXT_CODE_APPEND_NAME", 607 },
|
||||
{ "GETDNS_CONTEXT_CODE_DNSSEC_ALLOWED_SKEW", 614 },
|
||||
{ "GETDNS_CONTEXT_CODE_DNSSEC_TRUST_ANCHORS", 609 },
|
||||
{ "GETDNS_CONTEXT_CODE_DNS_ROOT_SERVERS", 604 },
|
||||
{ "GETDNS_CONTEXT_CODE_DNS_TRANSPORT", 605 },
|
||||
{ "GETDNS_CONTEXT_CODE_EDNS_CLIENT_SUBNET_PRIVATE", 619 },
|
||||
{ "GETDNS_CONTEXT_CODE_EDNS_DO_BIT", 613 },
|
||||
{ "GETDNS_CONTEXT_CODE_EDNS_EXTENDED_RCODE", 611 },
|
||||
{ "GETDNS_CONTEXT_CODE_EDNS_MAXIMUM_UDP_PAYLOAD_SIZE", 610 },
|
||||
{ "GETDNS_CONTEXT_CODE_EDNS_VERSION", 612 },
|
||||
{ "GETDNS_CONTEXT_CODE_FOLLOW_REDIRECTS", 602 },
|
||||
{ "GETDNS_CONTEXT_CODE_HOSTS", 630 },
|
||||
{ "GETDNS_CONTEXT_CODE_IDLE_TIMEOUT", 617 },
|
||||
{ "GETDNS_CONTEXT_CODE_LIMIT_OUTSTANDING_QUERIES", 606 },
|
||||
{ "GETDNS_CONTEXT_CODE_MAX_BACKOFF_VALUE", 699 },
|
||||
{ "GETDNS_CONTEXT_CODE_MEMORY_FUNCTIONS", 615 },
|
||||
{ "GETDNS_CONTEXT_CODE_NAMESPACES", 600 },
|
||||
{ "GETDNS_CONTEXT_CODE_PUBKEY_PINSET", 621 },
|
||||
{ "GETDNS_CONTEXT_CODE_RESOLUTION_TYPE", 601 },
|
||||
{ "GETDNS_CONTEXT_CODE_RESOLVCONF", 629 },
|
||||
{ "GETDNS_CONTEXT_CODE_ROUND_ROBIN_UPSTREAMS", 622 },
|
||||
{ "GETDNS_CONTEXT_CODE_SUFFIX", 608 },
|
||||
{ "GETDNS_CONTEXT_CODE_TIMEOUT", 616 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_AUTHENTICATION", 618 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_BACKOFF_TIME", 623 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_CA_FILE", 632 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_CA_PATH", 631 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_CIPHERSUITES", 635 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_CIPHER_LIST", 633 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_CONNECTION_RETRIES", 624 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_CURVES_LIST", 634 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_MAX_VERSION", 637 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_MIN_VERSION", 636 },
|
||||
{ "GETDNS_CONTEXT_CODE_TLS_QUERY_PADDING_BLOCKSIZE", 620 },
|
||||
{ "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_BACKOFF_TIME", 638 },
|
||||
{ "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_URL", 625 },
|
||||
{ "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_CA", 626 },
|
||||
{ "GETDNS_CONTEXT_CODE_TRUST_ANCHORS_VERIFY_EMAIL", 627 },
|
||||
{ "GETDNS_CONTEXT_CODE_UPSTREAM_RECURSIVE_SERVERS", 603 },
|
||||
{ "GETDNS_DNSSEC_BOGUS", 401 },
|
||||
{ "GETDNS_DNSSEC_INDETERMINATE", 402 },
|
||||
{ "GETDNS_DNSSEC_INSECURE", 403 },
|
||||
{ "GETDNS_DNSSEC_NOT_PERFORMED", 404 },
|
||||
{ "GETDNS_DNSSEC_SECURE", 400 },
|
||||
{ "GETDNS_EXTENSION_FALSE", 1001 },
|
||||
{ "GETDNS_EXTENSION_TRUE", 1000 },
|
||||
{ "GETDNS_LOG_ALERT", 1 },
|
||||
{ "GETDNS_LOG_CRIT", 2 },
|
||||
{ "GETDNS_LOG_DEBUG", 7 },
|
||||
{ "GETDNS_LOG_EMERG", 0 },
|
||||
{ "GETDNS_LOG_ERR", 3 },
|
||||
{ "GETDNS_LOG_INFO", 6 },
|
||||
{ "GETDNS_LOG_NOTICE", 5 },
|
||||
{ "GETDNS_LOG_SYS_ANCHOR", 32768 },
|
||||
{ "GETDNS_LOG_SYS_RECURSING", 16384 },
|
||||
{ "GETDNS_LOG_SYS_RESOLVING", 24576 },
|
||||
{ "GETDNS_LOG_SYS_STUB", 8192 },
|
||||
{ "GETDNS_LOG_UPSTREAM_STATS", 12288 },
|
||||
{ "GETDNS_LOG_WARNING", 4 },
|
||||
{ "GETDNS_NAMESPACE_DNS", 500 },
|
||||
{ "GETDNS_NAMESPACE_LOCALNAMES", 501 },
|
||||
{ "GETDNS_NAMESPACE_MDNS", 503 },
|
||||
{ "GETDNS_NAMESPACE_NETBIOS", 502 },
|
||||
{ "GETDNS_NAMESPACE_NIS", 504 },
|
||||
{ "GETDNS_NAMETYPE_DNS", 800 },
|
||||
{ "GETDNS_NAMETYPE_WINS", 801 },
|
||||
{ "GETDNS_OPCODE_IQUERY", 1 },
|
||||
{ "GETDNS_OPCODE_NOTIFY", 4 },
|
||||
{ "GETDNS_OPCODE_QUERY", 0 },
|
||||
{ "GETDNS_OPCODE_STATUS", 2 },
|
||||
{ "GETDNS_OPCODE_UPDATE", 5 },
|
||||
{ "GETDNS_RCODE_BADALG", 21 },
|
||||
{ "GETDNS_RCODE_BADCOOKIE", 23 },
|
||||
{ "GETDNS_RCODE_BADKEY", 17 },
|
||||
{ "GETDNS_RCODE_BADMODE", 19 },
|
||||
{ "GETDNS_RCODE_BADNAME", 20 },
|
||||
{ "GETDNS_RCODE_BADSIG", 16 },
|
||||
{ "GETDNS_RCODE_BADTIME", 18 },
|
||||
{ "GETDNS_RCODE_BADTRUNC", 22 },
|
||||
{ "GETDNS_RCODE_BADVERS", 16 },
|
||||
{ "GETDNS_RCODE_FORMERR", 1 },
|
||||
{ "GETDNS_RCODE_NOERROR", 0 },
|
||||
{ "GETDNS_RCODE_NOTAUTH", 9 },
|
||||
{ "GETDNS_RCODE_NOTIMP", 4 },
|
||||
{ "GETDNS_RCODE_NOTZONE", 10 },
|
||||
{ "GETDNS_RCODE_NXDOMAIN", 3 },
|
||||
{ "GETDNS_RCODE_NXRRSET", 8 },
|
||||
{ "GETDNS_RCODE_REFUSED", 5 },
|
||||
{ "GETDNS_RCODE_SERVFAIL", 2 },
|
||||
{ "GETDNS_RCODE_YXDOMAIN", 6 },
|
||||
{ "GETDNS_RCODE_YXRRSET", 7 },
|
||||
{ "GETDNS_REDIRECTS_DO_NOT_FOLLOW", 531 },
|
||||
{ "GETDNS_REDIRECTS_FOLLOW", 530 },
|
||||
{ "GETDNS_RESOLUTION_RECURSING", 521 },
|
||||
{ "GETDNS_RESOLUTION_STUB", 520 },
|
||||
{ "GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS", 904 },
|
||||
{ "GETDNS_RESPSTATUS_ALL_TIMEOUT", 902 },
|
||||
{ "GETDNS_RESPSTATUS_GOOD", 900 },
|
||||
{ "GETDNS_RESPSTATUS_NO_NAME", 901 },
|
||||
{ "GETDNS_RESPSTATUS_NO_SECURE_ANSWERS", 903 },
|
||||
{ "GETDNS_RETURN_BAD_CONTEXT", 301 },
|
||||
{ "GETDNS_RETURN_BAD_DOMAIN_NAME", 300 },
|
||||
{ "GETDNS_RETURN_CONTEXT_UPDATE_FAIL", 302 },
|
||||
{ "GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED", 309 },
|
||||
{ "GETDNS_RETURN_EXTENSION_MISFORMAT", 308 },
|
||||
{ "GETDNS_RETURN_GENERIC_ERROR", 1 },
|
||||
{ "GETDNS_RETURN_GOOD", 0 },
|
||||
{ "GETDNS_RETURN_INVALID_PARAMETER", 311 },
|
||||
{ "GETDNS_RETURN_IO_ERROR", 397 },
|
||||
{ "GETDNS_RETURN_MEMORY_ERROR", 310 },
|
||||
{ "GETDNS_RETURN_NEED_MORE_SPACE", 399 },
|
||||
{ "GETDNS_RETURN_NOT_IMPLEMENTED", 312 },
|
||||
{ "GETDNS_RETURN_NO_SUCH_DICT_NAME", 305 },
|
||||
{ "GETDNS_RETURN_NO_SUCH_EXTENSION", 307 },
|
||||
{ "GETDNS_RETURN_NO_SUCH_LIST_ITEM", 304 },
|
||||
{ "GETDNS_RETURN_NO_UPSTREAM_AVAILABLE", 398 },
|
||||
{ "GETDNS_RETURN_UNKNOWN_TRANSACTION", 303 },
|
||||
{ "GETDNS_RETURN_WRONG_TYPE_REQUESTED", 306 },
|
||||
{ "GETDNS_RRCLASS_ANY", 255 },
|
||||
{ "GETDNS_RRCLASS_CH", 3 },
|
||||
{ "GETDNS_RRCLASS_HS", 4 },
|
||||
{ "GETDNS_RRCLASS_IN", 1 },
|
||||
{ "GETDNS_RRCLASS_NONE", 254 },
|
||||
{ "GETDNS_RRTYPE_A", 1 },
|
||||
{ "GETDNS_RRTYPE_A6", 38 },
|
||||
{ "GETDNS_RRTYPE_AAAA", 28 },
|
||||
{ "GETDNS_RRTYPE_AFSDB", 18 },
|
||||
{ "GETDNS_RRTYPE_AMTRELAY", 260 },
|
||||
{ "GETDNS_RRTYPE_ANY", 255 },
|
||||
{ "GETDNS_RRTYPE_APL", 42 },
|
||||
{ "GETDNS_RRTYPE_ATMA", 34 },
|
||||
{ "GETDNS_RRTYPE_AVC", 258 },
|
||||
{ "GETDNS_RRTYPE_AXFR", 252 },
|
||||
{ "GETDNS_RRTYPE_CAA", 257 },
|
||||
{ "GETDNS_RRTYPE_CDNSKEY", 60 },
|
||||
{ "GETDNS_RRTYPE_CDS", 59 },
|
||||
{ "GETDNS_RRTYPE_CERT", 37 },
|
||||
{ "GETDNS_RRTYPE_CNAME", 5 },
|
||||
{ "GETDNS_RRTYPE_CSYNC", 62 },
|
||||
{ "GETDNS_RRTYPE_DHCID", 49 },
|
||||
{ "GETDNS_RRTYPE_DLV", 32769 },
|
||||
{ "GETDNS_RRTYPE_DNAME", 39 },
|
||||
{ "GETDNS_RRTYPE_DNSKEY", 48 },
|
||||
{ "GETDNS_RRTYPE_DOA", 259 },
|
||||
{ "GETDNS_RRTYPE_DS", 43 },
|
||||
{ "GETDNS_RRTYPE_EID", 31 },
|
||||
{ "GETDNS_RRTYPE_EUI48", 108 },
|
||||
{ "GETDNS_RRTYPE_EUI64", 109 },
|
||||
{ "GETDNS_RRTYPE_GID", 102 },
|
||||
{ "GETDNS_RRTYPE_GPOS", 27 },
|
||||
{ "GETDNS_RRTYPE_HINFO", 13 },
|
||||
{ "GETDNS_RRTYPE_HIP", 55 },
|
||||
{ "GETDNS_RRTYPE_HTTPS", 65 },
|
||||
{ "GETDNS_RRTYPE_IPSECKEY", 45 },
|
||||
{ "GETDNS_RRTYPE_ISDN", 20 },
|
||||
{ "GETDNS_RRTYPE_IXFR", 251 },
|
||||
{ "GETDNS_RRTYPE_KEY", 25 },
|
||||
{ "GETDNS_RRTYPE_KX", 36 },
|
||||
{ "GETDNS_RRTYPE_L32", 105 },
|
||||
{ "GETDNS_RRTYPE_L64", 106 },
|
||||
{ "GETDNS_RRTYPE_LOC", 29 },
|
||||
{ "GETDNS_RRTYPE_LP", 107 },
|
||||
{ "GETDNS_RRTYPE_MAILA", 254 },
|
||||
{ "GETDNS_RRTYPE_MAILB", 253 },
|
||||
{ "GETDNS_RRTYPE_MB", 7 },
|
||||
{ "GETDNS_RRTYPE_MD", 3 },
|
||||
{ "GETDNS_RRTYPE_MF", 4 },
|
||||
{ "GETDNS_RRTYPE_MG", 8 },
|
||||
{ "GETDNS_RRTYPE_MINFO", 14 },
|
||||
{ "GETDNS_RRTYPE_MR", 9 },
|
||||
{ "GETDNS_RRTYPE_MX", 15 },
|
||||
{ "GETDNS_RRTYPE_NAPTR", 35 },
|
||||
{ "GETDNS_RRTYPE_NID", 104 },
|
||||
{ "GETDNS_RRTYPE_NIMLOC", 32 },
|
||||
{ "GETDNS_RRTYPE_NINFO", 56 },
|
||||
{ "GETDNS_RRTYPE_NS", 2 },
|
||||
{ "GETDNS_RRTYPE_NSAP", 22 },
|
||||
{ "GETDNS_RRTYPE_NSAP_PTR", 23 },
|
||||
{ "GETDNS_RRTYPE_NSEC", 47 },
|
||||
{ "GETDNS_RRTYPE_NSEC3", 50 },
|
||||
{ "GETDNS_RRTYPE_NSEC3PARAM", 51 },
|
||||
{ "GETDNS_RRTYPE_NULL", 10 },
|
||||
{ "GETDNS_RRTYPE_NXT", 30 },
|
||||
{ "GETDNS_RRTYPE_OPENPGPKEY", 61 },
|
||||
{ "GETDNS_RRTYPE_OPT", 41 },
|
||||
{ "GETDNS_RRTYPE_PTR", 12 },
|
||||
{ "GETDNS_RRTYPE_PX", 26 },
|
||||
{ "GETDNS_RRTYPE_RKEY", 57 },
|
||||
{ "GETDNS_RRTYPE_RP", 17 },
|
||||
{ "GETDNS_RRTYPE_RRSIG", 46 },
|
||||
{ "GETDNS_RRTYPE_RT", 21 },
|
||||
{ "GETDNS_RRTYPE_SIG", 24 },
|
||||
{ "GETDNS_RRTYPE_SINK", 40 },
|
||||
{ "GETDNS_RRTYPE_SMIMEA", 53 },
|
||||
{ "GETDNS_RRTYPE_SOA", 6 },
|
||||
{ "GETDNS_RRTYPE_SPF", 99 },
|
||||
{ "GETDNS_RRTYPE_SRV", 33 },
|
||||
{ "GETDNS_RRTYPE_SSHFP", 44 },
|
||||
{ "GETDNS_RRTYPE_SVCB", 64 },
|
||||
{ "GETDNS_RRTYPE_TA", 32768 },
|
||||
{ "GETDNS_RRTYPE_TALINK", 58 },
|
||||
{ "GETDNS_RRTYPE_TKEY", 249 },
|
||||
{ "GETDNS_RRTYPE_TLSA", 52 },
|
||||
{ "GETDNS_RRTYPE_TSIG", 250 },
|
||||
{ "GETDNS_RRTYPE_TXT", 16 },
|
||||
{ "GETDNS_RRTYPE_UID", 101 },
|
||||
{ "GETDNS_RRTYPE_UINFO", 100 },
|
||||
{ "GETDNS_RRTYPE_UNSPEC", 103 },
|
||||
{ "GETDNS_RRTYPE_URI", 256 },
|
||||
{ "GETDNS_RRTYPE_WKS", 11 },
|
||||
{ "GETDNS_RRTYPE_X25", 19 },
|
||||
{ "GETDNS_RRTYPE_ZONEMD", 63 },
|
||||
{ "GETDNS_SSL3", 1400 },
|
||||
{ "GETDNS_TLS1", 1401 },
|
||||
{ "GETDNS_TLS1_1", 1402 },
|
||||
{ "GETDNS_TLS1_2", 1403 },
|
||||
{ "GETDNS_TLS1_3", 1404 },
|
||||
{ "GETDNS_TRANSPORT_TCP", 1201 },
|
||||
{ "GETDNS_TRANSPORT_TCP_ONLY", 542 },
|
||||
{ "GETDNS_TRANSPORT_TCP_ONLY_KEEP_CONNECTIONS_OPEN", 543 },
|
||||
{ "GETDNS_TRANSPORT_TLS", 1202 },
|
||||
{ "GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN", 545 },
|
||||
{ "GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN", 544 },
|
||||
{ "GETDNS_TRANSPORT_UDP", 1200 },
|
||||
{ "GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP", 540 },
|
||||
{ "GETDNS_TRANSPORT_UDP_ONLY", 541 },
|
||||
};
|
||||
|
||||
static int const_name_info_cmp(const void *a, const void *b)
|
||||
{
|
||||
return strcmp( ((struct const_name_info *) a)->name
|
||||
, ((struct const_name_info *) b)->name );
|
||||
}
|
||||
|
||||
int
|
||||
_getdns_get_const_name_info(const char *name, uint32_t *code)
|
||||
{
|
||||
struct const_name_info key = { name, 0 };
|
||||
struct const_name_info *i = bsearch(&key, consts_name_info,
|
||||
sizeof(consts_name_info) / sizeof(struct const_name_info),
|
||||
sizeof(struct const_name_info), const_name_info_cmp);
|
||||
if (!i)
|
||||
return 0;
|
||||
if (code)
|
||||
*code = i->code;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
*
|
||||
* /brief priv_getdns_consts table with values, names and descriptions of the
|
||||
* /brief _getdns_consts table with values, names and descriptions of the
|
||||
* constants in getdns
|
||||
*
|
||||
* The priv_getdns_get_validation_chain function is called after an answer
|
||||
* The _getdns_get_validation_chain function is called after an answer
|
||||
* has been fetched when the dnssec_return_validation_chain extension is set.
|
||||
* It fetches DNSKEYs, DSes and their signatures for all RRSIGs found in the
|
||||
* answer.
|
||||
|
@ -39,13 +39,28 @@
|
|||
#ifndef CONST_INFO_H_
|
||||
#define CONST_INFO_H_
|
||||
|
||||
#include "getdns/getdns.h"
|
||||
#include "getdns/getdns_extra.h"
|
||||
|
||||
#ifndef GETDNS_CONTEXT_CODE_MAX_BACKOFF_VALUE
|
||||
#define GETDNS_CONTEXT_CODE_MAX_BACKOFF_VALUE 699
|
||||
#define GETDNS_CONTEXT_CODE_MAX_BACKOFF_VALUE_TEXT "Change related to getdns_context_set_max_backoff_value"
|
||||
#endif
|
||||
|
||||
struct const_info {
|
||||
int code;
|
||||
const char *name;
|
||||
const char *text;
|
||||
};
|
||||
|
||||
struct const_info *priv_getdns_get_const_info(int value);
|
||||
struct const_info *_getdns_get_const_info(int value);
|
||||
|
||||
struct const_name_info {
|
||||
const char *name;
|
||||
uint32_t code;
|
||||
};
|
||||
|
||||
int _getdns_get_const_name_info(const char *name, uint32_t *code);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
4676
src/context.c
4676
src/context.c
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue