Compare commits
1249 Commits
curl-7_18_
...
curl-7_19_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
042cc1f69e | ||
![]() |
90b804d3fa | ||
![]() |
4bc603a0cc | ||
![]() |
6c3f74b946 | ||
![]() |
8d78a33e60 | ||
![]() |
df07537ccf | ||
![]() |
de25ed3f37 | ||
![]() |
40edf25866 | ||
![]() |
7b7db23633 | ||
![]() |
794b4da840 | ||
![]() |
e9ea3ba4a2 | ||
![]() |
d207ea1652 | ||
![]() |
625d06ac79 | ||
![]() |
3460225590 | ||
![]() |
ea6531cf32 | ||
![]() |
2afb88e2ce | ||
![]() |
6c9f37d263 | ||
![]() |
735955282b | ||
![]() |
dd056e54e2 | ||
![]() |
f5548973ab | ||
![]() |
07dc741e18 | ||
![]() |
8b66981ce0 | ||
![]() |
3a7e8c9f5f | ||
![]() |
fb90b43432 | ||
![]() |
0302c21253 | ||
![]() |
9182a46233 | ||
![]() |
51b46f451f | ||
![]() |
11f3690201 | ||
![]() |
5784a37f91 | ||
![]() |
af91ff0e06 | ||
![]() |
be3a78f583 | ||
![]() |
7f22da5230 | ||
![]() |
5af0629ba5 | ||
![]() |
a776e5ad31 | ||
![]() |
6e422c447a | ||
![]() |
4608d0157e | ||
![]() |
a24fe59ee4 | ||
![]() |
4ad296c60b | ||
![]() |
0517fa153c | ||
![]() |
8f81fd6be5 | ||
![]() |
1472be4d3e | ||
![]() |
8925527fef | ||
![]() |
8cdc220bc0 | ||
![]() |
d315d41a12 | ||
![]() |
4f7687895d | ||
![]() |
07d46886df | ||
![]() |
b79c8f527f | ||
![]() |
0cf10ae4d7 | ||
![]() |
debe0b561d | ||
![]() |
9ddc7ad038 | ||
![]() |
9a4c887c4a | ||
![]() |
de41c6ef43 | ||
![]() |
002cf105c6 | ||
![]() |
fb8fdf9273 | ||
![]() |
517b8ed057 | ||
![]() |
d3d7ed1766 | ||
![]() |
77fd094090 | ||
![]() |
c65f9acdc7 | ||
![]() |
5c4cdcb2d5 | ||
![]() |
b1233c7e4d | ||
![]() |
4ebe4b907b | ||
![]() |
bf44d0f640 | ||
![]() |
73cf99c052 | ||
![]() |
44c02227e9 | ||
![]() |
77da9a0087 | ||
![]() |
42d2353e74 | ||
![]() |
4b441ebac5 | ||
![]() |
01140217f5 | ||
![]() |
71f3877f3a | ||
![]() |
83d135f990 | ||
![]() |
d4ac3d53fc | ||
![]() |
f0332c0b58 | ||
![]() |
bdd4294e79 | ||
![]() |
dcf92bffd2 | ||
![]() |
a2256e899b | ||
![]() |
8b6805572a | ||
![]() |
607253c2d0 | ||
![]() |
09f4a1c5e5 | ||
![]() |
5c9fff9c6e | ||
![]() |
99b4912688 | ||
![]() |
0a6312d66f | ||
![]() |
a97f52db20 | ||
![]() |
5267be57f7 | ||
![]() |
e813bf31d7 | ||
![]() |
1bd0be0361 | ||
![]() |
996c8ca7c2 | ||
![]() |
fec65fbff6 | ||
![]() |
de4610a55f | ||
![]() |
6e34c2d59a | ||
![]() |
34b09398d5 | ||
![]() |
0516ce7786 | ||
![]() |
bb86462ed7 | ||
![]() |
8fa8df95fb | ||
![]() |
82ca52713b | ||
![]() |
f29e383575 | ||
![]() |
5aeef9c1c8 | ||
![]() |
ddd3fe5948 | ||
![]() |
5591550167 | ||
![]() |
6bb9ef8de4 | ||
![]() |
14a6788535 | ||
![]() |
6f86826516 | ||
![]() |
0e6ed13454 | ||
![]() |
b914f45e9e | ||
![]() |
3ed66094e8 | ||
![]() |
718004d9b5 | ||
![]() |
1dc54324f4 | ||
![]() |
89ecf4ac01 | ||
![]() |
d42eac4287 | ||
![]() |
3fa6c51bb1 | ||
![]() |
37c5250e03 | ||
![]() |
0d3bb93ce8 | ||
![]() |
5e74c58b73 | ||
![]() |
7ac16811cc | ||
![]() |
29b6a732f3 | ||
![]() |
3dcd6bc597 | ||
![]() |
1342f5d592 | ||
![]() |
8fbfd5916d | ||
![]() |
1225d36188 | ||
![]() |
a19e02be5e | ||
![]() |
0761e60a4a | ||
![]() |
af96c8304f | ||
![]() |
0de0e95020 | ||
![]() |
35d8fb0501 | ||
![]() |
87c71953be | ||
![]() |
79a91b8168 | ||
![]() |
2f9038bf62 | ||
![]() |
4d50ca4e21 | ||
![]() |
a1077d0970 | ||
![]() |
b9fdc0c251 | ||
![]() |
f471b4836f | ||
![]() |
32b75d1b69 | ||
![]() |
f7e3bd28b4 | ||
![]() |
452e52f958 | ||
![]() |
0090099565 | ||
![]() |
2ed23cb50d | ||
![]() |
a97ab4f933 | ||
![]() |
bc93011554 | ||
![]() |
14b6cc4e22 | ||
![]() |
80ffd3581f | ||
![]() |
dd058b8de6 | ||
![]() |
3c2ad4022c | ||
![]() |
1f4b8da60a | ||
![]() |
9af4cf219e | ||
![]() |
cf4b88fcc4 | ||
![]() |
2215a9a181 | ||
![]() |
aa32f61ce7 | ||
![]() |
8266727062 | ||
![]() |
d839230402 | ||
![]() |
1cc50d31f9 | ||
![]() |
104377d718 | ||
![]() |
83640b2ee5 | ||
![]() |
9aea3e265d | ||
![]() |
59227bf075 | ||
![]() |
f61cfc5931 | ||
![]() |
27b8a5fd84 | ||
![]() |
60ff74140e | ||
![]() |
4f0a7170af | ||
![]() |
6d2ff9d2a7 | ||
![]() |
122b0bfe82 | ||
![]() |
3eae7695fc | ||
![]() |
6efde61227 | ||
![]() |
1c48124db4 | ||
![]() |
e9895ea2e7 | ||
![]() |
eab8c0d754 | ||
![]() |
7ffe62d901 | ||
![]() |
d5bfec70af | ||
![]() |
2a86817349 | ||
![]() |
5be7d88b34 | ||
![]() |
8a335ee7fd | ||
![]() |
216ad2680b | ||
![]() |
e16509d5cf | ||
![]() |
19c9b7c803 | ||
![]() |
ffd08df863 | ||
![]() |
460459e8db | ||
![]() |
07416b61e3 | ||
![]() |
000a13e21a | ||
![]() |
03ca98b0df | ||
![]() |
abb74a1203 | ||
![]() |
77c1d556bb | ||
![]() |
bd55ab05bd | ||
![]() |
2025193b7a | ||
![]() |
418683f537 | ||
![]() |
008b848dcc | ||
![]() |
79b7575fd8 | ||
![]() |
792279581b | ||
![]() |
3ca360391a | ||
![]() |
5f0a3797c9 | ||
![]() |
2d2c53d20e | ||
![]() |
02ca14fd0e | ||
![]() |
0f5895faee | ||
![]() |
c0dfe6e51d | ||
![]() |
1b4af1f8d8 | ||
![]() |
8e255534a1 | ||
![]() |
4607dfe257 | ||
![]() |
6e376532b0 | ||
![]() |
4ed64fd5ee | ||
![]() |
21700ae515 | ||
![]() |
b962ef3154 | ||
![]() |
32f78136b2 | ||
![]() |
01d6133bd7 | ||
![]() |
4b62cd3616 | ||
![]() |
df7b1d8e64 | ||
![]() |
2449e1f5a5 | ||
![]() |
66c0e4ad5f | ||
![]() |
18371aaff9 | ||
![]() |
f36eab2608 | ||
![]() |
66d38261f7 | ||
![]() |
553b4cfd0b | ||
![]() |
edd63a7920 | ||
![]() |
5ce03efc3e | ||
![]() |
4645e8b6b1 | ||
![]() |
42365aa7ef | ||
![]() |
dff4ce92ad | ||
![]() |
e5b0533dab | ||
![]() |
a2a315a6e8 | ||
![]() |
7abdc4b218 | ||
![]() |
479ddb1fee | ||
![]() |
4ee27b4594 | ||
![]() |
58ebde9502 | ||
![]() |
04ee89493e | ||
![]() |
dd3594c6b3 | ||
![]() |
f7ea431516 | ||
![]() |
16a153468d | ||
![]() |
b062212e55 | ||
![]() |
39eb96e9ff | ||
![]() |
4c84f6b423 | ||
![]() |
0b2ae71f8b | ||
![]() |
39d0b57ebf | ||
![]() |
c036f6ae2d | ||
![]() |
e35e2ea6ec | ||
![]() |
f33f8eee26 | ||
![]() |
31a3f064c0 | ||
![]() |
232518a219 | ||
![]() |
bc165078a2 | ||
![]() |
e4dabef0c7 | ||
![]() |
00142d8443 | ||
![]() |
1b0b7fa0e1 | ||
![]() |
67fb731ec4 | ||
![]() |
a30a6f2f20 | ||
![]() |
baeebb2b57 | ||
![]() |
ecc6f550eb | ||
![]() |
640974fb28 | ||
![]() |
3b0c5ae467 | ||
![]() |
0fa14c8662 | ||
![]() |
d17be0df52 | ||
![]() |
53a8a6e5a6 | ||
![]() |
dd2fc45c27 | ||
![]() |
ba9f8c674c | ||
![]() |
c4f4fa4089 | ||
![]() |
32634b0771 | ||
![]() |
c97b66287c | ||
![]() |
cd6fc8a8ef | ||
![]() |
3308781376 | ||
![]() |
40e8b4e527 | ||
![]() |
4741e64c89 | ||
![]() |
0b489c7e61 | ||
![]() |
22d4db1cf2 | ||
![]() |
7383225271 | ||
![]() |
4b3ae5e157 | ||
![]() |
797bc8504c | ||
![]() |
305f4d92ef | ||
![]() |
c36f0e71b6 | ||
![]() |
a028c69f48 | ||
![]() |
4e4b6de5ce | ||
![]() |
9aac2328c6 | ||
![]() |
e5084c1eca | ||
![]() |
9b12f09600 | ||
![]() |
a71762e405 | ||
![]() |
b8f3e5675a | ||
![]() |
820011dedc | ||
![]() |
cdd6054e08 | ||
![]() |
a15b6a6f86 | ||
![]() |
20d3e2b967 | ||
![]() |
608fdce0a0 | ||
![]() |
ecd3251542 | ||
![]() |
999c7126b3 | ||
![]() |
3c50ea961f | ||
![]() |
acc29ff1d9 | ||
![]() |
886bba55ac | ||
![]() |
cd440215a5 | ||
![]() |
73060b4523 | ||
![]() |
c76d939563 | ||
![]() |
3c4b69f95d | ||
![]() |
3f01d9a043 | ||
![]() |
dbc6fe3e84 | ||
![]() |
da6c15163b | ||
![]() |
9818bf7026 | ||
![]() |
73c7acb159 | ||
![]() |
ea8fbb5233 | ||
![]() |
9b033e1b8a | ||
![]() |
a65ce7b107 | ||
![]() |
2249c12a3c | ||
![]() |
b4ac9cd02c | ||
![]() |
3517eba632 | ||
![]() |
2cd44abafc | ||
![]() |
4b486ebbc1 | ||
![]() |
f9f211d2c6 | ||
![]() |
77b30f69e4 | ||
![]() |
17d2a464ad | ||
![]() |
ae6530ee82 | ||
![]() |
a6ba9e5ccd | ||
![]() |
c4cdab969b | ||
![]() |
c331c73ec6 | ||
![]() |
d1f063c62d | ||
![]() |
b686dc4911 | ||
![]() |
78936b2f2a | ||
![]() |
b2ed1e2607 | ||
![]() |
fb8870297d | ||
![]() |
4cbc0f6c2e | ||
![]() |
1b9eff64fa | ||
![]() |
d07d1a6ef8 | ||
![]() |
8bdd60fa71 | ||
![]() |
b872086c74 | ||
![]() |
e0af4a15d0 | ||
![]() |
d31802ed98 | ||
![]() |
87c4136bd4 | ||
![]() |
09e027bc9d | ||
![]() |
707828b71a | ||
![]() |
8f44037133 | ||
![]() |
9717ccb786 | ||
![]() |
6354cbf9d6 | ||
![]() |
95a849efc2 | ||
![]() |
fe083a94b9 | ||
![]() |
6fdcdfa5ea | ||
![]() |
4a4885eead | ||
![]() |
a0ef686c54 | ||
![]() |
2903a5c050 | ||
![]() |
4d50b9f1f1 | ||
![]() |
5e3c2af236 | ||
![]() |
5d791838d2 | ||
![]() |
b80c5cff49 | ||
![]() |
47b5740bdf | ||
![]() |
b8092857d9 | ||
![]() |
3cda1a23ce | ||
![]() |
215677c10b | ||
![]() |
3688cd3fea | ||
![]() |
5ca2a8318d | ||
![]() |
e27ec862c3 | ||
![]() |
d0b8b5a199 | ||
![]() |
efe2ce3647 | ||
![]() |
71f00188fb | ||
![]() |
a1c9cb8860 | ||
![]() |
74e9718370 | ||
![]() |
2d71c9cdfd | ||
![]() |
484d549ece | ||
![]() |
d098ab436d | ||
![]() |
85ffd33f08 | ||
![]() |
c1b8e93083 | ||
![]() |
383d4656aa | ||
![]() |
3e3d10824f | ||
![]() |
128418b214 | ||
![]() |
050a39a7a5 | ||
![]() |
5f085789b9 | ||
![]() |
6a8832d83b | ||
![]() |
fcb498b0d5 | ||
![]() |
0433252e50 | ||
![]() |
5ce6f37e26 | ||
![]() |
02fc7bb5f6 | ||
![]() |
9e1294e866 | ||
![]() |
c2c800d863 | ||
![]() |
625c107c25 | ||
![]() |
33319f5d2d | ||
![]() |
ad3c1c37bb | ||
![]() |
005bf19acf | ||
![]() |
91c77808c4 | ||
![]() |
0ce97f77e0 | ||
![]() |
197ad60d21 | ||
![]() |
dc31387c6f | ||
![]() |
bd64da3785 | ||
![]() |
4fef0d4f14 | ||
![]() |
89d6f580dc | ||
![]() |
23eb74e085 | ||
![]() |
9c86097286 | ||
![]() |
f0bb9c7d8d | ||
![]() |
d4514f9c10 | ||
![]() |
c324033ba4 | ||
![]() |
74a16db975 | ||
![]() |
a10044e110 | ||
![]() |
6cdd067faf | ||
![]() |
0989cd358a | ||
![]() |
6e0739931d | ||
![]() |
b17ca44f0b | ||
![]() |
fd6e025d61 | ||
![]() |
9230708e47 | ||
![]() |
92f3b3895e | ||
![]() |
fa8a78ff01 | ||
![]() |
310d842b70 | ||
![]() |
1498de83d6 | ||
![]() |
e29f62f0a7 | ||
![]() |
39e5fa6ae8 | ||
![]() |
dc289aa4fa | ||
![]() |
6db8f53445 | ||
![]() |
417bac4055 | ||
![]() |
e9c94cdd49 | ||
![]() |
d104216bbe | ||
![]() |
d086fdaf9f | ||
![]() |
8693afdfea | ||
![]() |
a876161ef9 | ||
![]() |
10035c898b | ||
![]() |
71edaf4d01 | ||
![]() |
2b77d50776 | ||
![]() |
6ea91af2f8 | ||
![]() |
b767440399 | ||
![]() |
4174ec7116 | ||
![]() |
068ba17e21 | ||
![]() |
4d10c96aa6 | ||
![]() |
b701ea36a7 | ||
![]() |
198fa5e3c7 | ||
![]() |
507cd13793 | ||
![]() |
6c14c96e71 | ||
![]() |
976963cd21 | ||
![]() |
9391d980c3 | ||
![]() |
bab5183820 | ||
![]() |
0abaf22467 | ||
![]() |
463a8134a1 | ||
![]() |
d22b2d181f | ||
![]() |
5a9bbf639a | ||
![]() |
81e48ada47 | ||
![]() |
598bc44f67 | ||
![]() |
b93f4f623c | ||
![]() |
1054dc5ed1 | ||
![]() |
7fc4e8af0a | ||
![]() |
4198bb88b6 | ||
![]() |
db325d1f43 | ||
![]() |
7ff38c14a9 | ||
![]() |
3f2de3d101 | ||
![]() |
6bd91936ff | ||
![]() |
035a2e5479 | ||
![]() |
6983ba3225 | ||
![]() |
77e028d620 | ||
![]() |
0bb91218c5 | ||
![]() |
231a51fe7a | ||
![]() |
8d0cbaf8df | ||
![]() |
b843c27322 | ||
![]() |
2688cf343b | ||
![]() |
b416b87518 | ||
![]() |
3f1b9f095a | ||
![]() |
8a6eeb82c5 | ||
![]() |
5779283a52 | ||
![]() |
80d0dcc9a3 | ||
![]() |
d51ad518c4 | ||
![]() |
29ba1730ca | ||
![]() |
183210619d | ||
![]() |
feff911fb7 | ||
![]() |
8eee5f3253 | ||
![]() |
3e55fef5e1 | ||
![]() |
63397e380f | ||
![]() |
07c3aaeea1 | ||
![]() |
8254bbae56 | ||
![]() |
e7886aa9b4 | ||
![]() |
fb08868e54 | ||
![]() |
c141d99059 | ||
![]() |
f66e1c49b0 | ||
![]() |
4acbe8f20c | ||
![]() |
2ea70a5c73 | ||
![]() |
eb612bfdfc | ||
![]() |
5e826c78a7 | ||
![]() |
a0d906739d | ||
![]() |
98b13037e7 | ||
![]() |
29f09f71b4 | ||
![]() |
a00b6e258d | ||
![]() |
7ded272b94 | ||
![]() |
1d12b1fa1e | ||
![]() |
54582bdce9 | ||
![]() |
a9a4300a36 | ||
![]() |
f720e0ac0f | ||
![]() |
a8245df745 | ||
![]() |
86c5d02a5e | ||
![]() |
5af597c2fb | ||
![]() |
dd9e0164d5 | ||
![]() |
9d16b4081e | ||
![]() |
545cafce9b | ||
![]() |
fb66d51796 | ||
![]() |
5175664174 | ||
![]() |
a579d67064 | ||
![]() |
be760bed7e | ||
![]() |
357383159e | ||
![]() |
0ea1c28135 | ||
![]() |
36e56f36ad | ||
![]() |
0a9984c27e | ||
![]() |
0ecdcc253b | ||
![]() |
1667890172 | ||
![]() |
9b3f863cf5 | ||
![]() |
2f2ed4e40e | ||
![]() |
3d582304b6 | ||
![]() |
996d45df0a | ||
![]() |
6047635406 | ||
![]() |
e16bccbb91 | ||
![]() |
9786e7faeb | ||
![]() |
fde4b823f1 | ||
![]() |
b7e71a249e | ||
![]() |
bf8d642607 | ||
![]() |
1fab40bb69 | ||
![]() |
ad61b58036 | ||
![]() |
b7722e7037 | ||
![]() |
6c2167b65f | ||
![]() |
18be9882f7 | ||
![]() |
a102c2c22b | ||
![]() |
ae75462254 | ||
![]() |
3ad956e73f | ||
![]() |
d6114165d3 | ||
![]() |
c3a959cc37 | ||
![]() |
ca70beec47 | ||
![]() |
758939215d | ||
![]() |
ab861e56f1 | ||
![]() |
8eb64ad600 | ||
![]() |
d74d3fe851 | ||
![]() |
fefc6a7e6b | ||
![]() |
a119114ad7 | ||
![]() |
430b1a22db | ||
![]() |
a754ea1326 | ||
![]() |
2ecf22e37e | ||
![]() |
9dcd0756ba | ||
![]() |
c455254fd1 | ||
![]() |
bb1f6e6818 | ||
![]() |
0722e91eb9 | ||
![]() |
c859a6f365 | ||
![]() |
ef49850789 | ||
![]() |
4f6f334f41 | ||
![]() |
8cd76d3921 | ||
![]() |
885805b5df | ||
![]() |
d61f260372 | ||
![]() |
d0a48627b2 | ||
![]() |
4b8f13e902 | ||
![]() |
5b9a57f536 | ||
![]() |
ba9963b8fa | ||
![]() |
6887106ff7 | ||
![]() |
98416a4fab | ||
![]() |
fad3288d20 | ||
![]() |
5ecff1e4c3 | ||
![]() |
bfeae0b5f5 | ||
![]() |
1c5336cd57 | ||
![]() |
43c2cf4edb | ||
![]() |
f6d80d66a2 | ||
![]() |
b2ca0babeb | ||
![]() |
ed4ae322f5 | ||
![]() |
4f924ab07e | ||
![]() |
ebadeff0ca | ||
![]() |
830018aa38 | ||
![]() |
8dfddd279b | ||
![]() |
544f2f74df | ||
![]() |
450348d6bd | ||
![]() |
5928ea9c7a | ||
![]() |
4754880099 | ||
![]() |
1fea66e527 | ||
![]() |
806a3163ba | ||
![]() |
08cf6780ba | ||
![]() |
6814907a2c | ||
![]() |
11a8a25528 | ||
![]() |
1b246eecfe | ||
![]() |
95456b8e78 | ||
![]() |
79fc481a2b | ||
![]() |
b9ce871463 | ||
![]() |
0bd78e1cd8 | ||
![]() |
d27f2d8168 | ||
![]() |
407f3f142a | ||
![]() |
61cfbecc74 | ||
![]() |
feeabd08ab | ||
![]() |
31a3432a8e | ||
![]() |
27db045095 | ||
![]() |
db8c75f08d | ||
![]() |
beaada77e6 | ||
![]() |
aefab9293a | ||
![]() |
a6d9310888 | ||
![]() |
bfc09ac211 | ||
![]() |
d930280af5 | ||
![]() |
445e4a9792 | ||
![]() |
aec761916e | ||
![]() |
7d750d2b92 | ||
![]() |
bdf1724412 | ||
![]() |
9cea2dfb8f | ||
![]() |
00dec36c72 | ||
![]() |
26a651f7ae | ||
![]() |
b64f0dace3 | ||
![]() |
a7b95cacb6 | ||
![]() |
ac0e0351a0 | ||
![]() |
2245ac2f88 | ||
![]() |
1bfaf76dd0 | ||
![]() |
88513d2d1a | ||
![]() |
91bc396178 | ||
![]() |
d3fdbe48ae | ||
![]() |
2c086105b1 | ||
![]() |
aed98c5125 | ||
![]() |
2d77f7cd48 | ||
![]() |
d5affe1ada | ||
![]() |
d61688923d | ||
![]() |
4aee6822ca | ||
![]() |
038542ea3e | ||
![]() |
beb14ca6d6 | ||
![]() |
4114129ac0 | ||
![]() |
6d24719167 | ||
![]() |
2393c94363 | ||
![]() |
372203f1fa | ||
![]() |
691468174b | ||
![]() |
6f8d439717 | ||
![]() |
f3ab5d5500 | ||
![]() |
8f467b4288 | ||
![]() |
4adcf7e9ed | ||
![]() |
9f8c40ed78 | ||
![]() |
cda9d7e579 | ||
![]() |
c27d2d4b93 | ||
![]() |
003afef541 | ||
![]() |
09bbca2f61 | ||
![]() |
0a305eb79f | ||
![]() |
aff5408633 | ||
![]() |
31626d4c6f | ||
![]() |
426ec2d399 | ||
![]() |
a632f6d5b1 | ||
![]() |
83c199bb00 | ||
![]() |
2ec6d08613 | ||
![]() |
42271ad463 | ||
![]() |
57ee847ce7 | ||
![]() |
985bd18904 | ||
![]() |
2d1f798d14 | ||
![]() |
9e9f70a693 | ||
![]() |
1b9d311b5c | ||
![]() |
4d437416da | ||
![]() |
267b942383 | ||
![]() |
142cb601f8 | ||
![]() |
21b523fcd3 | ||
![]() |
006cab3e9e | ||
![]() |
4e909ee8b1 | ||
![]() |
95df5d042c | ||
![]() |
22059858fe | ||
![]() |
82107a02f5 | ||
![]() |
515893595d | ||
![]() |
3800be3898 | ||
![]() |
c9ad952604 | ||
![]() |
2a09ffc648 | ||
![]() |
821d8fee3b | ||
![]() |
42224594b6 | ||
![]() |
d369a2b775 | ||
![]() |
a5f4cfc612 | ||
![]() |
23e5402bec | ||
![]() |
391e8afd1f | ||
![]() |
eff2c3a621 | ||
![]() |
de48e4e4df | ||
![]() |
c4a694862c | ||
![]() |
1e076a4ae0 | ||
![]() |
188311863a | ||
![]() |
0eb083e979 | ||
![]() |
abe61b9926 | ||
![]() |
54e49d10d2 | ||
![]() |
ef75829878 | ||
![]() |
a19341b57a | ||
![]() |
c9549391d1 | ||
![]() |
2b767161da | ||
![]() |
7c9631081d | ||
![]() |
b6f29bef06 | ||
![]() |
6abbbaad1b | ||
![]() |
fe5f448015 | ||
![]() |
7beb473a3d | ||
![]() |
19bc92289d | ||
![]() |
4e4f6c1ec8 | ||
![]() |
459e67b2a7 | ||
![]() |
51ba24991c | ||
![]() |
dfa0fd5b33 | ||
![]() |
f7ef60c13f | ||
![]() |
8b2bfa4212 | ||
![]() |
a6c915aab9 | ||
![]() |
a8323cc3f5 | ||
![]() |
aa29735868 | ||
![]() |
a059e9241e | ||
![]() |
acd637160f | ||
![]() |
ddb2783f9a | ||
![]() |
8fa895d65e | ||
![]() |
33b658a341 | ||
![]() |
df725aade2 | ||
![]() |
d84440d53b | ||
![]() |
0c1ae21c11 | ||
![]() |
f30959c6bd | ||
![]() |
d7e406e020 | ||
![]() |
638e3c070c | ||
![]() |
07aeac37fd | ||
![]() |
6ec76e7f9a | ||
![]() |
cb9951dcad | ||
![]() |
0776701396 | ||
![]() |
39de6c784c | ||
![]() |
e5c4482088 | ||
![]() |
975c171d5a | ||
![]() |
7d7f63059a | ||
![]() |
8c6c0a7bcc | ||
![]() |
aa41743ebd | ||
![]() |
ee5f13cb6b | ||
![]() |
974145f61c | ||
![]() |
849318138e | ||
![]() |
6a04c0878b | ||
![]() |
db80e18308 | ||
![]() |
3081207a4c | ||
![]() |
8085c7a450 | ||
![]() |
842de91168 | ||
![]() |
4c621bc697 | ||
![]() |
938458b330 | ||
![]() |
651dad0cc1 | ||
![]() |
f591ab3ba0 | ||
![]() |
09aa4cf2ca | ||
![]() |
61c0bdb09c | ||
![]() |
89367d47a8 | ||
![]() |
7fdfd938e0 | ||
![]() |
e526b5ffeb | ||
![]() |
adb974960d | ||
![]() |
2acc92828f | ||
![]() |
a1d1f43e6a | ||
![]() |
aac739ccd2 | ||
![]() |
c3d1b07c45 | ||
![]() |
77bafd823b | ||
![]() |
624b5f228b | ||
![]() |
6d233becf0 | ||
![]() |
2bcd13aaee | ||
![]() |
20723cb792 | ||
![]() |
b93ad10fa5 | ||
![]() |
28e2007767 | ||
![]() |
802f1e4406 | ||
![]() |
a37cc6cb08 | ||
![]() |
6cea51585f | ||
![]() |
fce9c3a9f1 | ||
![]() |
969903ebf2 | ||
![]() |
7b3f86152a | ||
![]() |
ea1362a936 | ||
![]() |
f62a5b83a9 | ||
![]() |
a834b98232 | ||
![]() |
152cf6325d | ||
![]() |
c98ab69cc7 | ||
![]() |
f7cce15156 | ||
![]() |
3072c5b8a1 | ||
![]() |
ac1ab03cb0 | ||
![]() |
2ef72f7abb | ||
![]() |
eae27d1788 | ||
![]() |
a3787eff19 | ||
![]() |
836d945ece | ||
![]() |
2816902f0e | ||
![]() |
f72a26d340 | ||
![]() |
387521bb6d | ||
![]() |
a4da82a43b | ||
![]() |
bc90fefb5b | ||
![]() |
c3d871aef4 | ||
![]() |
59e378f48f | ||
![]() |
a622fd90b4 | ||
![]() |
861b647e7b | ||
![]() |
70e57dad88 | ||
![]() |
91ff938035 | ||
![]() |
3acd1146f9 | ||
![]() |
45d3bfff28 | ||
![]() |
18110b519c | ||
![]() |
4c9768565e | ||
![]() |
873e734c39 | ||
![]() |
747e0c657d | ||
![]() |
780f13db30 | ||
![]() |
62519bfe05 | ||
![]() |
29f7f468ce | ||
![]() |
9c36a5fd06 | ||
![]() |
4558c8f37a | ||
![]() |
bb67388bbe | ||
![]() |
3dcd2b82c4 | ||
![]() |
c0f3e32447 | ||
![]() |
8733e087d7 | ||
![]() |
9f9e577640 | ||
![]() |
9813cea1d0 | ||
![]() |
304537c24f | ||
![]() |
cc0054a4d5 | ||
![]() |
29ec219b82 | ||
![]() |
0994d7811f | ||
![]() |
934708d950 | ||
![]() |
bbc002a505 | ||
![]() |
c8d4e8b5d0 | ||
![]() |
18a21d5802 | ||
![]() |
fcb63f3039 | ||
![]() |
91d7a6f8a9 | ||
![]() |
238db14002 | ||
![]() |
d0995204da | ||
![]() |
6ebc2b2561 | ||
![]() |
95b817e8d7 | ||
![]() |
558f034007 | ||
![]() |
72ea805298 | ||
![]() |
79ffbf7fe1 | ||
![]() |
4f0d286d2c | ||
![]() |
6fb5888e55 | ||
![]() |
b5810dfe9d | ||
![]() |
85a79f9d67 | ||
![]() |
d24465b79a | ||
![]() |
c67a99ff27 | ||
![]() |
bae4e12302 | ||
![]() |
09df1cdb5c | ||
![]() |
2946d87e48 | ||
![]() |
6a2d7bff1a | ||
![]() |
9b7b2b347f | ||
![]() |
33638d5347 | ||
![]() |
2ae7d2e6ea | ||
![]() |
ffc490ef89 | ||
![]() |
29b75ca46f | ||
![]() |
004dde18a7 | ||
![]() |
3440e8d208 | ||
![]() |
e138ae5ec9 | ||
![]() |
bf8ba229e0 | ||
![]() |
19d0a7495e | ||
![]() |
099b62f124 | ||
![]() |
8ce78ca488 | ||
![]() |
fc9610919c | ||
![]() |
e082d2403c | ||
![]() |
370c3afc71 | ||
![]() |
93357ef017 | ||
![]() |
753592cc70 | ||
![]() |
b150e6866d | ||
![]() |
2f475fa9ea | ||
![]() |
ecff50c2b4 | ||
![]() |
6f53cf9cc6 | ||
![]() |
1056202b48 | ||
![]() |
709de3d621 | ||
![]() |
f9894f4ebc | ||
![]() |
74d3b80d70 | ||
![]() |
4b01dfe369 | ||
![]() |
fc09d10560 | ||
![]() |
59b2e3ea4a | ||
![]() |
243cf29793 | ||
![]() |
9ded8fbe58 | ||
![]() |
9258928c2d | ||
![]() |
132cd3aa2c | ||
![]() |
fef60d9d41 | ||
![]() |
2fdd24c724 | ||
![]() |
852a02daff | ||
![]() |
2a6148716c | ||
![]() |
5ca692fc89 | ||
![]() |
3e2487493e | ||
![]() |
fdcb0cd2bc | ||
![]() |
4962e1772d | ||
![]() |
d7d5618498 | ||
![]() |
3f3d6ebe66 | ||
![]() |
ec28988bfa | ||
![]() |
db23538898 | ||
![]() |
423a18cecc | ||
![]() |
f164260eee | ||
![]() |
a091121293 | ||
![]() |
d744c85310 | ||
![]() |
c9f2c54c49 | ||
![]() |
f29d223ed5 | ||
![]() |
8dabd34432 | ||
![]() |
a104a365e3 | ||
![]() |
62d94ff342 | ||
![]() |
cbc04a7d40 | ||
![]() |
71d3c5bf41 | ||
![]() |
bc69e46ad1 | ||
![]() |
13f035b905 | ||
![]() |
79cbe50894 | ||
![]() |
1c04aa54a7 | ||
![]() |
b718283327 | ||
![]() |
b34390017b | ||
![]() |
8980f89370 | ||
![]() |
f46d47239f | ||
![]() |
13dc82b9d4 | ||
![]() |
a243dd4587 | ||
![]() |
9d5d6c557b | ||
![]() |
a604682805 | ||
![]() |
70b1cd798f | ||
![]() |
578f42d588 | ||
![]() |
e3ad6d2bd1 | ||
![]() |
4b64a8d20d | ||
![]() |
fcc8700218 | ||
![]() |
e5b713ee63 | ||
![]() |
9849c6b847 | ||
![]() |
9bb5da968c | ||
![]() |
d5a71fd567 | ||
![]() |
0f98ba4729 | ||
![]() |
a6a2174bf7 | ||
![]() |
f07c3171e3 | ||
![]() |
6cb1e3f3fa | ||
![]() |
81b64f69a5 | ||
![]() |
17e1f58fd6 | ||
![]() |
582833b338 | ||
![]() |
48be4fa069 | ||
![]() |
2af05bdd3c | ||
![]() |
4dbfc91e2b | ||
![]() |
95cef39def | ||
![]() |
00fb5bcf35 | ||
![]() |
42eeb93d99 | ||
![]() |
afe7bb4b33 | ||
![]() |
0f5f91df0b | ||
![]() |
f209a4804b | ||
![]() |
5794ffe4bd | ||
![]() |
ceb49d3742 | ||
![]() |
44142f8234 | ||
![]() |
347213d124 | ||
![]() |
8ca51bc68a | ||
![]() |
56f852a64f | ||
![]() |
1c68e79091 | ||
![]() |
473a050f0b | ||
![]() |
6768e81d5d | ||
![]() |
3743f515cf | ||
![]() |
3e0b6a7d1f | ||
![]() |
ef72f7d513 | ||
![]() |
2f71461b29 | ||
![]() |
d8cab4c133 | ||
![]() |
95a093e97b | ||
![]() |
68bb51c55b | ||
![]() |
fb8fe6f2b3 | ||
![]() |
3e61c90dbe | ||
![]() |
ac18b471d2 | ||
![]() |
bbe2386bff | ||
![]() |
2f47248e3c | ||
![]() |
315bb970a5 | ||
![]() |
65b0f6049d | ||
![]() |
0033535e21 | ||
![]() |
3e4a8cb800 | ||
![]() |
ad638da2c2 | ||
![]() |
a923d8541c | ||
![]() |
66fb9ca5f6 | ||
![]() |
11cb78c5f8 | ||
![]() |
527a5f0980 | ||
![]() |
6e878d2ca4 | ||
![]() |
cf30b24706 | ||
![]() |
709a2ed474 | ||
![]() |
ecd30cc8bb | ||
![]() |
0105ad5e39 | ||
![]() |
cebaab8ee5 | ||
![]() |
34281925d6 | ||
![]() |
e90c4fa770 | ||
![]() |
a06e077938 | ||
![]() |
7bdae7be4f | ||
![]() |
c125d83e9e | ||
![]() |
2abf9221e3 | ||
![]() |
6f1e89085c | ||
![]() |
5303cdc4af | ||
![]() |
feb03e4717 | ||
![]() |
64e3a091c3 | ||
![]() |
a2c50a980c | ||
![]() |
23478b891f | ||
![]() |
aab2d52b25 | ||
![]() |
9a9041f1ce | ||
![]() |
0aa704935b | ||
![]() |
ede7f8f5de | ||
![]() |
3c317d2fac | ||
![]() |
b55b0258e0 | ||
![]() |
55a8098d48 | ||
![]() |
389e50ff1e | ||
![]() |
1df4043ad7 | ||
![]() |
b000b8a736 | ||
![]() |
7eab7fa353 | ||
![]() |
58f7c82d52 | ||
![]() |
4d1cd0da93 | ||
![]() |
9ee7a014c9 | ||
![]() |
e1ab7db87d | ||
![]() |
14a5596346 | ||
![]() |
2eba5f33b9 | ||
![]() |
60a3773c50 | ||
![]() |
e8e8177e9d | ||
![]() |
f1fe04245a | ||
![]() |
8bb208e8f8 | ||
![]() |
f8a3aa91cd | ||
![]() |
019bde82ce | ||
![]() |
ca5e38751c | ||
![]() |
b5b25b39e9 | ||
![]() |
1784523cc6 | ||
![]() |
d71d10adbc | ||
![]() |
40fb750589 | ||
![]() |
62a6b8d4a6 | ||
![]() |
24b1890710 | ||
![]() |
3a1d28379a | ||
![]() |
c57285d199 | ||
![]() |
68cfe929c4 | ||
![]() |
6237fd2c16 | ||
![]() |
b023f9bd2a | ||
![]() |
b7ac885d38 | ||
![]() |
cbd9dcbe41 | ||
![]() |
4594187732 | ||
![]() |
63818f8488 | ||
![]() |
8af61cdb66 | ||
![]() |
ab83c0fd5b | ||
![]() |
3cc40a2584 | ||
![]() |
c11933b3fd | ||
![]() |
4687699726 | ||
![]() |
012dcb4893 | ||
![]() |
f01d18e4b9 | ||
![]() |
dabd3cd355 | ||
![]() |
fa001f27a5 | ||
![]() |
40b2e06a7f | ||
![]() |
8008499028 | ||
![]() |
3ac6929919 | ||
![]() |
8d36acd29b | ||
![]() |
e54209d643 | ||
![]() |
f6a958dc3a | ||
![]() |
2548e7b23f | ||
![]() |
97046a3548 | ||
![]() |
a7d52c414f | ||
![]() |
479466a495 | ||
![]() |
fa2a8f6fb8 | ||
![]() |
ddfa33be79 | ||
![]() |
25c76a760e | ||
![]() |
14240e9e10 | ||
![]() |
a3045b4e49 | ||
![]() |
b0685b3576 | ||
![]() |
138c57c76a | ||
![]() |
182a415555 | ||
![]() |
6e789fc516 | ||
![]() |
09f278121e | ||
![]() |
ed50e3f1b4 | ||
![]() |
3a499099af | ||
![]() |
931fc45f05 | ||
![]() |
6076c74041 | ||
![]() |
b4fdccf87a | ||
![]() |
8d012181b0 | ||
![]() |
d6344d9b5f | ||
![]() |
cb9410ded2 | ||
![]() |
6838fb32af | ||
![]() |
74d77cb140 | ||
![]() |
7ad3abfd05 | ||
![]() |
7c6df7132e | ||
![]() |
f27299dc3b | ||
![]() |
47724ef238 | ||
![]() |
357389a905 | ||
![]() |
42cabc14d4 | ||
![]() |
a948ca1669 | ||
![]() |
9cef14dfb2 | ||
![]() |
2d15d84a01 | ||
![]() |
1035469662 | ||
![]() |
296a6f7749 | ||
![]() |
5cff8124b0 | ||
![]() |
90e2510e2f | ||
![]() |
9251dd7b24 | ||
![]() |
3615063fbc | ||
![]() |
09664f1ab8 | ||
![]() |
bdf1157d55 | ||
![]() |
b4a5ce89c2 | ||
![]() |
660516914e | ||
![]() |
4c1c479fcf | ||
![]() |
309651dc82 | ||
![]() |
b13b9f3331 | ||
![]() |
108e584983 | ||
![]() |
f3b4071209 | ||
![]() |
fe1d024351 | ||
![]() |
0de08d418f | ||
![]() |
109edaae6d | ||
![]() |
d69a630989 | ||
![]() |
987b67bd2e | ||
![]() |
f4d56802f9 | ||
![]() |
9dfd6eacf4 | ||
![]() |
5aed78e183 | ||
![]() |
011e5dd864 | ||
![]() |
ae654266df | ||
![]() |
03986f1b8b | ||
![]() |
bc649593e4 | ||
![]() |
cc0285da7f | ||
![]() |
f3bc16f4f5 | ||
![]() |
15f94858f2 | ||
![]() |
5febd06c25 | ||
![]() |
9eb7fe8ac0 | ||
![]() |
1f26ea4a85 | ||
![]() |
912c29fd8c | ||
![]() |
eea468918e | ||
![]() |
537490e391 | ||
![]() |
de8e362d4a | ||
![]() |
7a588144b7 | ||
![]() |
7f2999aa43 | ||
![]() |
a3498f96ef | ||
![]() |
637bfa0252 | ||
![]() |
1c8f689ecb | ||
![]() |
7a8b11d716 | ||
![]() |
a67e207866 | ||
![]() |
5817209158 | ||
![]() |
b39d409aa2 | ||
![]() |
a18fb9448b | ||
![]() |
1f3007dbb4 | ||
![]() |
5dafa4a270 | ||
![]() |
e93bcbeee1 | ||
![]() |
adc032e7d8 | ||
![]() |
248c2b9bf5 | ||
![]() |
a8baa05023 | ||
![]() |
7066a79466 | ||
![]() |
4a623f7ed2 | ||
![]() |
f18700ef64 | ||
![]() |
52d9a3c34f | ||
![]() |
d785ed2588 | ||
![]() |
4ff37a4ed1 | ||
![]() |
fe167b6ba2 | ||
![]() |
f042a7419d | ||
![]() |
bc0ebfcdeb | ||
![]() |
57d13c770a | ||
![]() |
1692384636 | ||
![]() |
7634091325 | ||
![]() |
bdc8f59c17 | ||
![]() |
817efbc29c | ||
![]() |
d2661cb4b2 | ||
![]() |
9b0110f50c | ||
![]() |
5876381f86 | ||
![]() |
c4edc25d01 | ||
![]() |
36361d14cf | ||
![]() |
c8fe5f485c | ||
![]() |
1ac1212925 | ||
![]() |
3d4fb5136d | ||
![]() |
b6b03c8ab9 | ||
![]() |
432945e422 | ||
![]() |
052f9ddedb | ||
![]() |
a96784b98e | ||
![]() |
e06944438a | ||
![]() |
fa1009b6fc | ||
![]() |
b377e857bd | ||
![]() |
9a806f667b | ||
![]() |
979c9ce8e3 | ||
![]() |
b217e6eed7 | ||
![]() |
6b7e74a030 | ||
![]() |
7fdeb14e6d | ||
![]() |
8a323f8354 | ||
![]() |
a7abd5bf70 | ||
![]() |
932b589780 | ||
![]() |
27c282a6ee | ||
![]() |
5373289574 | ||
![]() |
7d0eabaa80 | ||
![]() |
e7f5d12cb6 | ||
![]() |
f14e020370 | ||
![]() |
e933b28aaf | ||
![]() |
1bc490077a | ||
![]() |
7d773abe50 | ||
![]() |
f22114aeed | ||
![]() |
0919de4511 | ||
![]() |
3e5292a052 | ||
![]() |
2066d60b16 | ||
![]() |
51e84c77e7 | ||
![]() |
775d9e0615 | ||
![]() |
a20d55fb64 | ||
![]() |
1b37baf656 | ||
![]() |
bffe69a151 | ||
![]() |
71525352f0 | ||
![]() |
facc5f7ec5 | ||
![]() |
184229b1e5 | ||
![]() |
3e488c4f19 | ||
![]() |
3f84e373ac | ||
![]() |
ac6d6ec2f1 | ||
![]() |
f11d5d9de8 | ||
![]() |
ed2dbefa73 | ||
![]() |
39f23aec6b | ||
![]() |
362422641e | ||
![]() |
a9dc900515 | ||
![]() |
3a705696af | ||
![]() |
2cfb8a2bf0 | ||
![]() |
21ee1c2d01 | ||
![]() |
a00febe1a0 | ||
![]() |
1e7125ae7b | ||
![]() |
aa4a7471dd | ||
![]() |
69a03ce23c | ||
![]() |
0f50cd7623 | ||
![]() |
669c555874 | ||
![]() |
1cfb73a129 | ||
![]() |
2a585c2fba | ||
![]() |
32a83128e6 | ||
![]() |
fe7bb33af8 | ||
![]() |
da6fa34f02 | ||
![]() |
37a358ab93 | ||
![]() |
3452c8d693 | ||
![]() |
336992cc54 | ||
![]() |
13afcbd1eb | ||
![]() |
e58a3fd0aa | ||
![]() |
57625b6c4c | ||
![]() |
0d058d2174 | ||
![]() |
8d49a8f278 | ||
![]() |
b4b6cfdb1c | ||
![]() |
6b7ccde156 | ||
![]() |
9b0fd007fd | ||
![]() |
6f3ef94836 | ||
![]() |
08ac9866e0 | ||
![]() |
a17fadea3a | ||
![]() |
e30bbfd85d | ||
![]() |
120f9d81b2 | ||
![]() |
fa38839a80 | ||
![]() |
d8f109176c | ||
![]() |
bbb1b99ce1 | ||
![]() |
0cd8840dba | ||
![]() |
d4b253ba3e | ||
![]() |
aee7fc118b | ||
![]() |
60f0b4fffe | ||
![]() |
a95e600eb0 | ||
![]() |
a25959184e | ||
![]() |
0e5da5b8bc | ||
![]() |
ddfa4b8896 | ||
![]() |
d816a11bca | ||
![]() |
7820391cb9 | ||
![]() |
148866bc73 | ||
![]() |
0b57c47547 | ||
![]() |
02db4450df | ||
![]() |
ed7af82bdf | ||
![]() |
e3b5673e98 | ||
![]() |
82412f218f | ||
![]() |
7c648782bc | ||
![]() |
ee64d14733 | ||
![]() |
bfaab6ed6b | ||
![]() |
97333deb3f | ||
![]() |
400d9d4205 | ||
![]() |
ad1145a201 | ||
![]() |
513c22df3b | ||
![]() |
b5afd53138 | ||
![]() |
72b4b3c7f8 | ||
![]() |
eb60ba23f5 | ||
![]() |
69aac49f79 | ||
![]() |
67f139e016 | ||
![]() |
654f047302 | ||
![]() |
e6c23672b2 | ||
![]() |
1058e5fdde | ||
![]() |
6929d9355f | ||
![]() |
8c377ad965 | ||
![]() |
a81a16beac | ||
![]() |
d92945bb8a | ||
![]() |
90a6a59a2f | ||
![]() |
8bae3d9007 | ||
![]() |
98042b858d | ||
![]() |
a837bd08b0 | ||
![]() |
2c61e9c76a | ||
![]() |
da97f78ae0 | ||
![]() |
2e1a9da5e2 | ||
![]() |
422fd933f5 | ||
![]() |
2594124825 | ||
![]() |
d09b6ecaa5 | ||
![]() |
fb2e71b9bd | ||
![]() |
68b67e24f2 | ||
![]() |
c1e2341f0a | ||
![]() |
70d834c512 | ||
![]() |
65ee4e4555 | ||
![]() |
5304b13365 | ||
![]() |
e547bfa933 | ||
![]() |
36ddb13d1f | ||
![]() |
74e3def5b3 | ||
![]() |
24d41452b0 | ||
![]() |
2597020d22 | ||
![]() |
2d0fea2650 | ||
![]() |
c1a71ad14f | ||
![]() |
024c7641a9 | ||
![]() |
5c56bdf229 | ||
![]() |
af779fa57c | ||
![]() |
9918541795 | ||
![]() |
04d5c8fb77 | ||
![]() |
5980b3cbb0 | ||
![]() |
10074bfcc6 | ||
![]() |
3940e69c91 | ||
![]() |
0ace5f6553 | ||
![]() |
b8a9f19515 | ||
![]() |
6cd007838d | ||
![]() |
72870e2c57 | ||
![]() |
9c8997cbe4 | ||
![]() |
c6efb82526 | ||
![]() |
5abfdc0140 | ||
![]() |
d8bc4a0e9a | ||
![]() |
8ad2fdd71e | ||
![]() |
a2e45a2211 | ||
![]() |
621c2b9015 | ||
![]() |
b39d1e9b9d | ||
![]() |
e1c456407e | ||
![]() |
3fe8251dfb | ||
![]() |
930a45e7a9 | ||
![]() |
afc66554d7 | ||
![]() |
998ab15570 | ||
![]() |
c0d258ca17 | ||
![]() |
230e4547e8 | ||
![]() |
4cf33909ee |
@@ -4,6 +4,7 @@ Makefile
|
||||
libtool
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
aclocal.m4.bak
|
||||
configure
|
||||
config.h
|
||||
config.status
|
||||
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>.
|
||||
Copyright (c) 1996 - 2009, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
49
MacOSX-Framework
Executable file
49
MacOSX-Framework
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# This script performs all of the steps needed to build a 32 bit
|
||||
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||
|
||||
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||
|
||||
SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
|
||||
MINVER='-mmacosx-version-min=10.4'
|
||||
|
||||
ARCHES='-arch ppc -arch i386'
|
||||
|
||||
# Use these values instead to produce a 64 bit framework that only works on 10.5.
|
||||
# You can't currently build a combined 32/64 framework.
|
||||
#SDK='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
#
|
||||
#MINVER='-mmacosx-version-min=10.5'
|
||||
#
|
||||
#ARCHES='-arch ppc64 -arch x86_64'
|
||||
|
||||
|
||||
if test -d $SDK; then
|
||||
echo "Configuring libcurl for 32 bit universal framework..."
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||
CFLAGS="-isysroot $SDK $ARCHES $MINVER" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK $ARCHES $MINVER -Wl,-headerpad_max_install_names"
|
||||
|
||||
echo "Building libcurl..."
|
||||
make
|
||||
|
||||
echo "Creating framework..."
|
||||
rm -r libcurl.framework
|
||||
mkdir -p libcurl.framework/Versions/A/Resources
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
|
||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
|
||||
mkdir -p libcurl.framework/Versions/A/Headers
|
||||
cp include/curl/*.h libcurl.framework/Versions/A/Headers
|
||||
cd libcurl.framework
|
||||
ln -fs Versions/A/libcurl libcurl
|
||||
ln -fs Versions/A/Resources Resources
|
||||
ln -fs Versions/A/Headers Headers
|
||||
cd Versions
|
||||
ln -fs A Current
|
||||
|
||||
echo "libcurl.framework is built and can now be included in other projects."
|
||||
else
|
||||
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
|
||||
fi
|
19
Makefile.am
19
Makefile.am
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
@@ -23,8 +23,11 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat libcurl.pc.in
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
|
||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
@@ -74,6 +77,10 @@ endif
|
||||
examples:
|
||||
@(cd docs/examples; $(MAKE) check)
|
||||
|
||||
clean-local:
|
||||
@(cd tests; $(MAKE) clean)
|
||||
@(cd docs; $(MAKE) clean)
|
||||
|
||||
#
|
||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||
# must contain the following line:
|
||||
@@ -102,7 +109,7 @@ rpm:
|
||||
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
|
||||
|
||||
#
|
||||
# Build a Solaris pkkgadd format file
|
||||
# Build a Solaris pkgadd format file
|
||||
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
|
||||
# file (which ends up back in this directory).
|
||||
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
|
||||
@@ -135,3 +142,7 @@ uninstall-hook:
|
||||
ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
@perl $< -b -l -u lib/ca-bundle.crt
|
||||
|
||||
ca-firefox: lib/firefox-db2pem.sh
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
@@ -256,13 +256,22 @@ linux: all
|
||||
|
||||
linux-ssl: ssl
|
||||
|
||||
|
||||
vc8:
|
||||
@echo "generate VC8 makefiles"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
|
||||
|
||||
# VC9 makefiles are for use with VS2008
|
||||
vc9:
|
||||
@echo "generate VC9 makefiles"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
|
||||
|
||||
ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
@perl $< -b -l -u lib/ca-bundle.crt
|
||||
|
||||
|
||||
ca-firefox: lib/firefox-db2pem.sh
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||
|
5
README
5
README
@@ -30,10 +30,9 @@ CONTACT
|
||||
|
||||
WEB SITE
|
||||
|
||||
Visit the curl web site or mirrors for the latest news and downloads:
|
||||
Visit the curl web site for the latest news and downloads:
|
||||
|
||||
Sweden http://curl.haxx.se/
|
||||
Mirrors http://curlm.haxx.se/
|
||||
http://curl.haxx.se/
|
||||
|
||||
CVS
|
||||
|
||||
|
104
RELEASE-NOTES
104
RELEASE-NOTES
@@ -1,68 +1,70 @@
|
||||
Curl and libcurl 7.18.2
|
||||
Curl and libcurl 7.19.4
|
||||
|
||||
Public curl releases: 105
|
||||
Command line options: 126
|
||||
curl_easy_setopt() options: 150
|
||||
Public curl releases: 110
|
||||
Command line options: 132
|
||||
curl_easy_setopt() options: 163
|
||||
Public functions in libcurl: 58
|
||||
Public web site mirrors: 37
|
||||
Known libcurl bindings: 36
|
||||
Contributors: 636
|
||||
Known libcurl bindings: 38
|
||||
Contributors: 700
|
||||
|
||||
This release includes the following security-related fix:
|
||||
|
||||
o CVE-2009-0037 with the curl advisory here:
|
||||
http://curl.haxx.se/docs/adv_20090303.html
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o CURLFORM_STREAM was added
|
||||
o CURLOPT_NOBODY is now supported over SFTP
|
||||
o curl can now run on Symbian OS
|
||||
o curl -w redirect_url and CURLINFO_REDIRECT_URL
|
||||
o added curl_easy_send() and curl_easy_recv()
|
||||
|
||||
o Added CURLOPT_NOPROXY and the corresponding --noproxy
|
||||
o the OpenSSL-specific code disables TICKET (rfc5077) which is enabled by
|
||||
default in openssl 0.9.8j
|
||||
o Added CURLOPT_TFTP_BLKSIZE
|
||||
o Added CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC - with
|
||||
the corresponding curl options --socks5-gssapi-service and
|
||||
--socks5-gssapi-nec
|
||||
o Improved IPv6 support when built with with c-ares >= 1.6.1
|
||||
o Added CURLPROXY_HTTP_1_0 and --proxy1.0
|
||||
o Added docs/libcurl/symbols-in-versions
|
||||
o Added CURLINFO_CONDITION_UNMET
|
||||
o Added support for Digest and NTLM authentication using GnuTLS
|
||||
o CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 to retry the CWD even
|
||||
when MKD fails
|
||||
o GnuTLS initing moved to curl_global_init()
|
||||
o Added CURLOPT_REDIR_PROTOCOLS and CURLOPT_PROTOCOLS
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o CURLOPT_NOBODY first set to TRUE and then FALSE for HTTP no longer causes
|
||||
the confusion that could lead to a hung transfer
|
||||
o curl_easy_reset() resets the max redirect limit properly
|
||||
o configure now correctly recognizes Heimdal and MIT gssapi libraries
|
||||
o malloc() failure check in Negotiate
|
||||
o -i and -I together now work the same no matter what order they're used
|
||||
o the typechecker can be bypassed by defining CURL_DISABLE_TYPECHECK
|
||||
o a pointer mixup could make the FTP code send bad user+password under rare
|
||||
circumstances (found when using curlftpfs)
|
||||
o CURLOPT_OPENSOCKETFUNCTION can now be used to create a unix domain socket
|
||||
o CURLOPT_TCP_NODELAY crash due to getprotobyname() use
|
||||
o libcurl sometimes sent body twice when using CURLAUTH_ANY
|
||||
o configure detecting debug-enabled c-ares
|
||||
o microsecond resolution keys for internal splay trees
|
||||
o krb4 and krb5 ftp segfault
|
||||
o multi interface busy loop for CONNECT requests
|
||||
o internal time differences now use monotonic time source if available
|
||||
o several curl_multi_socket() fixes
|
||||
o builds fine for Haiku OS
|
||||
o follow redirect with only a new query string
|
||||
o SCP and SFTP memory leaks on aborted transfers
|
||||
o curl_multi_socket() and HTTP pipelining transfer stalls
|
||||
o lost telnet data on an EWOULDBLOCK condition
|
||||
o missing ssh.obj in VS makefiles
|
||||
o FTP ;type=i URLs now work with CURLOPT_PROXY_TRANSFER_MODE in Turkish
|
||||
locale
|
||||
o realms with quoted quotation marks in HTTP Digest headers
|
||||
o VC9 makefiles are now really included
|
||||
o multi interface memory leak with CURLMOPT_MAXCONNECTS set
|
||||
o CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with
|
||||
CURLOPT_NOBODY set true
|
||||
o memory leak on some libz errors for content encodings
|
||||
o NSS-enabled build is repaired
|
||||
o superfluous wait in SFTP downloads removed
|
||||
o FTP with the multi interface no longer kills the control connection as
|
||||
easily on transfer failures
|
||||
o compilation halting when using VS2008 to build a Windows 2000 target
|
||||
o ease creation of libcurl Mac OS X Framework
|
||||
o CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD are -1
|
||||
if unknown
|
||||
o Negotiate proxy authentication
|
||||
o CURLOPT_INTERFACE and CURLOPT_LOCALPORT used together
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
o see docs/KNOWN_BUGS (http://curl.haxx.se/docs/knownbugs.html)
|
||||
|
||||
Other curl-related news:
|
||||
|
||||
o pycurl 7.18.1 was released: http://pycurl.sf.net/
|
||||
o brand new curl Haskell binding:
|
||||
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl
|
||||
|
||||
New curl mirrors:
|
||||
|
||||
o
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Michal Marek, Daniel Fandrich, Scott Barrett, Alexey Simak, Daniel Black,
|
||||
Rafa Muyo, Andre Guibert de Bruet, Brock Noland, Sandor Feldi, Stefan Krause,
|
||||
David Shaw, Norbert Frese, Bart Whiteley, Jean-Francois Bertrand, Ben Van Hof,
|
||||
Yuriy Sosov, Christopher Palow, Yang Tse, Liam Healy, Nikolai Kondrashov,
|
||||
David Rosenstrauch, Andreas Faerber, Scott McCreary, Jeff Weber, Emil Romanus
|
||||
Lisa Xu, Daniel Fandrich, Craig A West, Alexey Borzov, Sharad Gupta,
|
||||
Peter Sylvester, Chad Monroe, Markus Moeller, Yang Tse, Scott Cantor,
|
||||
Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet,
|
||||
Kamil Dudka, Patrik Thunstrom, Linus Nielsen Feltzing, Mark Incley,
|
||||
Daniel Johnson, James Cheng, Brian J. Murrell, Senthil Raja Velu,
|
||||
Markus Koetter, David Kierznowski, Michal Marek
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
20
TODO-RELEASE
20
TODO-RELEASE
@@ -1,17 +1,11 @@
|
||||
To be addressed before 7.18.2 (planned release: June 2008)
|
||||
=============================
|
||||
To be addressed in 7.19.5 (planned release: May 2009)
|
||||
=========================
|
||||
|
||||
To be addressed before 7.18.3 (planned release: August 2008)
|
||||
=============================
|
||||
216 - Markus Moeller's "proxy question" to reverse lookup SOCKS proxys and more
|
||||
|
||||
139 - Christopher Palow's CURLM_EASY_HANDLE_EXISTS patch
|
||||
215 - Patch for Metalink Support (for the curl tool)
|
||||
|
||||
140 - Arnaud Ebalard and Axel Tillequin's CRL support and issuer check patches
|
||||
|
||||
141 - The sponsored feature CURLINFO_PRIMARY_IP that returns the IP address
|
||||
as a string for the most recently used connection.
|
||||
|
||||
144 - Help apps use 64bit/LFS libcurl!
|
||||
|
||||
145 -
|
||||
220 - Take advantage of libssh2_version() that's been added for the upcoming
|
||||
1.1, to extract the run-time version number properly.
|
||||
|
||||
221 -
|
||||
|
2059
acinclude.m4
2059
acinclude.m4
File diff suppressed because it is too large
Load Diff
51
ares/AUTHORS
51
ares/AUTHORS
@@ -1,34 +1,37 @@
|
||||
c-ares is based on ares, and these are the people that have worked on it since
|
||||
the fork was made:
|
||||
|
||||
Daniel Stenberg
|
||||
Dominick Meglio
|
||||
liren at vivisimo.com
|
||||
James Bursa
|
||||
Duncan Wilcox
|
||||
Dirk Manske
|
||||
Alexander Lazic
|
||||
Alexey Simak
|
||||
Andreas Rieke
|
||||
Ashish Sharma
|
||||
Brad House
|
||||
Brad Spencer
|
||||
Bram Matthys
|
||||
Dan Fandrich
|
||||
Daniel Stenberg
|
||||
Dirk Manske
|
||||
Dominick Meglio
|
||||
Doug Goldstein
|
||||
Duncan Wilcox
|
||||
Eino Tuominen
|
||||
Erik Kline
|
||||
George Neill
|
||||
Gisle Vanem
|
||||
Guilherme Balena Versiani
|
||||
Gunter Knauf
|
||||
Henrik Stoerner
|
||||
Yang Tse
|
||||
Nick Mathewson
|
||||
Alexander Lazic
|
||||
Andreas Rieke
|
||||
Guilherme Balena Versiani
|
||||
Brad Spencer
|
||||
Ravi Pratap
|
||||
William Ahern
|
||||
Bram Matthys
|
||||
James Bursa
|
||||
Michael Wallner
|
||||
Vlad Dinulescu
|
||||
Brad House
|
||||
Shmulik Regev
|
||||
Ashish Sharma
|
||||
Steinar H. Gunderson
|
||||
Nick Mathewson
|
||||
Phil Blundell
|
||||
Ravi Pratap
|
||||
Robin Cornelius
|
||||
Erik Kline
|
||||
Alexey Simak
|
||||
Eino Tuominen
|
||||
Doug Goldstein
|
||||
Sebastian at basti79.de
|
||||
Shmulik Regev
|
||||
Steinar H. Gunderson
|
||||
Tofu Linden
|
||||
Vlad Dinulescu
|
||||
William Ahern
|
||||
Yang Tse
|
||||
liren at vivisimo.com
|
||||
|
247
ares/CHANGES
247
ares/CHANGES
@@ -1,5 +1,252 @@
|
||||
Changelog for the c-ares project
|
||||
|
||||
* February 20 2009 (Yang Tse)
|
||||
- Do not halt compilation when using VS2008 to build a Windows 2000 target.
|
||||
|
||||
* February 3 2009 (Phil Blundell)
|
||||
- If the server returns garbage or nothing at all in response to an AAAA query,
|
||||
go on and ask for A records anyway.
|
||||
|
||||
* January 31 2009 (Daniel Stenberg)
|
||||
- ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving
|
||||
either AF_INET6 or AF_INET. It works by accepting any of the looksups in the
|
||||
hosts file, and it resolves the AAAA field with a fallback to A.
|
||||
|
||||
* January 14 2009 (Daniel Stenberg)
|
||||
- ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it
|
||||
now declares the private struct ares_in6_addr for all systems instead of
|
||||
relying on one possibly not present in the system.
|
||||
|
||||
* January 13 2009 (Phil Blundell)
|
||||
- ares__send_query() now varies the retry timeout pseudo-randomly to avoid
|
||||
packet storms when several queries were started at the same time.
|
||||
|
||||
* January 11 2009 (Daniel Stenberg)
|
||||
- Phil Blundell added the internal function ares__expand_name_for_response()
|
||||
that is now used by the ares_parse_*_reply() functions instead of the
|
||||
ares_expand_name() simply to easier return ARES_EBADRESP for the cases where
|
||||
the name expansion fails as in responses that really isn't expected.
|
||||
|
||||
Version 1.6.0 (Dec 9, 2008)
|
||||
|
||||
* December 9 2008 (Gisle Vanem)
|
||||
|
||||
Fixes for Win32 targets using the Watt-32 tcp/ip stack.
|
||||
|
||||
* Dec 4 2008 (Daniel Stenberg)
|
||||
|
||||
Gregor Jasny provided the patch that introduces ares_set_socket_callback(),
|
||||
and I edited it to also get duped by ares_dup().
|
||||
|
||||
* Dec 3 2008 (Daniel Stenberg)
|
||||
|
||||
API changes:
|
||||
|
||||
I made sure the public ares_config struct looks like before and yet it
|
||||
supports the ROTATE option thanks to c-ares now storing the "optmask"
|
||||
internally. Thus we should be ABI compatible with the past release(s)
|
||||
now. My efforts mentioned below should not break backwards ABI compliance.
|
||||
|
||||
Here's how I suggest we proceed with the API:
|
||||
|
||||
ares_init() will be primary "channel creator" function.
|
||||
|
||||
ares_init_options() will continue to work exactly like now and before. For
|
||||
starters, it will be the (only) way to set the existing options.
|
||||
|
||||
ares_save_options() will continue to work like today, but will ONLY save
|
||||
options that you can set today (including ARES_OPT_ROTATE actually) but new
|
||||
options that we add may not be saved with this.
|
||||
|
||||
Instead we introduce:
|
||||
|
||||
ares_dup() that instead can make a new channel and clone the config used
|
||||
from an existing channel. It will then clone all config options, including
|
||||
future new things we add.
|
||||
|
||||
ares_set_*() style functions that set (new) config options. As a start we
|
||||
simply add these for new functionality, but over time we can also introduce
|
||||
them for existing "struct ares_options" so that we can eventually deprecate
|
||||
the two ares_*_options() functions.
|
||||
|
||||
ares_get_*() style functions for extracting info from a channel handle that
|
||||
should be used instead of ares_save_options().
|
||||
|
||||
* Nov 26 2008 (Yang Tse)
|
||||
- Brad Spencer provided changes to allow buildconf to work on OS X.
|
||||
|
||||
- Gerald Combs fixed a bug in ares_parse_ptr_reply() which would cause a
|
||||
buffer to shrink instead of expand if a reply contained 8 or more records.
|
||||
|
||||
* Nov 25 2008 (Yang Tse)
|
||||
- In preparation for the upcomming IPv6 nameservers patch, the internal
|
||||
ares_addr union is now changed into an internal struct which also holds
|
||||
the address family.
|
||||
|
||||
* Nov 19 2008 (Daniel Stenberg)
|
||||
- Brad Spencer brought the new function ares_gethostbyname_file() which simply
|
||||
resolves a host name from the given file, using the regular hosts syntax.
|
||||
|
||||
* Nov 1 2008 (Daniel Stenberg)
|
||||
- Carlo Contavalli added support for the glibc "rotate" option, as documented
|
||||
in man resolv.conf:
|
||||
|
||||
causes round robin selection of nameservers from among those listed. This
|
||||
has the effect of spreading the query load among all listed servers, rather
|
||||
than having all clients try the first listed server first every time.
|
||||
|
||||
You can enable it with ARES_OPT_ROTATE
|
||||
|
||||
* Oct 21 2008 (Yang Tse)
|
||||
Charles Hardin added handling of EINPROGRESS for UDP connects.
|
||||
|
||||
* Oct 18 2008 (Daniel Stenberg)
|
||||
Charles Hardin made adig support a regular numerical dotted IP address for the
|
||||
-s option as well.
|
||||
|
||||
* Oct 7 2008 (Yang Tse)
|
||||
- Added --enable-optimize configure option to enable and disable compiler
|
||||
optimizations to allow decoupled setting from --enable-debug.
|
||||
|
||||
* Oct 2 2008 (Yang Tse)
|
||||
- Added --enable-warnings configure option to enable and disable strict
|
||||
compiler warnings to allow decoupled setting from --enable-debug.
|
||||
|
||||
* Sep 17 2008 (Yang Tse)
|
||||
- Code reorganization to allow internal/private use of "nameser.h" to any
|
||||
system that lacks arpa/nameser.h or arpa/nameser_compat.h header files.
|
||||
|
||||
* Sep 16 2008 (Yang Tse)
|
||||
- Code reorganization to allow internal/private use of ares_writev to any
|
||||
system that lacks the writev function.
|
||||
|
||||
* Sep 15 2008 (Yang Tse)
|
||||
- Code reorganization to allow internal/private use of ares_strcasecmp to any
|
||||
system that lacks the strcasecmp function.
|
||||
|
||||
- Improve configure detection of some string functions.
|
||||
|
||||
* Sep 11 2008 (Yang Tse)
|
||||
- Code reorganization to allow internal/private use of ares_strdup to any
|
||||
system that lacks the strdup function.
|
||||
|
||||
Version 1.5.3 (Aug 29, 2008)
|
||||
|
||||
* Aug 25 2008 (Yang Tse)
|
||||
- Improvement by Brad House:
|
||||
|
||||
This patch addresses an issue in which a response could be sent back to the
|
||||
source port of a client from a different address than the request was made to.
|
||||
This is one form of a DNS cache poisoning attack.
|
||||
|
||||
The patch simply uses recvfrom() rather than recv() and validates that the
|
||||
address returned from recvfrom() matches the address of the server we have
|
||||
connected to. Only necessary on UDP sockets as they are connection-less, TCP
|
||||
is unaffected.
|
||||
|
||||
- Fix by George Neill:
|
||||
Fixed compilation of acountry sample application failure on some systems.
|
||||
|
||||
* Aug 4 2008 (Daniel Stenberg)
|
||||
- Fix by Tofu Linden:
|
||||
|
||||
The symptom:
|
||||
* Users (usually, but not always) on 2-Wire routers and the Comcast service
|
||||
and a wired connection to their router would find that the second and
|
||||
subsequent DNS lookups from fresh processes using c-ares to resolve the same
|
||||
address would cause the process to never see a reply (it keeps polling for
|
||||
around 1m15s before giving up).
|
||||
|
||||
The repro:
|
||||
* On such a machine (and yeah, it took us a lot of QA to find the systems
|
||||
that reproduce such a specific problem!), do 'ahost www.secondlife.com',
|
||||
then do it again. The first process's lookup will work, subsequent lookups
|
||||
will time-out and fail.
|
||||
|
||||
The cause:
|
||||
* init_id_key() was calling randomize_key() *before* it initialized
|
||||
key->state, meaning that the randomness generated by randomize_key() is
|
||||
immediately overwritten with deterministic values. (/dev/urandom was also
|
||||
being read incorrectly in the c-ares version we were using, but this was
|
||||
fixed in a later version.)
|
||||
* This makes the stream of generated query-IDs from any new c-ares process
|
||||
be an identical and predictable sequence of IDs.
|
||||
* This makes the 2-Wire's default built-in DNS server detect these queries
|
||||
as probable-duplicates and (erroneously) not respond at all.
|
||||
|
||||
|
||||
* Aug 4 2008 (Yang Tse)
|
||||
- Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
|
||||
Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62
|
||||
version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols
|
||||
no matter if the system is AIX or not. To keep the traditional behaviour,
|
||||
and an uniform one across autoconf versions AC_AIX is replaced with our
|
||||
own internal macro CARES_CHECK_AIX_ALL_SOURCE.
|
||||
|
||||
* Aug 1 2008 (Yang Tse)
|
||||
- Configure process now checks if the preprocessor _REENTRANT symbol is already
|
||||
defined. If it isn't currently defined a set of checks are performed to test
|
||||
if its definition is required to make visible to the compiler a set of *_r
|
||||
functions. Finally, if _REENTRANT is already defined or needed it takes care
|
||||
of making adjustments necessary to ensure that it is defined equally for the
|
||||
configure process tests and generated config file.
|
||||
|
||||
* Jul 20 2008 (Yang Tse)
|
||||
- When recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
|
||||
now cause the definition, as appropriate, of RECVFROM_TYPE_ARG2_IS_VOID,
|
||||
RECVFROM_TYPE_ARG5_IS_VOID or RECVFROM_TYPE_ARG6_IS_VOID.
|
||||
|
||||
* Jul 17 2008 (Yang Tse)
|
||||
- RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
|
||||
to the data type pointed by its respective argument and not the pointer type.
|
||||
|
||||
* Jul 16 2008 (Yang Tse)
|
||||
- Improved configure detection of number of arguments for getservbyport_r.
|
||||
Detection is now based on compilation checks instead of linker ones.
|
||||
|
||||
- Configure process now checks availability of recvfrom() socket function and
|
||||
finds out its return type and the types of its arguments. Added definitions
|
||||
for non-configure systems config files, and introduced macro sreadfrom which
|
||||
will be used on udp sockets as a recvfrom() wrapper in the future.
|
||||
|
||||
* Jul 15 2008 (Yang Tse)
|
||||
- Introduce definition of _REENTRANT symbol in setup.h to improve library
|
||||
usability. Previously the configure process only used the AC_SYS_LARGEFILE
|
||||
macro for debug builds, now it is also used for non-debug ones enabling the
|
||||
use of configure options --enable-largefile and --disable-largefile which
|
||||
might be needed for library compatibility. Remove checking the size of
|
||||
curl_off_t, it is no longer needed.
|
||||
|
||||
* Jul 3 2008 (Daniel Stenberg)
|
||||
- Phil Blundell: If you ask ares_gethostbyname() to do an AF_INET6 lookup and
|
||||
the target host has only A records, it automatically falls back to an
|
||||
AF_INET lookup and gives you the A results. However, if the target host has
|
||||
a CNAME record, this behaviour is defeated since the original query does
|
||||
return some data even though ares_parse_aaa_reply() doesn't consider it
|
||||
relevant. Here's a small patch to make it behave the same with and without
|
||||
the CNAME.
|
||||
|
||||
* Jul 2 2008 (Yang Tse)
|
||||
- Fallback to gettimeofday when monotonic clock is unavailable at run-time.
|
||||
|
||||
* Jun 30 2008 (Daniel Stenberg)
|
||||
|
||||
- As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is
|
||||
not posix or anything and thus c-ares failed to build on hurd (and possibly
|
||||
elsewhere). The define was also somewhat artificially used in the windows
|
||||
port. Now, I instead rewrote the use of gethostbyname to enlarge the host
|
||||
name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN
|
||||
define. I thus also removed the defien from the namser.h file where it was
|
||||
once added for the windows build.
|
||||
|
||||
I also fixed init_by_defaults() function to not leak memory in case if
|
||||
error.
|
||||
|
||||
* Jun 9 2008 (Yang Tse)
|
||||
|
||||
- Make libcares.pc generated file for pkg-config include information relative
|
||||
to the libraries needed for the static linking of c-ares.
|
||||
|
||||
* May 30 2008 (Yang Tse)
|
||||
|
||||
- Brad House fixed a missing header file inclusion in adig sample program.
|
||||
|
@@ -1,4 +1,30 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
||||
# $(top_builddir), to ensure that these paths which belong to the library
|
||||
# being currently built and tested are searched before the library which
|
||||
# might possibly already be installed in the system.
|
||||
#
|
||||
# When using the low-level hard-hacking memory leak tracking code from
|
||||
# libcurl the generated curl/curlbuild.h file must also be reachable.
|
||||
# Using the libcurl lowlevel code from within c-ares library is ugly and
|
||||
# only works when c-ares is built and linked with a similarly debug-build
|
||||
# libcurl, but we do this anyway for convenience.
|
||||
#
|
||||
# $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
|
||||
# $(top_builddir) is for c-ares's generated config.h file
|
||||
# $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files
|
||||
|
||||
if CURLDEBUG
|
||||
INCLUDES = -I$(top_builddir)/../include \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)
|
||||
else
|
||||
INCLUDES = -I$(top_builddir) \
|
||||
-I$(top_srcdir)
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libcares.la
|
||||
|
||||
@@ -19,7 +45,8 @@ noinst_PROGRAMS =$(PROGS)
|
||||
# regular sources and headers
|
||||
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
|
||||
Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES) \
|
||||
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz
|
||||
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
|
||||
TODO
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcares.pc
|
||||
|
@@ -11,10 +11,10 @@ include ../packages/DOS/common.dj
|
||||
include Makefile.inc
|
||||
|
||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
||||
-DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \
|
||||
-DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
||||
-DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' \
|
||||
-DHAVE_PROCESS_H -DHAVE_ARPA_NAMESER_H -DHAVE_SYS_SOCKET_H \
|
||||
-DHAVE_IOCTLSOCKET_FIONBIO -DHAVE_STRUCT_IN6_ADDR \
|
||||
-DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID -DHAVE_SYS_TIME_H \
|
||||
-DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
||||
-DHAVE_ARPA_NAMESER_H -DHAVE_ARPA_INET_H -DHAVE_SYS_SOCKET_H \
|
||||
-DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H \
|
||||
-DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND -DHAVE_GETTIMEOFDAY \
|
||||
-DSEND_TYPE_ARG1='int' -DSEND_QUAL_ARG2='const' \
|
||||
@@ -23,7 +23,13 @@ CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
||||
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
|
||||
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
|
||||
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
||||
-Dselect=select_s -Dsocklen_t=int -UHAVE_CONFIG_H
|
||||
-Dselect=select_s -Dsocklen_t=int -UHAVE_CONFIG_H \
|
||||
-DRECVFROM_TYPE_ARG1='int' -DRECVFROM_TYPE_ARG2='void' \
|
||||
-DRECVFROM_TYPE_ARG3='int' -DRECVFROM_TYPE_ARG4='int' \
|
||||
-DRECVFROM_TYPE_ARG6='int' -DRECVFROM_TYPE_RETV='int' \
|
||||
-DRECVFROM_TYPE_ARG5='struct sockaddr' -DHAVE_RECVFROM \
|
||||
-DRECVFROM_TYPE_ARG2_IS_VOID -DHAVE_STRDUP -DHAVE_NETDB_H \
|
||||
-DHAVE_STRCASECMP -DHAVE_STRNCASECMP -DHAVE_GETHOSTNAME
|
||||
|
||||
LDFLAGS = -s
|
||||
|
||||
|
@@ -3,14 +3,14 @@ ares_query.c ares__close_sockets.c ares_free_string.c ares_search.c \
|
||||
ares__get_hostent.c ares_gethostbyaddr.c ares_send.c ares__read_line.c \
|
||||
ares_gethostbyname.c ares_strerror.c ares_cancel.c ares_init.c \
|
||||
ares_timeout.c ares_destroy.c ares_mkquery.c ares_version.c \
|
||||
ares_expand_name.c ares_parse_a_reply.c windows_port.c \
|
||||
ares_expand_name.c ares_parse_a_reply.c windows_port.c ares_strdup.c \
|
||||
ares_expand_string.c ares_parse_ptr_reply.c ares_parse_aaaa_reply.c \
|
||||
ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c \
|
||||
ares_parse_ns_reply.c ares_llist.c ares__timeval.c
|
||||
ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c ares_writev.c \
|
||||
ares_parse_ns_reply.c ares_llist.c ares__timeval.c ares_strcasecmp.c
|
||||
|
||||
HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h \
|
||||
nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h \
|
||||
setup_once.h ares_llist.h
|
||||
nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h setup_once.h \
|
||||
ares_llist.h ares_strdup.h ares_strcasecmp.h ares_writev.h
|
||||
|
||||
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
||||
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
|
||||
@@ -18,5 +18,6 @@ MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
||||
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
|
||||
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
|
||||
ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \
|
||||
ares_getsock.3 ares_parse_ns_reply.3 \
|
||||
ares_destroy_options.3 ares_save_options.3
|
||||
ares_getsock.3 ares_parse_ns_reply.3 ares_dup.3 \
|
||||
ares_destroy_options.3 ares_save_options.3 ares_gethostbyname_file.3 \
|
||||
ares_set_socket_callback.3
|
||||
|
@@ -75,7 +75,7 @@ MKDIR = mkdir
|
||||
MPKXDC = mkxdc
|
||||
|
||||
# Global flags for all compilers
|
||||
CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
|
||||
CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
|
||||
|
||||
ifeq ($(CC),mwccnlm)
|
||||
LD = mwldnlm
|
||||
@@ -160,7 +160,7 @@ lib: prebuild $(LTARGET)
|
||||
|
||||
nlm: prebuild $(TARGETS)
|
||||
|
||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h
|
||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
|
||||
|
||||
install: $(INSTDIR) all
|
||||
@$(CP) *.nlm $(INSTDIR)
|
||||
@@ -282,13 +282,21 @@ config.h: Makefile.netware
|
||||
@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
|
||||
@echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
|
||||
@echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
|
||||
@@ -296,15 +304,12 @@ ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define socklen_t int$(DL) >> $@
|
||||
@echo $(DL)#define strncasecmp strnicmp$(DL) >> $@
|
||||
@echo $(DL)#define strcasecmp stricmp$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
|
||||
@@ -318,6 +323,9 @@ else
|
||||
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
||||
@@ -325,6 +333,14 @@ else
|
||||
@echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
|
||||
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
|
||||
@@ -334,22 +350,23 @@ else
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETHOSTNAME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_RECV 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SEND 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
|
||||
@@ -372,8 +389,8 @@ endif
|
||||
@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
|
||||
@echo $(DL)#define RETSIGTYPE void$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
|
||||
@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
|
||||
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
|
||||
@@ -394,9 +411,3 @@ ifdef OLD_NOVELLSDK
|
||||
@echo $(DL)#define socklen_t int$(DL) >> $@
|
||||
endif
|
||||
|
||||
arpa/nameser.h: nameser.h
|
||||
@echo Fix missing header $@
|
||||
@-mkdir arpa
|
||||
@$(CP) $< arpa
|
||||
|
||||
|
||||
|
@@ -26,7 +26,7 @@ OBJ_DIR = VC6_obj
|
||||
DEF_FILE = cares.def
|
||||
|
||||
!if "$(USE_WATT32)" == "1"
|
||||
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -I$(WATT_ROOT)\inc
|
||||
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -D_USE_32BIT_TIME_T -I$(WATT_ROOT)\inc
|
||||
EX_LIBS = $(WATT_ROOT)\lib\wattcpvc_imp.lib
|
||||
|
||||
!else
|
||||
@@ -57,6 +57,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\ares__read_line.obj \
|
||||
$(OBJ_DIR)\ares_gethostbyname.obj \
|
||||
$(OBJ_DIR)\ares_getnameinfo.obj \
|
||||
$(OBJ_DIR)\ares_strcasecmp.obj \
|
||||
$(OBJ_DIR)\ares_strerror.obj \
|
||||
$(OBJ_DIR)\ares_cancel.obj \
|
||||
$(OBJ_DIR)\ares_init.obj \
|
||||
@@ -73,6 +74,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\windows_port.obj \
|
||||
$(OBJ_DIR)\ares_expand_string.obj \
|
||||
$(OBJ_DIR)\ares_parse_ptr_reply.obj \
|
||||
$(OBJ_DIR)\ares_writev.obj \
|
||||
$(OBJ_DIR)\bitncmp.obj \
|
||||
$(OBJ_DIR)\inet_net_pton.obj \
|
||||
$(OBJ_DIR)\inet_ntop.obj
|
||||
@@ -111,6 +113,7 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
||||
@echo ares_parse_ptr_reply >> $@
|
||||
@echo ares_parse_ns_reply >> $@
|
||||
@echo ares_process >> $@
|
||||
@echo ares_process_fd >> $@
|
||||
@echo ares_query >> $@
|
||||
@echo ares_search >> $@
|
||||
@echo ares_strerror >> $@
|
||||
@@ -121,9 +124,11 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
||||
@echo ares_inet_net_pton >> $@
|
||||
@echo ares_inet_ntop >> $@
|
||||
@echo ares_inet_pton >> $@
|
||||
@echo ares_writev >> $@
|
||||
@echo ares_getnameinfo >> $@
|
||||
@echo ares_parse_aaaa_reply >> $@
|
||||
!if "$(USE_WATT32)" == "0"
|
||||
@echo ares_writev >> $@
|
||||
!endif
|
||||
|
||||
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
||||
@@ -183,6 +188,8 @@ $(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h \
|
||||
$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h \
|
||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h
|
||||
|
||||
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h
|
||||
|
||||
$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h
|
||||
|
||||
$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \
|
||||
@@ -242,3 +249,6 @@ $(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
|
||||
|
||||
$(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_llist.h
|
||||
|
||||
$(OBJ_DIR)\ares_writev.obj: ares_writev.c setup.h setup_once.h ares.h \
|
||||
ares_writev.h
|
||||
|
@@ -27,7 +27,7 @@ call ares_process() when select() returns.
|
||||
Some features are missing from the current version of ares, relative
|
||||
to the BIND resolver:
|
||||
|
||||
* There is no IPV6 support.
|
||||
* There is no IPV6 support. [not true for c-ares]
|
||||
* There is no hostname verification.
|
||||
* There is no logging of unexpected events.
|
||||
* There is no debugging-oriented logging.
|
||||
|
@@ -11,7 +11,7 @@ c-ares is not API compatible with ares: a new name makes that more obvious to
|
||||
the public.
|
||||
|
||||
The full source code is available in the 'c-ares' release archives, and in the
|
||||
'ares' subdir of the curl CVS source repostitory.
|
||||
'ares' subdir of the curl CVS source repository.
|
||||
|
||||
If you find bugs, correct flaws, have questions or have comments in general in
|
||||
regard to c-ares (or by all means the original ares too), get in touch with us
|
||||
@@ -22,4 +22,4 @@ original ares.
|
||||
|
||||
You'll find all c-ares details and news here:
|
||||
|
||||
http://daniel.haxx.se/projects/c-ares
|
||||
http://c-ares.haxx.se/
|
||||
|
@@ -1,10 +1,19 @@
|
||||
This is what's new and changed in the c-ares 1.5.3 release:
|
||||
This is what's new and changed in the c-ares 1.6.1 release:
|
||||
|
||||
o adig sample application compilation failure on some systems
|
||||
Changed:
|
||||
|
||||
o in6_addr is not used in ares.h anymore, but a private ares_in6_addr is
|
||||
instead declared and used
|
||||
p ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
|
||||
either AF_INET6 or AF_INET
|
||||
|
||||
Fixed:
|
||||
|
||||
o ares_parse_*_reply() functions now return ARES_EBADRESP instead of
|
||||
ARES_EBADNAME if the name in the response failed to decode
|
||||
|
||||
Thanks go to these friendly people for their efforts and contributions:
|
||||
|
||||
Brad House
|
||||
and obviously Daniel Stenberg
|
||||
Phil Blundell
|
||||
|
||||
Have fun!
|
||||
|
8
ares/TODO
Normal file
8
ares/TODO
Normal file
@@ -0,0 +1,8 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
ares_gethostbyname
|
||||
|
||||
- When built to support IPv6, it needs to also support PF_UNSPEC or similar,
|
||||
so that an application can ask for any protocol and then c-ares would return
|
||||
all known resolves and not just explicitly IPv4 _or_ IPv6 resolves.
|
1030
ares/acinclude.m4
1030
ares/acinclude.m4
File diff suppressed because it is too large
Load Diff
@@ -47,9 +47,10 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
@@ -60,6 +61,25 @@
|
||||
#include "inet_net_pton.h"
|
||||
#include "inet_ntop.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
# define strdup(ptr) ares_strdup(ptr)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strcasecmp(p1,p2) ares_strcasecmp(p1,p2)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n)
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
#endif
|
||||
|
||||
static const char *usage = "acountry [-vh?] {host|addr} ...\n";
|
||||
static const char nerd_fmt[] = "%u.%u.%u.%u.zz.countries.nerd.dk";
|
||||
static const char *nerd_ver1 = nerd_fmt + 14;
|
||||
@@ -90,7 +110,7 @@ int main(int argc, char **argv)
|
||||
ares_channel channel;
|
||||
int ch, status;
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
|
||||
WSADATA wsaData;
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
@@ -158,7 +178,7 @@ int main(int argc, char **argv)
|
||||
wait_ares(channel);
|
||||
ares_destroy(channel);
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
@@ -236,7 +256,7 @@ struct search_list {
|
||||
const char *long_name; /* normal country name */
|
||||
};
|
||||
|
||||
const struct search_list *list_lookup(int number, const struct search_list *list, int num)
|
||||
static const struct search_list *list_lookup(int number, const struct search_list *list, int num)
|
||||
{
|
||||
while (num > 0 && list->long_name)
|
||||
{
|
||||
@@ -504,7 +524,8 @@ static int is_addr(char *str, char **end)
|
||||
{
|
||||
int a0, a1, a2, a3, num, rc = 0, length = 0;
|
||||
|
||||
if ((num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length)) == 4 &&
|
||||
num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length);
|
||||
if( (num == 4) &&
|
||||
BYTE_OK(a0) && BYTE_OK(a1) && BYTE_OK(a2) && BYTE_OK(a3) &&
|
||||
length >= (3+4))
|
||||
{
|
||||
@@ -532,6 +553,7 @@ static void find_country_from_cname(const char *cname, struct in_addr addr)
|
||||
z0 = tolower(cname[0]);
|
||||
z1 = tolower(cname[1]);
|
||||
ccopy = strdup(cname);
|
||||
dot_4 = NULL;
|
||||
|
||||
ver_1 = (z0 == 'z' && z1 == 'z' && !strcasecmp(cname+4,nerd_ver1));
|
||||
ver_2 = (is_addr(ccopy,&dot_4) && !strcasecmp(dot_4,nerd_ver2));
|
||||
@@ -563,8 +585,8 @@ static void find_country_from_cname(const char *cname, struct in_addr addr)
|
||||
|
||||
if (ver_1)
|
||||
{
|
||||
ccode_A2[0] = tolower(cname[2]);
|
||||
ccode_A2[1] = tolower(cname[3]);
|
||||
ccode_A2[0] = (char)tolower(cname[2]);
|
||||
ccode_A2[1] = (char)tolower(cname[3]);
|
||||
ccode_A2[2] = '\0';
|
||||
}
|
||||
else
|
||||
|
149
ares/adig.c
149
ares/adig.c
@@ -17,26 +17,35 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.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_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -48,8 +57,24 @@
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "inet_ntop.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_getopt.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
# define strdup(ptr) ares_strdup(ptr)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strcasecmp(p1,p2) ares_strcasecmp(p1,p2)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n)
|
||||
#endif
|
||||
|
||||
#ifdef WATT32
|
||||
#undef WIN32 /* Redefined in MingW headers */
|
||||
#endif
|
||||
@@ -127,6 +152,7 @@ static const char *opcodes[] = {
|
||||
"UPDATEA", "UPDATED", "UPDATEDA", "UPDATEM", "UPDATEMA",
|
||||
"ZONEINIT", "ZONEREF"
|
||||
};
|
||||
struct in_addr inaddr;
|
||||
|
||||
static const char *rcodes[] = {
|
||||
"NOERROR", "FORMERR", "SERVFAIL", "NXDOMAIN", "NOTIMP", "REFUSED",
|
||||
@@ -188,11 +214,15 @@ int main(int argc, char **argv)
|
||||
|
||||
case 's':
|
||||
/* Add a server, and specify servers in the option mask. */
|
||||
hostent = gethostbyname(optarg);
|
||||
if (!hostent || hostent->h_addrtype != AF_INET)
|
||||
if (ares_inet_pton(AF_INET, optarg, &inaddr) <= 0)
|
||||
{
|
||||
fprintf(stderr, "adig: server %s not found.\n", optarg);
|
||||
return 1;
|
||||
hostent = gethostbyname(optarg);
|
||||
if (!hostent || hostent->h_addrtype != AF_INET)
|
||||
{
|
||||
fprintf(stderr, "adig: server %s not found.\n", optarg);
|
||||
return 1;
|
||||
}
|
||||
memcpy(&inaddr, hostent->h_addr, sizeof(struct in_addr));
|
||||
}
|
||||
options.servers = realloc(options.servers, (options.nservers + 1)
|
||||
* sizeof(struct in_addr));
|
||||
@@ -201,7 +231,7 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "Out of memory!\n");
|
||||
return 1;
|
||||
}
|
||||
memcpy(&options.servers[options.nservers], hostent->h_addr,
|
||||
memcpy(&options.servers[options.nservers], &inaddr,
|
||||
sizeof(struct in_addr));
|
||||
options.nservers++;
|
||||
optmask |= ARES_OPT_SERVERS;
|
||||
@@ -436,13 +466,16 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
const unsigned char *abuf, int alen)
|
||||
{
|
||||
const unsigned char *p;
|
||||
char *name;
|
||||
int type, dnsclass, ttl, dlen, status;
|
||||
long len;
|
||||
char addr[46];
|
||||
union {
|
||||
unsigned char * as_uchar;
|
||||
char * as_char;
|
||||
} name;
|
||||
|
||||
/* Parse the RR name. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
aptr += len;
|
||||
@@ -452,7 +485,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
*/
|
||||
if (aptr + RRFIXEDSZ > abuf + alen)
|
||||
{
|
||||
ares_free_string(name);
|
||||
ares_free_string(name.as_char);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -465,16 +498,16 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + dlen > abuf + alen)
|
||||
{
|
||||
ares_free_string(name);
|
||||
ares_free_string(name.as_char);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Display the RR name, class, and type. */
|
||||
printf("\t%-15s.\t%d", name, ttl);
|
||||
printf("\t%-15s.\t%d", name.as_char, ttl);
|
||||
if (dnsclass != C_IN)
|
||||
printf("\t%s", class_name(dnsclass));
|
||||
printf("\t%s", type_name(type));
|
||||
ares_free_string(name);
|
||||
ares_free_string(name.as_char);
|
||||
|
||||
/* Display the RR data. Don't touch aptr. */
|
||||
switch (type)
|
||||
@@ -488,11 +521,11 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
case T_NS:
|
||||
case T_PTR:
|
||||
/* For these types, the RR data is just a domain name. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t%s.", name);
|
||||
ares_free_string(name);
|
||||
printf("\t%s.", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
break;
|
||||
|
||||
case T_HINFO:
|
||||
@@ -512,17 +545,17 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
case T_MINFO:
|
||||
/* The RR data is two domain names. */
|
||||
p = aptr;
|
||||
status = ares_expand_name(p, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(p, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t%s.", name);
|
||||
ares_free_string(name);
|
||||
printf("\t%s.", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
p += len;
|
||||
status = ares_expand_name(p, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(p, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t%s.", name);
|
||||
ares_free_string(name);
|
||||
printf("\t%s.", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
break;
|
||||
|
||||
case T_MX:
|
||||
@@ -532,11 +565,11 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
if (dlen < 2)
|
||||
return NULL;
|
||||
printf("\t%d", DNS__16BIT(aptr));
|
||||
status = ares_expand_name(aptr + 2, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(aptr + 2, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t%s.", name);
|
||||
ares_free_string(name);
|
||||
printf("\t%s.", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
break;
|
||||
|
||||
case T_SOA:
|
||||
@@ -544,17 +577,17 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
* numbers giving the serial number and some timeouts.
|
||||
*/
|
||||
p = aptr;
|
||||
status = ares_expand_name(p, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(p, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t%s.\n", name);
|
||||
ares_free_string(name);
|
||||
printf("\t%s.\n", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
p += len;
|
||||
status = ares_expand_name(p, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(p, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s.\n", name);
|
||||
ares_free_string(name);
|
||||
printf("\t\t\t\t\t\t%s.\n", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
p += len;
|
||||
if (p + 20 > aptr + dlen)
|
||||
return NULL;
|
||||
@@ -605,11 +638,11 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
printf(" %d", DNS__16BIT(aptr + 2));
|
||||
printf(" %d", DNS__16BIT(aptr + 4));
|
||||
|
||||
status = ares_expand_name(aptr + 6, abuf, alen, &name, &len);
|
||||
status = ares_expand_name(aptr + 6, abuf, alen, &name.as_char, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t%s.", name);
|
||||
ares_free_string(name);
|
||||
printf("\t%s.", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
break;
|
||||
|
||||
case T_NAPTR:
|
||||
@@ -618,32 +651,32 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
printf(" %d\n", DNS__16BIT(aptr + 2)); /* preference */
|
||||
|
||||
p = aptr + 4;
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
printf("\t\t\t\t\t\t%s\n", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
printf("\t\t\t\t\t\t%s\n", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
printf("\t\t\t\t\t\t%s\n", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s", name);
|
||||
ares_free_string(name);
|
||||
printf("\t\t\t\t\t\t%s", name.as_char);
|
||||
ares_free_string(name.as_char);
|
||||
break;
|
||||
|
||||
|
||||
|
15
ares/ahost.c
15
ares/ahost.c
@@ -43,6 +43,21 @@
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_getopt.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
# define strdup(ptr) ares_strdup(ptr)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strcasecmp(p1,p2) ares_strcasecmp(p1,p2)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n)
|
||||
#endif
|
||||
|
||||
static void callback(void *arg, int status, int timeouts, struct hostent *host);
|
||||
static void usage(void);
|
||||
|
||||
|
60
ares/ares.h
60
ares/ares.h
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007 by Daniel Stenberg
|
||||
* Copyright (C) 2007-2009 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -29,10 +29,11 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(_AIX) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
||||
libc5-based Linux systems. Only include it on system that are known to
|
||||
require it! */
|
||||
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
||||
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
|
||||
@@ -51,8 +52,8 @@
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -114,6 +115,7 @@ extern "C" {
|
||||
#define ARES_OPT_SOCK_SNDBUF (1 << 11)
|
||||
#define ARES_OPT_SOCK_RCVBUF (1 << 12)
|
||||
#define ARES_OPT_TIMEOUTMS (1 << 13)
|
||||
#define ARES_OPT_ROTATE (1 << 14)
|
||||
|
||||
/* Nameinfo flag values */
|
||||
#define ARES_NI_NOFQDN (1 << 0)
|
||||
@@ -179,6 +181,23 @@ typedef void (*ares_sock_state_cb)(void *data,
|
||||
|
||||
struct apattern;
|
||||
|
||||
/* NOTE about the ares_options struct to users and developers.
|
||||
|
||||
This struct will remain looking like this. It will not be extended nor
|
||||
shrunk in future releases, but all new options will be set by ares_set_*()
|
||||
options instead of with the ares_init_options() function.
|
||||
|
||||
Eventually (in a galaxy far far away), all options will be settable by
|
||||
ares_set_*() options and the ares_init_options() function will become
|
||||
deprecated.
|
||||
|
||||
When new options are added to c-ares, they are not added to this
|
||||
struct. And they are not "saved" with the ares_save_options() function but
|
||||
instead we encourage the use of the ares_dup() function. Needless to say,
|
||||
if you add config options to c-ares you need to make sure ares_dup()
|
||||
duplicates this new option.
|
||||
|
||||
*/
|
||||
struct ares_options {
|
||||
int flags;
|
||||
int timeout; /* in seconds or milliseconds, depending on options */
|
||||
@@ -210,14 +229,21 @@ typedef void (*ares_host_callback)(void *arg, int status, int timeouts,
|
||||
struct hostent *hostent);
|
||||
typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts,
|
||||
char *node, char *service);
|
||||
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
|
||||
int type, void *data);
|
||||
|
||||
int ares_init(ares_channel *channelptr);
|
||||
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
int optmask);
|
||||
int ares_save_options(ares_channel channel, struct ares_options *options, int *optmask);
|
||||
int ares_save_options(ares_channel channel, struct ares_options *options,
|
||||
int *optmask);
|
||||
void ares_destroy_options(struct ares_options *options);
|
||||
int ares_dup(ares_channel *dest, ares_channel src);
|
||||
void ares_destroy(ares_channel channel);
|
||||
void ares_cancel(ares_channel channel);
|
||||
void ares_set_socket_callback(ares_channel channel,
|
||||
ares_sock_create_callback callback,
|
||||
void *user_data);
|
||||
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
ares_callback callback, void *arg);
|
||||
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
||||
@@ -226,6 +252,8 @@ void ares_search(ares_channel channel, const char *name, int dnsclass,
|
||||
int type, ares_callback callback, void *arg);
|
||||
void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
||||
ares_host_callback callback, void *arg);
|
||||
int ares_gethostbyname_file(ares_channel channel, const char *name,
|
||||
int family, struct hostent **host);
|
||||
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
|
||||
int family, ares_host_callback callback, void *arg);
|
||||
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
||||
@@ -247,21 +275,29 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
|
||||
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
|
||||
int alen, unsigned char **s, long *enclen);
|
||||
|
||||
#if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr)
|
||||
struct in6_addr {
|
||||
/*
|
||||
* NOTE: before c-ares 1.6.1 we would most often use the system in6_addr
|
||||
* struct below when ares itself was built, but many apps would use this
|
||||
* private version since the header checked a HAVE_* define for it. Starting
|
||||
* with 1.6.1 we always declare and use our own to stop relying on the
|
||||
* system's one.
|
||||
*/
|
||||
struct ares_in6_addr {
|
||||
union {
|
||||
unsigned char _S6_u8[16];
|
||||
} _S6_un;
|
||||
};
|
||||
#define s6_addr _S6_un._S6_u8
|
||||
#endif
|
||||
|
||||
/*
|
||||
* TODO: the structs 'addrttl' and 'addr6ttl' really should get their names
|
||||
* prefixed with ares_ to keep them in our own "name space".
|
||||
*/
|
||||
struct addrttl {
|
||||
struct in_addr ipaddr;
|
||||
int ttl;
|
||||
};
|
||||
struct addr6ttl {
|
||||
struct in6_addr ip6addr;
|
||||
struct ares_in6_addr ip6addr;
|
||||
int ttl;
|
||||
};
|
||||
|
||||
@@ -276,12 +312,12 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host,
|
||||
struct addrttl *addrttls, int *naddrttls);
|
||||
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host,
|
||||
struct addr6ttl *addrttls, int *naddrttls);
|
||||
struct hostent **host,
|
||||
struct addr6ttl *addrttls, int *naddrttls);
|
||||
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
int addrlen, int family, struct hostent **host);
|
||||
int ares_parse_ns_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host);
|
||||
struct hostent **host);
|
||||
void ares_free_string(void *str);
|
||||
void ares_free_hostent(struct hostent *host);
|
||||
const char *ares_strerror(int code);
|
||||
|
@@ -18,11 +18,19 @@
|
||||
#include "setup.h"
|
||||
|
||||
#if !defined(WIN32) || defined(WATT32)
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -30,8 +38,8 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||
{
|
||||
@@ -60,17 +68,21 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||
*p = 0;
|
||||
addr.s_addr = inet_addr(line);
|
||||
if (addr.s_addr == INADDR_NONE)
|
||||
{
|
||||
if (ares_inet_pton(AF_INET6, line, &addr6) > 0)
|
||||
{
|
||||
if (family != AF_INET6)
|
||||
continue;
|
||||
addrlen = sizeof(struct in6_addr);
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
{
|
||||
/* It wasn't an AF_INET dotted address, then AF_UNSPEC and AF_INET6
|
||||
families are subject for this further check */
|
||||
if ((family != AF_INET) &&
|
||||
(ares_inet_pton(AF_INET6, line, &addr6) > 0)) {
|
||||
addrlen = sizeof(struct in6_addr);
|
||||
family = AF_INET6;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
else if (family == AF_UNSPEC)
|
||||
family = AF_INET; /* now confirmed! */
|
||||
else if (family != AF_INET)
|
||||
/* unknown, keep moving */
|
||||
continue;
|
||||
|
||||
/* Get the canonical hostname. */
|
||||
|
@@ -46,9 +46,24 @@ struct timeval ares__tvnow(void)
|
||||
*/
|
||||
struct timeval now;
|
||||
struct timespec tsnow;
|
||||
(void)clock_gettime(CLOCK_MONOTONIC, &tsnow);
|
||||
now.tv_sec = tsnow.tv_sec;
|
||||
now.tv_usec = tsnow.tv_nsec / 1000;
|
||||
if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) {
|
||||
now.tv_sec = tsnow.tv_sec;
|
||||
now.tv_usec = tsnow.tv_nsec / 1000;
|
||||
}
|
||||
/*
|
||||
** Even when the configure process has truly detected monotonic clock
|
||||
** availability, it might happen that it is not actually available at
|
||||
** run-time. When this occurs simply fallback to other time source.
|
||||
*/
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
else
|
||||
(void)gettimeofday(&now, NULL);
|
||||
#else
|
||||
else {
|
||||
now.tv_sec = (long)time(NULL);
|
||||
now.tv_usec = 0;
|
||||
}
|
||||
#endif
|
||||
return now;
|
||||
}
|
||||
|
||||
|
43
ares/ares_dup.3
Normal file
43
ares/ares_dup.3
Normal file
@@ -0,0 +1,43 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this
|
||||
.\" software and its documentation for any purpose and without
|
||||
.\" fee is hereby granted, provided that the above copyright
|
||||
.\" notice appear in all copies and that both that copyright
|
||||
.\" notice and this permission notice appear in supporting
|
||||
.\" documentation, and that the name of M.I.T. not be used in
|
||||
.\" advertising or publicity pertaining to distribution of the
|
||||
.\" software without specific, written prior permission.
|
||||
.\" M.I.T. makes no representations about the suitability of
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_DUP 3 "2 Dec 2008"
|
||||
.SH NAME
|
||||
ares_dup \- Duplicate a resolver channel
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B int ares_dup(ares_channel *\fIchannel\fP, ares_channel \fIsource\fP)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The \fBares_dup(3)\fP function duplicates an existing communications channel
|
||||
for name service lookups. If it returns successfully, \fBares_dup(3)\fP will
|
||||
set the variable pointed to by \fIchannel\fP to a handle used to identify the
|
||||
name service channel. The caller should invoke \fIares_destroy(3)\fP on the
|
||||
handle when the channel is no longer needed.
|
||||
|
||||
The \fBares_dup_options\fP function also initializes a name service channel,
|
||||
with additional options set exactly as the \fIsource\fP channel has them
|
||||
configured.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_init(3)
|
||||
.SH AVAILABILITY
|
||||
ares_dup(3) was added in c-ares 1.6.0
|
||||
.SH AUTHOR
|
||||
Daniel Stenberg
|
||||
|
@@ -17,14 +17,19 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -172,3 +177,14 @@ static int name_length(const unsigned char *encoded, const unsigned char *abuf,
|
||||
*/
|
||||
return (n) ? n - 1 : n;
|
||||
}
|
||||
|
||||
/* Like ares_expand_name but returns EBADRESP in case of invalid input. */
|
||||
int ares__expand_name_for_response(const unsigned char *encoded,
|
||||
const unsigned char *abuf, int alen,
|
||||
char **s, long *enclen)
|
||||
{
|
||||
int status = ares_expand_name(encoded, abuf, alen, s, enclen);
|
||||
if (status == ARES_EBADNAME)
|
||||
status = ARES_EBADRESP;
|
||||
return status;
|
||||
}
|
||||
|
@@ -17,11 +17,16 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
@@ -16,16 +16,25 @@
|
||||
*/
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -33,8 +42,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifdef WATT32
|
||||
#undef WIN32
|
||||
@@ -43,8 +52,7 @@
|
||||
struct addr_query {
|
||||
/* Arguments passed to ares_gethostbyaddr() */
|
||||
ares_channel channel;
|
||||
union ares_addr addr;
|
||||
int family;
|
||||
struct ares_addr addr;
|
||||
ares_host_callback callback;
|
||||
void *arg;
|
||||
|
||||
@@ -57,8 +65,8 @@ static void addr_callback(void *arg, int status, int timeouts,
|
||||
unsigned char *abuf, int alen);
|
||||
static void end_aquery(struct addr_query *aquery, int status,
|
||||
struct hostent *host);
|
||||
static int file_lookup(union ares_addr *addr, int family, struct hostent **host);
|
||||
static void ptr_rr_name(char *name, int family, union ares_addr *addr);
|
||||
static int file_lookup(struct ares_addr *addr, struct hostent **host);
|
||||
static void ptr_rr_name(char *name, const struct ares_addr *addr);
|
||||
|
||||
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
|
||||
int family, ares_host_callback callback, void *arg)
|
||||
@@ -86,10 +94,10 @@ void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
|
||||
}
|
||||
aquery->channel = channel;
|
||||
if (family == AF_INET)
|
||||
memcpy(&aquery->addr.addr4, addr, sizeof(struct in_addr));
|
||||
memcpy(&aquery->addr.addrV4, addr, sizeof(struct in_addr));
|
||||
else
|
||||
memcpy(&aquery->addr.addr6, addr, sizeof(struct in6_addr));
|
||||
aquery->family = family;
|
||||
memcpy(&aquery->addr.addrV6, addr, sizeof(struct in6_addr));
|
||||
aquery->addr.family = family;
|
||||
aquery->callback = callback;
|
||||
aquery->arg = arg;
|
||||
aquery->remaining_lookups = channel->lookups;
|
||||
@@ -110,13 +118,13 @@ static void next_lookup(struct addr_query *aquery)
|
||||
switch (*p)
|
||||
{
|
||||
case 'b':
|
||||
ptr_rr_name(name, aquery->family, &aquery->addr);
|
||||
ptr_rr_name(name, &aquery->addr);
|
||||
aquery->remaining_lookups = p + 1;
|
||||
ares_query(aquery->channel, name, C_IN, T_PTR, addr_callback,
|
||||
aquery);
|
||||
return;
|
||||
case 'f':
|
||||
status = file_lookup(&aquery->addr, aquery->family, &host);
|
||||
status = file_lookup(&aquery->addr, &host);
|
||||
|
||||
/* this status check below previously checked for !ARES_ENOTFOUND,
|
||||
but we should not assume that this single error code is the one
|
||||
@@ -141,11 +149,11 @@ static void addr_callback(void *arg, int status, int timeouts,
|
||||
aquery->timeouts += timeouts;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
if (aquery->family == AF_INET)
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addr4,
|
||||
if (aquery->addr.family == AF_INET)
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
|
||||
sizeof(struct in_addr), AF_INET, &host);
|
||||
else
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addr6,
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
|
||||
sizeof(struct in6_addr), AF_INET6, &host);
|
||||
end_aquery(aquery, status, host);
|
||||
}
|
||||
@@ -164,7 +172,7 @@ static void end_aquery(struct addr_query *aquery, int status,
|
||||
free(aquery);
|
||||
}
|
||||
|
||||
static int file_lookup(union ares_addr *addr, int family, struct hostent **host)
|
||||
static int file_lookup(struct ares_addr *addr, struct hostent **host)
|
||||
{
|
||||
FILE *fp;
|
||||
int status;
|
||||
@@ -217,21 +225,21 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host)
|
||||
return ARES_EFILE;
|
||||
}
|
||||
}
|
||||
while ((status = ares__get_hostent(fp, family, host)) == ARES_SUCCESS)
|
||||
while ((status = ares__get_hostent(fp, addr->family, host)) == ARES_SUCCESS)
|
||||
{
|
||||
if (family != (*host)->h_addrtype)
|
||||
if (addr->family != (*host)->h_addrtype)
|
||||
{
|
||||
ares_free_hostent(*host);
|
||||
continue;
|
||||
}
|
||||
if (family == AF_INET)
|
||||
if (addr->family == AF_INET)
|
||||
{
|
||||
if (memcmp((*host)->h_addr, &addr->addr4, sizeof(struct in_addr)) == 0)
|
||||
if (memcmp((*host)->h_addr, &addr->addrV4, sizeof(struct in_addr)) == 0)
|
||||
break;
|
||||
}
|
||||
else if (family == AF_INET6)
|
||||
else if (addr->family == AF_INET6)
|
||||
{
|
||||
if (memcmp((*host)->h_addr, &addr->addr6, sizeof(struct in6_addr)) == 0)
|
||||
if (memcmp((*host)->h_addr, &addr->addrV6, sizeof(struct in6_addr)) == 0)
|
||||
break;
|
||||
}
|
||||
ares_free_hostent(*host);
|
||||
@@ -244,11 +252,11 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host)
|
||||
return status;
|
||||
}
|
||||
|
||||
static void ptr_rr_name(char *name, int family, union ares_addr *addr)
|
||||
static void ptr_rr_name(char *name, const struct ares_addr *addr)
|
||||
{
|
||||
if (family == AF_INET)
|
||||
if (addr->family == AF_INET)
|
||||
{
|
||||
unsigned long laddr = ntohl(addr->addr4.s_addr);
|
||||
unsigned long laddr = ntohl(addr->addrV4.s_addr);
|
||||
int a1 = (int)((laddr >> 24) & 0xff);
|
||||
int a2 = (int)((laddr >> 16) & 0xff);
|
||||
int a3 = (int)((laddr >> 8) & 0xff);
|
||||
@@ -257,14 +265,17 @@ static void ptr_rr_name(char *name, int family, union ares_addr *addr)
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned char *bytes = (unsigned char *)&addr->addr6.s6_addr;
|
||||
unsigned char *bytes = (unsigned char *)&addr->addrV6.s6_addr;
|
||||
/* There are too many arguments to do this in one line using
|
||||
* minimally C89-compliant compilers */
|
||||
sprintf(name,
|
||||
"%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x."
|
||||
"%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.ip6.arpa",
|
||||
"%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.",
|
||||
bytes[15]&0xf, bytes[15] >> 4, bytes[14]&0xf, bytes[14] >> 4,
|
||||
bytes[13]&0xf, bytes[13] >> 4, bytes[12]&0xf, bytes[12] >> 4,
|
||||
bytes[11]&0xf, bytes[11] >> 4, bytes[10]&0xf, bytes[10] >> 4,
|
||||
bytes[9]&0xf, bytes[9] >> 4, bytes[8]&0xf, bytes[8] >> 4,
|
||||
bytes[9]&0xf, bytes[9] >> 4, bytes[8]&0xf, bytes[8] >> 4);
|
||||
sprintf(name+strlen(name),
|
||||
"%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.ip6.arpa",
|
||||
bytes[7]&0xf, bytes[7] >> 4, bytes[6]&0xf, bytes[6] >> 4,
|
||||
bytes[5]&0xf, bytes[5] >> 4, bytes[4]&0xf, bytes[4] >> 4,
|
||||
bytes[3]&0xf, bytes[3] >> 4, bytes[2]&0xf, bytes[2] >> 4,
|
||||
|
@@ -17,19 +17,25 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -41,9 +47,9 @@
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "bitncmp.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifdef WATT32
|
||||
#undef WIN32
|
||||
@@ -55,7 +61,8 @@ struct host_query {
|
||||
char *name;
|
||||
ares_host_callback callback;
|
||||
void *arg;
|
||||
int family;
|
||||
int sent_family; /* this family is what was is being used */
|
||||
int want_family; /* this family is what is asked for in the API */
|
||||
const char *remaining_lookups;
|
||||
int timeouts;
|
||||
};
|
||||
@@ -65,29 +72,34 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
unsigned char *abuf, int alen);
|
||||
static void end_hquery(struct host_query *hquery, int status,
|
||||
struct hostent *host);
|
||||
static int fake_hostent(const char *name, int family, ares_host_callback callback,
|
||||
void *arg);
|
||||
static int fake_hostent(const char *name, int family,
|
||||
ares_host_callback callback, void *arg);
|
||||
static int file_lookup(const char *name, int family, struct hostent **host);
|
||||
static void sort_addresses(struct hostent *host, struct apattern *sortlist,
|
||||
int nsort);
|
||||
static void sort6_addresses(struct hostent *host, struct apattern *sortlist,
|
||||
int nsort);
|
||||
static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
|
||||
int nsort);
|
||||
static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist,
|
||||
int nsort);
|
||||
static void sort_addresses(struct hostent *host,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
static void sort6_addresses(struct hostent *host,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
static int get_address_index(const struct in_addr *addr,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
static int get6_address_index(const struct in6_addr *addr,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
|
||||
void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
||||
ares_host_callback callback, void *arg)
|
||||
{
|
||||
struct host_query *hquery;
|
||||
|
||||
/* Right now we only know how to look up Internet addresses. */
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
{
|
||||
callback(arg, ARES_ENOTIMP, 0, NULL);
|
||||
return;
|
||||
}
|
||||
/* Right now we only know how to look up Internet addresses - and unspec
|
||||
means try both basically. */
|
||||
switch (family) {
|
||||
case AF_INET:
|
||||
case AF_INET6:
|
||||
case AF_UNSPEC:
|
||||
break;
|
||||
default:
|
||||
callback(arg, ARES_ENOTIMP, 0, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (fake_hostent(name, family, callback, arg))
|
||||
return;
|
||||
@@ -101,13 +113,13 @@ void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
||||
}
|
||||
hquery->channel = channel;
|
||||
hquery->name = strdup(name);
|
||||
hquery->family = family;
|
||||
if (!hquery->name)
|
||||
{
|
||||
free(hquery);
|
||||
callback(arg, ARES_ENOMEM, 0, NULL);
|
||||
return;
|
||||
}
|
||||
hquery->want_family = family;
|
||||
hquery->sent_family = -1; /* nothing is sent yet */
|
||||
if (!hquery->name) {
|
||||
free(hquery);
|
||||
callback(arg, ARES_ENOMEM, 0, NULL);
|
||||
return;
|
||||
}
|
||||
hquery->callback = callback;
|
||||
hquery->arg = arg;
|
||||
hquery->remaining_lookups = channel->lookups;
|
||||
@@ -130,17 +142,23 @@ static void next_lookup(struct host_query *hquery, int status_code)
|
||||
case 'b':
|
||||
/* DNS lookup */
|
||||
hquery->remaining_lookups = p + 1;
|
||||
if (hquery->family == AF_INET6)
|
||||
if ((hquery->want_family == AF_INET6) ||
|
||||
(hquery->want_family == AF_UNSPEC)) {
|
||||
/* if inet6 or unspec, start out with AAAA */
|
||||
hquery->sent_family = AF_INET6;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_AAAA,
|
||||
host_callback, hquery);
|
||||
else
|
||||
}
|
||||
else {
|
||||
hquery->sent_family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
|
||||
hquery);
|
||||
}
|
||||
return;
|
||||
|
||||
case 'f':
|
||||
/* Host file lookup */
|
||||
status = file_lookup(hquery->name, hquery->family, &host);
|
||||
status = file_lookup(hquery->name, hquery->want_family, &host);
|
||||
|
||||
/* this status check below previously checked for !ARES_ENOTFOUND,
|
||||
but we should not assume that this single error code is the one
|
||||
@@ -167,24 +185,34 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
hquery->timeouts += timeouts;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
if (hquery->family == AF_INET)
|
||||
if (hquery->sent_family == AF_INET)
|
||||
{
|
||||
status = ares_parse_a_reply(abuf, alen, &host, NULL, NULL);
|
||||
if (host && channel->nsort)
|
||||
sort_addresses(host, channel->sortlist, channel->nsort);
|
||||
}
|
||||
else if (hquery->family == AF_INET6)
|
||||
else if (hquery->sent_family == AF_INET6)
|
||||
{
|
||||
status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
|
||||
if (status == ARES_ENODATA || status == ARES_EBADRESP) {
|
||||
/* The query returned something but either there were no AAAA records (e.g. just CNAME)
|
||||
or the response was malformed. Try looking up A instead.
|
||||
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
|
||||
hquery->sent_family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A,
|
||||
host_callback, hquery);
|
||||
return;
|
||||
}
|
||||
if (host && channel->nsort)
|
||||
sort6_addresses(host, channel->sortlist, channel->nsort);
|
||||
}
|
||||
end_hquery(hquery, status, host);
|
||||
}
|
||||
else if (status == ARES_ENODATA && hquery->family == AF_INET6)
|
||||
else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
|
||||
{
|
||||
/* There was no AAAA. Now lookup an A */
|
||||
hquery->family = AF_INET;
|
||||
/* The AAAA query yielded no useful result. Now look up an A instead.
|
||||
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
|
||||
hquery->sent_family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
|
||||
hquery);
|
||||
}
|
||||
@@ -230,8 +258,8 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
|
||||
numdots++;
|
||||
}
|
||||
}
|
||||
|
||||
/* if we don't have 3 dots, it is illegal
|
||||
|
||||
/* if we don't have 3 dots, it is illegal
|
||||
* (although inet_addr doesn't think so).
|
||||
*/
|
||||
if (numdots != 3)
|
||||
@@ -274,6 +302,33 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This is an API method */
|
||||
int ares_gethostbyname_file(ares_channel channel, const char *name,
|
||||
int family, struct hostent **host)
|
||||
{
|
||||
int result;
|
||||
|
||||
/* We only take the channel to ensure that ares_init() been called. */
|
||||
if(channel == NULL)
|
||||
{
|
||||
/* Anything will do, really. This seems fine, and is consistent with
|
||||
other error cases. */
|
||||
*host = NULL;
|
||||
return ARES_ENOTFOUND;
|
||||
}
|
||||
|
||||
/* Just chain to the internal implementation we use here; it's exactly
|
||||
* what we want.
|
||||
*/
|
||||
result = file_lookup(name, family, host);
|
||||
if(result != ARES_SUCCESS)
|
||||
{
|
||||
/* We guarantee a NULL hostent on failure. */
|
||||
*host = NULL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static int file_lookup(const char *name, int family, struct hostent **host)
|
||||
{
|
||||
FILE *fp;
|
||||
@@ -349,7 +404,7 @@ static int file_lookup(const char *name, int family, struct hostent **host)
|
||||
return status;
|
||||
}
|
||||
|
||||
static void sort_addresses(struct hostent *host, struct apattern *sortlist,
|
||||
static void sort_addresses(struct hostent *host, const struct apattern *sortlist,
|
||||
int nsort)
|
||||
{
|
||||
struct in_addr a1, a2;
|
||||
@@ -379,7 +434,8 @@ static void sort_addresses(struct hostent *host, struct apattern *sortlist,
|
||||
/* Find the first entry in sortlist which matches addr. Return nsort
|
||||
* if none of them match.
|
||||
*/
|
||||
static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
|
||||
static int get_address_index(const struct in_addr *addr,
|
||||
const struct apattern *sortlist,
|
||||
int nsort)
|
||||
{
|
||||
int i;
|
||||
@@ -390,13 +446,13 @@ static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
|
||||
continue;
|
||||
if (sortlist[i].type == PATTERN_MASK)
|
||||
{
|
||||
if ((addr->s_addr & sortlist[i].mask.addr.addr4.s_addr)
|
||||
== sortlist[i].addr.addr4.s_addr)
|
||||
if ((addr->s_addr & sortlist[i].mask.addr4.s_addr)
|
||||
== sortlist[i].addrV4.s_addr)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addr.addr4.s_addr,
|
||||
if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr,
|
||||
sortlist[i].mask.bits))
|
||||
break;
|
||||
}
|
||||
@@ -404,7 +460,7 @@ static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
|
||||
return i;
|
||||
}
|
||||
|
||||
static void sort6_addresses(struct hostent *host, struct apattern *sortlist,
|
||||
static void sort6_addresses(struct hostent *host, const struct apattern *sortlist,
|
||||
int nsort)
|
||||
{
|
||||
struct in6_addr a1, a2;
|
||||
@@ -434,8 +490,9 @@ static void sort6_addresses(struct hostent *host, struct apattern *sortlist,
|
||||
/* Find the first entry in sortlist which matches addr. Return nsort
|
||||
* if none of them match.
|
||||
*/
|
||||
static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist,
|
||||
int nsort)
|
||||
static int get6_address_index(const struct in6_addr *addr,
|
||||
const struct apattern *sortlist,
|
||||
int nsort)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -443,7 +500,7 @@ static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist,
|
||||
{
|
||||
if (sortlist[i].family != AF_INET6)
|
||||
continue;
|
||||
if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addr.addr6.s6_addr, sortlist[i].mask.bits))
|
||||
if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addrV6.s6_addr, sortlist[i].mask.bits))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
|
84
ares/ares_gethostbyname_file.3
Normal file
84
ares/ares_gethostbyname_file.3
Normal file
@@ -0,0 +1,84 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this
|
||||
.\" software and its documentation for any purpose and without
|
||||
.\" fee is hereby granted, provided that the above copyright
|
||||
.\" notice appear in all copies and that both that copyright
|
||||
.\" notice and this permission notice appear in supporting
|
||||
.\" documentation, and that the name of M.I.T. not be used in
|
||||
.\" advertising or publicity pertaining to distribution of the
|
||||
.\" software without specific, written prior permission.
|
||||
.\" M.I.T. makes no representations about the suitability of
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_GETHOSTBYNAME 3 "25 July 1998"
|
||||
.SH NAME
|
||||
ares_gethostbyname_file \- Lookup a name in the system's hosts file
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B void ares_gethostbyname_file(ares_channel \fIchannel\fP, const char *\fIname\fP,
|
||||
.B int \fIfamily\fP, struct hostent **host)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B ares_gethostbyname_file
|
||||
function performs a host lookup by name against the system's hosts file (or equivalent local hostname database).
|
||||
The
|
||||
.IR channel
|
||||
parameter is required, but no asynchronous queries are performed. Instead, the
|
||||
lookup is done via the same mechanism used to perform 'f' lookups
|
||||
(see the
|
||||
.I lookups
|
||||
options field in \fIares_init_options(3)\fP).
|
||||
The parameter
|
||||
.I name
|
||||
gives the hostname as a NUL-terminated C string, and
|
||||
.I family
|
||||
gives the desired type of address for the resulting host entry.
|
||||
.PP
|
||||
The return value indicates whether the query succeeded and, if not, how it
|
||||
failed. It may have any of the following values:
|
||||
.TP 19
|
||||
.B ARES_SUCCESS
|
||||
The host lookup completed successfully and
|
||||
.I host
|
||||
now points to the result (and must be freed with \fIares_free_hostent(3)\fP).
|
||||
.TP 19
|
||||
.B ARES_ENOTFOUND
|
||||
The hostname
|
||||
.I name
|
||||
was not found.
|
||||
.TP 19
|
||||
.B ARES_EFILE
|
||||
There was a file I/O error while performing the lookup.
|
||||
.TP 19
|
||||
.B ARES_ENOMEM
|
||||
Memory was exhausted.
|
||||
.PP
|
||||
On successful completion of the query, the pointer pointed to by
|
||||
.I host
|
||||
points to a
|
||||
.B struct hostent
|
||||
containing the address of the host returned by the lookup. The user must
|
||||
free the memory pointed to by
|
||||
.IR host
|
||||
when finished with it by calling \fIares_free_hostent(3)\fP. If the lookup did
|
||||
not complete successfully,
|
||||
.I host
|
||||
will be
|
||||
.BR NULL .
|
||||
.SH AVAILABILITY
|
||||
Added in c-ares 1.5.4
|
||||
.SH SEE ALSO
|
||||
.BR ares_gethostbyname (3),
|
||||
.BR ares_free_hostent (3),
|
||||
.BR ares_init_options (3)
|
||||
.SH AUTHOR
|
||||
Brad Spencer
|
||||
.br
|
||||
Copyright 1998 by the Massachusetts Institute of Technology.
|
@@ -16,17 +16,32 @@
|
||||
*/
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_GETSERVBYPORT_R
|
||||
# if !defined(GETSERVBYPORT_R_ARGS) || \
|
||||
(GETSERVBYPORT_R_ARGS < 4) || (GETSERVBYPORT_R_ARGS > 6)
|
||||
# error "you MUST specifiy a valid number of arguments for getservbyport_r"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NET_IF_H
|
||||
@@ -42,9 +57,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
#include "ares_ipv6.h"
|
||||
#include "inet_ntop.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifdef WATT32
|
||||
#undef WIN32
|
||||
@@ -210,6 +225,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
|
||||
We do this by determining our own domain name, then searching the string
|
||||
for this domain name and removing it.
|
||||
*/
|
||||
#ifdef HAVE_GETHOSTNAME
|
||||
if (niquery->flags & ARES_NI_NOFQDN)
|
||||
{
|
||||
char buf[255];
|
||||
@@ -222,6 +238,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
|
||||
*end = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, (char *)(host->h_name),
|
||||
service);
|
||||
return;
|
||||
|
@@ -33,6 +33,12 @@
|
||||
|
||||
int ares_getopt(int nargc, char * const nargv[], const char *ostr);
|
||||
|
||||
#if defined(WATT32)
|
||||
#undef optarg
|
||||
#undef optind
|
||||
#undef opterr
|
||||
#endif
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
extern int opterr;
|
||||
|
@@ -154,7 +154,7 @@ recursion for you. Recursion must be handled by the application calling ares
|
||||
if \fIARES_FLAG_NORECURSE\fP is set.
|
||||
.TP 23
|
||||
.B ARES_FLAG_STAYOPEN
|
||||
Do not close communciations sockets when the number of active queries
|
||||
Do not close communications sockets when the number of active queries
|
||||
drops to zero.
|
||||
.TP 23
|
||||
.B ARES_FLAG_NOSEARCH
|
||||
@@ -185,7 +185,8 @@ A configuration file could not be read.
|
||||
.B ARES_ENOMEM
|
||||
The process's available memory was exhausted.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy (3)
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_dup(3)
|
||||
.SH AUTHOR
|
||||
Greg Hudson, MIT Information Systems
|
||||
.br
|
||||
|
266
ares/ares_init.c
266
ares/ares_init.c
@@ -19,11 +19,10 @@
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#include <iphlpapi.h>
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
@@ -36,20 +35,30 @@
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_PROCESS_H
|
||||
#include <process.h> /* Some have getpid() here */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -58,8 +67,8 @@
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifdef WATT32
|
||||
#undef WIN32 /* Redefined in MingW/MSVC headers */
|
||||
@@ -135,6 +144,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
channel->timeout = -1;
|
||||
channel->tries = -1;
|
||||
channel->ndots = -1;
|
||||
channel->rotate = -1;
|
||||
channel->udp_port = -1;
|
||||
channel->tcp_port = -1;
|
||||
channel->socket_send_buffer_size = -1;
|
||||
@@ -149,7 +159,10 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
channel->servers = NULL;
|
||||
channel->sock_state_cb = NULL;
|
||||
channel->sock_state_cb_data = NULL;
|
||||
channel->sock_create_cb = NULL;
|
||||
channel->sock_create_cb_data = NULL;
|
||||
|
||||
channel->last_server = 0;
|
||||
channel->last_timeout_processed = (time_t)now.tv_sec;
|
||||
|
||||
/* Initialize our lists of queries */
|
||||
@@ -168,7 +181,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
*/
|
||||
|
||||
if (status == ARES_SUCCESS) {
|
||||
status = init_by_options(channel, options, optmask);
|
||||
status = init_by_options(channel, options, optmask);
|
||||
if (status != ARES_SUCCESS)
|
||||
DEBUGF(fprintf(stderr, "Error: init_by_options failed: %s\n",
|
||||
ares_strerror(status)));
|
||||
@@ -246,6 +259,40 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
/* ares_dup() duplicates a channel handle with all its options and returns a
|
||||
new channel handle */
|
||||
int ares_dup(ares_channel *dest, ares_channel src)
|
||||
{
|
||||
struct ares_options opts;
|
||||
int rc;
|
||||
int optmask;
|
||||
|
||||
*dest = NULL; /* in case of failure return NULL explicitly */
|
||||
|
||||
/* First get the options supported by the old ares_save_options() function,
|
||||
which is most of them */
|
||||
rc = ares_save_options(src, &opts, &optmask);
|
||||
if(rc)
|
||||
return rc;
|
||||
|
||||
/* Then create the new channel with those options */
|
||||
rc = ares_init_options(dest, &opts, optmask);
|
||||
|
||||
/* destroy the options copy to not leak any memory */
|
||||
ares_destroy_options(&opts);
|
||||
|
||||
if(rc)
|
||||
return rc;
|
||||
|
||||
/* Now clone the options that ares_save_options() doesn't support. */
|
||||
(*dest)->sock_create_cb = src->sock_create_cb;
|
||||
(*dest)->sock_create_cb_data = src->sock_create_cb_data;
|
||||
|
||||
|
||||
return ARES_SUCCESS; /* everything went fine */
|
||||
|
||||
}
|
||||
|
||||
/* Save options from initialized channel */
|
||||
int ares_save_options(ares_channel channel, struct ares_options *options,
|
||||
int *optmask)
|
||||
@@ -258,10 +305,14 @@ int ares_save_options(ares_channel channel, struct ares_options *options,
|
||||
if (!ARES_CONFIG_CHECK(channel))
|
||||
return ARES_ENODATA;
|
||||
|
||||
/* Traditionally the optmask wasn't saved in the channel struct so it was
|
||||
recreated here. ROTATE is the first option that has no struct field of
|
||||
its own in the public config struct */
|
||||
(*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TRIES|ARES_OPT_NDOTS|
|
||||
ARES_OPT_UDP_PORT|ARES_OPT_TCP_PORT|ARES_OPT_SOCK_STATE_CB|
|
||||
ARES_OPT_SERVERS|ARES_OPT_DOMAINS|ARES_OPT_LOOKUPS|
|
||||
ARES_OPT_SORTLIST|ARES_OPT_TIMEOUTMS);
|
||||
ARES_OPT_SORTLIST|ARES_OPT_TIMEOUTMS) |
|
||||
(channel->optmask & ARES_OPT_ROTATE);
|
||||
|
||||
/* Copy easy stuff */
|
||||
options->flags = channel->flags;
|
||||
@@ -343,6 +394,8 @@ static int init_by_options(ares_channel channel,
|
||||
channel->tries = options->tries;
|
||||
if ((optmask & ARES_OPT_NDOTS) && channel->ndots == -1)
|
||||
channel->ndots = options->ndots;
|
||||
if ((optmask & ARES_OPT_ROTATE) && channel->rotate == -1)
|
||||
channel->rotate = 1;
|
||||
if ((optmask & ARES_OPT_UDP_PORT) && channel->udp_port == -1)
|
||||
channel->udp_port = options->udp_port;
|
||||
if ((optmask & ARES_OPT_TCP_PORT) && channel->tcp_port == -1)
|
||||
@@ -413,11 +466,14 @@ static int init_by_options(ares_channel channel,
|
||||
return ARES_ENOMEM;
|
||||
for (i = 0; i < options->nsort; i++)
|
||||
{
|
||||
memcpy(&(channel->sortlist[i]), &(options->sortlist[i]), sizeof(struct apattern));
|
||||
memcpy(&(channel->sortlist[i]), &(options->sortlist[i]),
|
||||
sizeof(struct apattern));
|
||||
}
|
||||
channel->nsort = options->nsort;
|
||||
}
|
||||
|
||||
channel->optmask = optmask;
|
||||
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -675,7 +731,7 @@ DhcpNameServer
|
||||
{
|
||||
if (bytes)
|
||||
{
|
||||
line = (char *)malloc(bytes+1);
|
||||
line = malloc(bytes+1);
|
||||
if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type,
|
||||
(unsigned char *)line, &bytes) ==
|
||||
ERROR_SUCCESS)
|
||||
@@ -912,7 +968,8 @@ okay:
|
||||
|
||||
static int init_by_defaults(ares_channel channel)
|
||||
{
|
||||
char hostname[MAXHOSTNAMELEN + 1];
|
||||
char *hostname = NULL;
|
||||
int rc = ARES_SUCCESS;
|
||||
|
||||
if (channel->flags == -1)
|
||||
channel->flags = 0;
|
||||
@@ -922,58 +979,112 @@ static int init_by_defaults(ares_channel channel)
|
||||
channel->tries = DEFAULT_TRIES;
|
||||
if (channel->ndots == -1)
|
||||
channel->ndots = 1;
|
||||
if (channel->rotate == -1)
|
||||
channel->rotate = 0;
|
||||
if (channel->udp_port == -1)
|
||||
channel->udp_port = htons(NAMESERVER_PORT);
|
||||
if (channel->tcp_port == -1)
|
||||
channel->tcp_port = htons(NAMESERVER_PORT);
|
||||
|
||||
if (channel->nservers == -1)
|
||||
{
|
||||
/* If nobody specified servers, try a local named. */
|
||||
channel->servers = malloc(sizeof(struct server_state));
|
||||
if (!channel->servers)
|
||||
return ARES_ENOMEM;
|
||||
channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
channel->nservers = 1;
|
||||
if (channel->nservers == -1) {
|
||||
/* If nobody specified servers, try a local named. */
|
||||
channel->servers = malloc(sizeof(struct server_state));
|
||||
if (!channel->servers) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
channel->nservers = 1;
|
||||
}
|
||||
|
||||
#ifdef ENAMETOOLONG
|
||||
#define toolong(x) (x == -1) && ((ENAMETOOLONG == errno) || (EINVAL == errno))
|
||||
#else
|
||||
#define toolong(x) (x == -1) && (EINVAL == errno)
|
||||
#endif
|
||||
|
||||
if (channel->ndomains == -1) {
|
||||
/* Derive a default domain search list from the kernel hostname,
|
||||
* or set it to empty if the hostname isn't helpful.
|
||||
*/
|
||||
size_t len = 64;
|
||||
int res;
|
||||
channel->ndomains = 0; /* default to none */
|
||||
|
||||
#ifdef HAVE_GETHOSTNAME
|
||||
hostname = malloc(len);
|
||||
if(!hostname) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (channel->ndomains == -1)
|
||||
{
|
||||
/* Derive a default domain search list from the kernel hostname,
|
||||
* or set it to empty if the hostname isn't helpful.
|
||||
*/
|
||||
if (gethostname(hostname, sizeof(hostname)) == -1
|
||||
|| !strchr(hostname, '.'))
|
||||
{
|
||||
channel->ndomains = 0;
|
||||
do {
|
||||
res = gethostname(hostname, len);
|
||||
|
||||
if(toolong(res)) {
|
||||
char *p;
|
||||
len *= 2;
|
||||
p = realloc(hostname, len);
|
||||
if(!p) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel->domains = malloc(sizeof(char *));
|
||||
if (!channel->domains)
|
||||
return ARES_ENOMEM;
|
||||
channel->ndomains = 0;
|
||||
channel->domains[0] = strdup(strchr(hostname, '.') + 1);
|
||||
if (!channel->domains[0])
|
||||
return ARES_ENOMEM;
|
||||
channel->ndomains = 1;
|
||||
}
|
||||
}
|
||||
hostname = p;
|
||||
continue;
|
||||
}
|
||||
else if(res) {
|
||||
rc = ARES_EBADNAME;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (channel->nsort == -1)
|
||||
{
|
||||
channel->sortlist = NULL;
|
||||
channel->nsort = 0;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
if (!channel->lookups)
|
||||
{
|
||||
channel->lookups = strdup("fb");
|
||||
if (!channel->lookups)
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
if (strchr(hostname, '.')) {
|
||||
/* a dot was found */
|
||||
|
||||
return ARES_SUCCESS;
|
||||
channel->domains = malloc(sizeof(char *));
|
||||
if (!channel->domains) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
channel->domains[0] = strdup(strchr(hostname, '.') + 1);
|
||||
if (!channel->domains[0]) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
channel->ndomains = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (channel->nsort == -1) {
|
||||
channel->sortlist = NULL;
|
||||
channel->nsort = 0;
|
||||
}
|
||||
|
||||
if (!channel->lookups) {
|
||||
channel->lookups = strdup("fb");
|
||||
if (!channel->lookups)
|
||||
rc = ARES_ENOMEM;
|
||||
}
|
||||
|
||||
error:
|
||||
if(rc) {
|
||||
if(channel->servers)
|
||||
free(channel->servers);
|
||||
|
||||
if(channel->domains && channel->domains[0])
|
||||
free(channel->domains[0]);
|
||||
if(channel->domains)
|
||||
free(channel->domains);
|
||||
if(channel->lookups)
|
||||
free(channel->lookups);
|
||||
}
|
||||
|
||||
if(hostname)
|
||||
free(hostname);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -1113,8 +1224,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
||||
/* Lets see if it is CIDR */
|
||||
/* First we'll try IPv6 */
|
||||
if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx[0] ? ipbufpfx : ipbuf,
|
||||
&pat.addr.addr6,
|
||||
sizeof(pat.addr.addr6))) > 0)
|
||||
&pat.addrV6,
|
||||
sizeof(pat.addrV6))) > 0)
|
||||
{
|
||||
pat.type = PATTERN_CIDR;
|
||||
pat.mask.bits = (unsigned short)bits;
|
||||
@@ -1123,8 +1234,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
if (ipbufpfx[0] &&
|
||||
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4,
|
||||
sizeof(pat.addr.addr4))) > 0)
|
||||
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addrV4,
|
||||
sizeof(pat.addrV4))) > 0)
|
||||
{
|
||||
pat.type = PATTERN_CIDR;
|
||||
pat.mask.bits = (unsigned short)bits;
|
||||
@@ -1133,13 +1244,13 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
/* See if it is just a regular IP */
|
||||
else if (ip_addr(ipbuf, (int)(q-str), &pat.addr.addr4) == 0)
|
||||
else if (ip_addr(ipbuf, (int)(q-str), &pat.addrV4) == 0)
|
||||
{
|
||||
if (ipbufpfx[0])
|
||||
{
|
||||
memcpy(ipbuf, str, (int)(q-str));
|
||||
ipbuf[(int)(q-str)] = '\0';
|
||||
if (ip_addr(ipbuf, (int)(q - str), &pat.mask.addr.addr4) != 0)
|
||||
if (ip_addr(ipbuf, (int)(q - str), &pat.mask.addr4) != 0)
|
||||
natural_mask(&pat);
|
||||
}
|
||||
else
|
||||
@@ -1242,6 +1353,9 @@ static int set_options(ares_channel channel, const char *str)
|
||||
val = try_option(p, q, "retry:");
|
||||
if (val && channel->tries == -1)
|
||||
channel->tries = atoi(val);
|
||||
val = try_option(p, q, "rotate");
|
||||
if (val && channel->rotate == -1)
|
||||
channel->rotate = 1;
|
||||
p = q;
|
||||
while (ISSPACE(*p))
|
||||
p++;
|
||||
@@ -1314,7 +1428,7 @@ static char *try_config(char *s, const char *opt)
|
||||
static const char *try_option(const char *p, const char *q, const char *opt)
|
||||
{
|
||||
size_t len = strlen(opt);
|
||||
return ((size_t)(q - p) > len && !strncmp(p, opt, len)) ? &p[len] : NULL;
|
||||
return ((size_t)(q - p) >= len && !strncmp(p, opt, len)) ? &p[len] : NULL;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -1351,17 +1465,17 @@ static void natural_mask(struct apattern *pat)
|
||||
/* Store a host-byte-order copy of pat in a struct in_addr. Icky,
|
||||
* but portable.
|
||||
*/
|
||||
addr.s_addr = ntohl(pat->addr.addr4.s_addr);
|
||||
addr.s_addr = ntohl(pat->addrV4.s_addr);
|
||||
|
||||
/* This is out of date in the CIDR world, but some people might
|
||||
* still rely on it.
|
||||
*/
|
||||
if (IN_CLASSA(addr.s_addr))
|
||||
pat->mask.addr.addr4.s_addr = htonl(IN_CLASSA_NET);
|
||||
pat->mask.addr4.s_addr = htonl(IN_CLASSA_NET);
|
||||
else if (IN_CLASSB(addr.s_addr))
|
||||
pat->mask.addr.addr4.s_addr = htonl(IN_CLASSB_NET);
|
||||
pat->mask.addr4.s_addr = htonl(IN_CLASSB_NET);
|
||||
else
|
||||
pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET);
|
||||
pat->mask.addr4.s_addr = htonl(IN_CLASSC_NET);
|
||||
}
|
||||
#endif
|
||||
/* initialize an rc4 key. If possible a cryptographically secure random key
|
||||
@@ -1413,11 +1527,11 @@ static int init_id_key(rc4_key* key,int key_data_len)
|
||||
if (!key_data_ptr)
|
||||
return ARES_ENOMEM;
|
||||
|
||||
randomize_key(key->state,key_data_len);
|
||||
state = &key->state[0];
|
||||
for(counter = 0; counter < 256; counter++)
|
||||
/* unnecessary AND but it keeps some compilers happier */
|
||||
state[counter] = (unsigned char)(counter & 0xff);
|
||||
randomize_key(key->state,key_data_len);
|
||||
key->x = 0;
|
||||
key->y = 0;
|
||||
index1 = 0;
|
||||
@@ -1434,9 +1548,17 @@ static int init_id_key(rc4_key* key,int key_data_len)
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
short ares__generate_new_id(rc4_key* key)
|
||||
unsigned short ares__generate_new_id(rc4_key* key)
|
||||
{
|
||||
short r=0;
|
||||
unsigned short r=0;
|
||||
ares__rc4(key, (unsigned char *)&r, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
void ares_set_socket_callback(ares_channel channel,
|
||||
ares_sock_create_callback cb,
|
||||
void *data)
|
||||
{
|
||||
channel->sock_create_cb = cb;
|
||||
channel->sock_create_cb_data = data;
|
||||
}
|
||||
|
@@ -17,14 +17,19 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@@ -17,20 +17,29 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/nameser.h>
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -74,7 +83,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
|
||||
/* Expand the name from the question, and skip past the question. */
|
||||
aptr = abuf + HFIXEDSZ;
|
||||
status = ares_expand_name(aptr, abuf, alen, &hostname, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &hostname, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return status;
|
||||
if (aptr + len + QFIXEDSZ > abuf + alen)
|
||||
@@ -86,7 +95,8 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
|
||||
if (host)
|
||||
{
|
||||
/* Allocate addresses and aliases; ancount gives an upper bound for both. */
|
||||
/* Allocate addresses and aliases; ancount gives an upper bound for
|
||||
both. */
|
||||
addrs = malloc(ancount * sizeof(struct in_addr));
|
||||
if (!addrs)
|
||||
{
|
||||
@@ -106,7 +116,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
addrs = NULL;
|
||||
aliases = NULL;
|
||||
}
|
||||
|
||||
|
||||
naddrs = 0;
|
||||
naliases = 0;
|
||||
|
||||
@@ -114,7 +124,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
for (i = 0; i < (int)ancount; i++)
|
||||
{
|
||||
/* Decode the RR up to the data field. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
aptr += len;
|
||||
@@ -167,7 +177,8 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
naliases++;
|
||||
|
||||
/* Decode the RR data and replace the hostname with it. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
|
||||
&len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
free(hostname);
|
||||
|
@@ -17,22 +17,29 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -77,7 +84,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
|
||||
/* Expand the name from the question, and skip past the question. */
|
||||
aptr = abuf + HFIXEDSZ;
|
||||
status = ares_expand_name(aptr, abuf, alen, &hostname, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &hostname, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return status;
|
||||
if (aptr + len + QFIXEDSZ > abuf + alen)
|
||||
@@ -116,7 +123,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
for (i = 0; i < (int)ancount; i++)
|
||||
{
|
||||
/* Decode the RR up to the data field. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
aptr += len;
|
||||
@@ -169,7 +176,8 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
naliases++;
|
||||
|
||||
/* Decode the RR data and replace the hostname with it. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
|
||||
&len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
free(hostname);
|
||||
|
@@ -20,17 +20,25 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -65,7 +73,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
|
||||
|
||||
/* Expand the name from the question, and skip past the question. */
|
||||
aptr = abuf + HFIXEDSZ;
|
||||
status = ares_expand_name( aptr, abuf, alen, &hostname, &len );
|
||||
status = ares__expand_name_for_response( aptr, abuf, alen, &hostname, &len);
|
||||
if ( status != ARES_SUCCESS )
|
||||
return status;
|
||||
if ( aptr + len + QFIXEDSZ > abuf + alen )
|
||||
@@ -88,7 +96,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
|
||||
for ( i = 0; i < ( int ) ancount; i++ )
|
||||
{
|
||||
/* Decode the RR up to the data field. */
|
||||
status = ares_expand_name( aptr, abuf, alen, &rr_name, &len );
|
||||
status = ares__expand_name_for_response( aptr, abuf, alen, &rr_name, &len );
|
||||
if ( status != ARES_SUCCESS )
|
||||
break;
|
||||
aptr += len;
|
||||
@@ -105,7 +113,8 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
|
||||
if ( rr_class == C_IN && rr_type == T_NS )
|
||||
{
|
||||
/* Decode the RR data and add it to the nameservers list */
|
||||
status = ares_expand_name( aptr, abuf, alen, &rr_data, &len );
|
||||
status = ares__expand_name_for_response( aptr, abuf, alen, &rr_data,
|
||||
&len);
|
||||
if ( status != ARES_SUCCESS )
|
||||
{
|
||||
break;
|
||||
|
@@ -17,19 +17,26 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/nameser.h>
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -48,6 +55,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
char *ptrname, *hostname, *rr_name, *rr_data;
|
||||
struct hostent *hostent;
|
||||
int aliascnt = 0;
|
||||
int alias_alloc = 8;
|
||||
char ** aliases;
|
||||
|
||||
/* Set *host to NULL for all failure cases. */
|
||||
@@ -65,7 +73,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
|
||||
/* Expand the name from the question, and skip past the question. */
|
||||
aptr = abuf + HFIXEDSZ;
|
||||
status = ares_expand_name(aptr, abuf, alen, &ptrname, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &ptrname, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return status;
|
||||
if (aptr + len + QFIXEDSZ > abuf + alen)
|
||||
@@ -77,7 +85,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
|
||||
/* Examine each answer resource record (RR) in turn. */
|
||||
hostname = NULL;
|
||||
aliases = (char **) malloc(8 * sizeof(char *));
|
||||
aliases = malloc(alias_alloc * sizeof(char *));
|
||||
if (!aliases)
|
||||
{
|
||||
free(ptrname);
|
||||
@@ -86,7 +94,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
for (i = 0; i < (int)ancount; i++)
|
||||
{
|
||||
/* Decode the RR up to the data field. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
aptr += len;
|
||||
@@ -104,7 +112,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
&& strcasecmp(rr_name, ptrname) == 0)
|
||||
{
|
||||
/* Decode the RR data and set hostname to it. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
|
||||
&len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
if (hostname)
|
||||
@@ -118,14 +127,23 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
}
|
||||
strncpy(aliases[aliascnt], rr_data, strlen(rr_data)+1);
|
||||
aliascnt++;
|
||||
if ((aliascnt%8)==0)
|
||||
aliases = (char **) realloc(aliases, (aliascnt/16+1) * sizeof(char *));
|
||||
if (aliascnt >= alias_alloc) {
|
||||
char **ptr;
|
||||
alias_alloc *= 2;
|
||||
ptr = realloc(aliases, alias_alloc * sizeof(char *));
|
||||
if(!ptr) {
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
aliases = ptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_CNAME)
|
||||
{
|
||||
/* Decode the RR data and replace ptrname with it. */
|
||||
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
|
||||
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
|
||||
&len);
|
||||
if (status != ARES_SUCCESS)
|
||||
break;
|
||||
free(ptrname);
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#undef closesocket
|
||||
#define closesocket(s) close_s(s)
|
||||
#define writev(s,v,c) writev_s(s,v,c)
|
||||
#define HAVE_WRITEV 1
|
||||
#endif
|
||||
|
||||
#ifdef NETWARE
|
||||
@@ -94,6 +95,36 @@
|
||||
#include "ares_ipv6.h"
|
||||
#include "ares_llist.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
# define strdup(ptr) ares_strdup(ptr)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strcasecmp(p1,p2) ares_strcasecmp(p1,p2)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
# include "ares_strcasecmp.h"
|
||||
# define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WRITEV
|
||||
# include "ares_writev.h"
|
||||
# define writev(s,ptr,cnt) ares_writev(s,ptr,cnt)
|
||||
#endif
|
||||
|
||||
struct ares_addr {
|
||||
int family;
|
||||
union {
|
||||
struct in_addr addr4;
|
||||
struct in6_addr addr6;
|
||||
} addr;
|
||||
};
|
||||
#define addrV4 addr.addr4
|
||||
#define addrV6 addr.addr6
|
||||
|
||||
struct query;
|
||||
|
||||
struct send_request {
|
||||
@@ -174,8 +205,8 @@ struct query {
|
||||
void *arg;
|
||||
|
||||
/* Query status */
|
||||
int try;
|
||||
int server;
|
||||
int try; /* Number of times we tried this query already. */
|
||||
int server; /* Server this query has last been sent to. */
|
||||
struct query_server_info *server_info; /* per-server state */
|
||||
int using_tcp;
|
||||
int error_status;
|
||||
@@ -192,17 +223,17 @@ struct query_server_info {
|
||||
#define PATTERN_MASK 0x1
|
||||
#define PATTERN_CIDR 0x2
|
||||
|
||||
union ares_addr {
|
||||
struct in_addr addr4;
|
||||
struct in6_addr addr6;
|
||||
};
|
||||
|
||||
struct apattern {
|
||||
union ares_addr addr;
|
||||
union
|
||||
{
|
||||
union ares_addr addr;
|
||||
unsigned short bits;
|
||||
struct in_addr addr4;
|
||||
struct in6_addr addr6;
|
||||
} addr;
|
||||
union
|
||||
{
|
||||
struct in_addr addr4;
|
||||
struct in6_addr addr6;
|
||||
unsigned short bits;
|
||||
} mask;
|
||||
int family;
|
||||
unsigned short type;
|
||||
@@ -221,6 +252,7 @@ struct ares_channeldata {
|
||||
int timeout; /* in milliseconds */
|
||||
int tries;
|
||||
int ndots;
|
||||
int rotate; /* if true, all servers specified are used */
|
||||
int udp_port;
|
||||
int tcp_port;
|
||||
int socket_send_buffer_size;
|
||||
@@ -231,6 +263,8 @@ struct ares_channeldata {
|
||||
int nsort;
|
||||
char *lookups;
|
||||
|
||||
int optmask; /* the option bitfield passed in at init time */
|
||||
|
||||
/* Server addresses and communications state */
|
||||
struct server_state *servers;
|
||||
int nservers;
|
||||
@@ -247,6 +281,9 @@ struct ares_channeldata {
|
||||
just to draw the line somewhere. */
|
||||
time_t last_timeout_processed;
|
||||
|
||||
/* Last server we sent a query to. */
|
||||
int last_server;
|
||||
|
||||
/* Circular, doubly-linked list of queries, bucketed various ways.... */
|
||||
/* All active queries in a single list: */
|
||||
struct list_node all_queries;
|
||||
@@ -259,6 +296,9 @@ struct ares_channeldata {
|
||||
|
||||
ares_sock_state_cb sock_state_cb;
|
||||
void *sock_state_cb_data;
|
||||
|
||||
ares_sock_create_callback sock_create_cb;
|
||||
void *sock_create_cb_data;
|
||||
};
|
||||
|
||||
/* return true if now is exactly check time or later */
|
||||
@@ -268,8 +308,8 @@ int ares__timedout(struct timeval *now,
|
||||
int ares__timeadd(struct timeval *now,
|
||||
int millisecs);
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
int ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check);
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check);
|
||||
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
@@ -277,8 +317,11 @@ void ares__close_sockets(ares_channel channel, struct server_state *server);
|
||||
int ares__get_hostent(FILE *fp, int family, struct hostent **host);
|
||||
int ares__read_line(FILE *fp, char **buf, int *bufsize);
|
||||
void ares__free_query(struct query *query);
|
||||
short ares__generate_new_id(rc4_key* key);
|
||||
unsigned short ares__generate_new_id(rc4_key* key);
|
||||
struct timeval ares__tvnow(void);
|
||||
int ares__expand_name_for_response(const unsigned char *encoded,
|
||||
const unsigned char *abuf, int alen,
|
||||
char **s, long *enclen);
|
||||
#if 0 /* Not used */
|
||||
long ares__tvdiff(struct timeval t1, struct timeval t2);
|
||||
#endif
|
||||
|
@@ -18,47 +18,45 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
|
||||
#else
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UIO_H
|
||||
#include <sys/uio.h>
|
||||
# include <sys/uio.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h> /* <netinet/tcp.h> may need it */
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h> /* for TCP_NODELAY */
|
||||
# include <netinet/tcp.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#endif /* WIN32 && !WATT32 */
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef NETWARE
|
||||
#include <sys/filio.h>
|
||||
# include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
@@ -133,13 +131,11 @@ int ares__timeadd(struct timeval *now,
|
||||
}
|
||||
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
int ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check)
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check)
|
||||
{
|
||||
int secs = (check->tv_sec - now->tv_sec); /* this many seconds */
|
||||
int us = (check->tv_usec - now->tv_usec); /* this many microseconds */
|
||||
|
||||
return secs*1000 + us/1000; /* return them combined as milliseconds */
|
||||
return (check->tv_sec - now->tv_sec)*1000 +
|
||||
(check->tv_usec - now->tv_usec)/1000;
|
||||
}
|
||||
|
||||
|
||||
@@ -431,6 +427,10 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
int i;
|
||||
ssize_t count;
|
||||
unsigned char buf[PACKETSZ + 1];
|
||||
#ifdef HAVE_RECVFROM
|
||||
struct sockaddr_in from;
|
||||
socklen_t fromlen;
|
||||
#endif
|
||||
|
||||
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
|
||||
/* no possible action */
|
||||
@@ -464,11 +464,24 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
/* To reduce event loop overhead, read and process as many
|
||||
* packets as we can. */
|
||||
do {
|
||||
#ifdef HAVE_RECVFROM
|
||||
fromlen = sizeof(from);
|
||||
count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf),
|
||||
0, (struct sockaddr *)&from, &fromlen);
|
||||
#else
|
||||
count = sread(server->udp_socket, buf, sizeof(buf));
|
||||
#endif
|
||||
if (count == -1 && try_again(SOCKERRNO))
|
||||
continue;
|
||||
else if (count <= 0)
|
||||
handle_error(channel, i, now);
|
||||
#ifdef HAVE_RECVFROM
|
||||
else if (from.sin_addr.s_addr != server->addr.s_addr)
|
||||
/* Address response came from did not match the address
|
||||
* we sent the request to. Someone may be attempting
|
||||
* to perform a cache poisoning attack */
|
||||
break;
|
||||
#endif
|
||||
else
|
||||
process_answer(channel, buf, (int)count, i, 0, now);
|
||||
} while (count > 0);
|
||||
@@ -657,30 +670,33 @@ static void skip_server(ares_channel channel, struct query *query,
|
||||
static void next_server(ares_channel channel, struct query *query,
|
||||
struct timeval *now)
|
||||
{
|
||||
/* Advance to the next server or try. */
|
||||
query->server++;
|
||||
for (; query->try < channel->tries; query->try++)
|
||||
/* We need to try each server channel->tries times. We have channel->nservers
|
||||
* servers to try. In total, we need to do channel->nservers * channel->tries
|
||||
* attempts. Use query->try to remember how many times we already attempted
|
||||
* this query. Use modular arithmetic to find the next server to try. */
|
||||
while (++(query->try) < (channel->nservers * channel->tries))
|
||||
{
|
||||
for (; query->server < channel->nservers; query->server++)
|
||||
struct server_state *server;
|
||||
|
||||
/* Move on to the next server. */
|
||||
query->server = (query->server + 1) % channel->nservers;
|
||||
server = &channel->servers[query->server];
|
||||
|
||||
/* We don't want to use this server if (1) we decided this
|
||||
* connection is broken, and thus about to be closed, (2)
|
||||
* we've decided to skip this server because of earlier
|
||||
* errors we encountered, or (3) we already sent this query
|
||||
* over this exact connection.
|
||||
*/
|
||||
if (!server->is_broken &&
|
||||
!query->server_info[query->server].skip_server &&
|
||||
!(query->using_tcp &&
|
||||
(query->server_info[query->server].tcp_connection_generation ==
|
||||
server->tcp_connection_generation)))
|
||||
{
|
||||
struct server_state *server = &channel->servers[query->server];
|
||||
/* We don't want to use this server if (1) we decided this
|
||||
* connection is broken, and thus about to be closed, (2)
|
||||
* we've decided to skip this server because of earlier
|
||||
* errors we encountered, or (3) we already sent this query
|
||||
* over this exact connection.
|
||||
*/
|
||||
if (!server->is_broken &&
|
||||
!query->server_info[query->server].skip_server &&
|
||||
!(query->using_tcp &&
|
||||
(query->server_info[query->server].tcp_connection_generation ==
|
||||
server->tcp_connection_generation)))
|
||||
{
|
||||
ares__send_query(channel, query, now);
|
||||
return;
|
||||
}
|
||||
ares__send_query(channel, query, now);
|
||||
return;
|
||||
}
|
||||
query->server = 0;
|
||||
|
||||
/* You might think that with TCP we only need one try. However,
|
||||
* even when using TCP, servers can time-out our connection just
|
||||
@@ -689,6 +705,8 @@ static void next_server(ares_channel channel, struct query *query,
|
||||
* tickle a bug that drops our request.
|
||||
*/
|
||||
}
|
||||
|
||||
/* If we are here, all attempts to perform query failed. */
|
||||
end_query(channel, query, query->error_status, NULL, 0);
|
||||
}
|
||||
|
||||
@@ -697,6 +715,7 @@ void ares__send_query(ares_channel channel, struct query *query,
|
||||
{
|
||||
struct send_request *sendreq;
|
||||
struct server_state *server;
|
||||
int timeplus;
|
||||
|
||||
server = &channel->servers[query->server];
|
||||
if (query->using_tcp)
|
||||
@@ -760,10 +779,11 @@ void ares__send_query(ares_channel channel, struct query *query,
|
||||
return;
|
||||
}
|
||||
}
|
||||
timeplus = channel->timeout << (query->try / channel->nservers);
|
||||
timeplus = (timeplus * (9 + (rand () & 7))) / 16;
|
||||
query->timeout = *now;
|
||||
ares__timeadd(&query->timeout,
|
||||
(query->try == 0) ? channel->timeout
|
||||
: channel->timeout << query->try / channel->nservers);
|
||||
timeplus);
|
||||
/* Keep track of queries bucketed by timeout, so we can process
|
||||
* timeout events quickly.
|
||||
*/
|
||||
@@ -788,68 +808,51 @@ void ares__send_query(ares_channel channel, struct query *query,
|
||||
static int setsocknonblock(ares_socket_t sockfd, /* operate on this */
|
||||
int nonblock /* TRUE or FALSE */)
|
||||
{
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 0
|
||||
#ifdef HAVE_O_NONBLOCK
|
||||
#if defined(USE_BLOCKING_SOCKETS)
|
||||
|
||||
return 0; /* returns success */
|
||||
|
||||
#elif defined(HAVE_FCNTL_O_NONBLOCK)
|
||||
|
||||
/* most recent unix versions */
|
||||
int flags;
|
||||
|
||||
flags = fcntl(sockfd, F_GETFL, 0);
|
||||
if (FALSE != nonblock)
|
||||
return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||
else
|
||||
return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 1
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_FIONBIO) && (SETBLOCK == 0)
|
||||
#elif defined(HAVE_IOCTL_FIONBIO)
|
||||
|
||||
/* older unix versions */
|
||||
int flags;
|
||||
|
||||
flags = nonblock;
|
||||
return ioctl(sockfd, FIONBIO, &flags);
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 2
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IOCTLSOCKET) && (SETBLOCK == 0)
|
||||
#elif defined(HAVE_IOCTLSOCKET_FIONBIO)
|
||||
|
||||
#ifdef WATT32
|
||||
char flags;
|
||||
#else
|
||||
/* Windows? */
|
||||
/* Windows */
|
||||
unsigned long flags;
|
||||
#endif
|
||||
flags = nonblock;
|
||||
|
||||
return ioctlsocket(sockfd, FIONBIO, &flags);
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 3
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IOCTLSOCKET_CASE) && (SETBLOCK == 0)
|
||||
/* presumably for Amiga */
|
||||
#elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO)
|
||||
|
||||
/* Amiga */
|
||||
return IoctlSocket(sockfd, FIONBIO, (long)nonblock);
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 4
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SO_NONBLOCK) && (SETBLOCK == 0)
|
||||
#elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK)
|
||||
|
||||
/* BeOS */
|
||||
long b = nonblock ? 1 : 0;
|
||||
return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 5
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISABLED_NONBLOCKING
|
||||
return 0; /* returns success */
|
||||
#undef SETBLOCK
|
||||
#define SETBLOCK 6
|
||||
#endif
|
||||
|
||||
#if (SETBLOCK == 0)
|
||||
#error "no non-blocking method was found/used/set"
|
||||
#else
|
||||
# error "no non-blocking method was found/used/set"
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -893,10 +896,11 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
/* Configure it. */
|
||||
if (configure_socket(s, channel) < 0)
|
||||
{
|
||||
close(s);
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef TCP_NODELAY
|
||||
/*
|
||||
* Disable the Nagle algorithm (only relevant for TCP sockets, and thus not in
|
||||
* configure_socket). In general, in DNS lookups we're pretty much interested
|
||||
@@ -907,23 +911,37 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
|
||||
(void *)&opt, sizeof(opt)) == -1)
|
||||
{
|
||||
close(s);
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Connect to the server. */
|
||||
memset(&sockin, 0, sizeof(sockin));
|
||||
sockin.sin_family = AF_INET;
|
||||
sockin.sin_addr = server->addr;
|
||||
sockin.sin_port = (unsigned short)(channel->tcp_port & 0xffff);
|
||||
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) {
|
||||
int err = SOCKERRNO;
|
||||
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1)
|
||||
{
|
||||
int err = SOCKERRNO;
|
||||
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK) {
|
||||
closesocket(s);
|
||||
return -1;
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||
{
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (channel->sock_create_cb)
|
||||
{
|
||||
int err = channel->sock_create_cb(s, SOCK_STREAM,
|
||||
channel->sock_create_cb_data);
|
||||
if (err < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SOCK_STATE_CALLBACK(channel, s, 1, 0);
|
||||
server->tcp_buffer_pos = 0;
|
||||
@@ -945,7 +963,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
/* Set the socket non-blocking. */
|
||||
if (configure_socket(s, channel) < 0)
|
||||
{
|
||||
close(s);
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -956,8 +974,24 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
sockin.sin_port = (unsigned short)(channel->udp_port & 0xffff);
|
||||
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1)
|
||||
{
|
||||
closesocket(s);
|
||||
return -1;
|
||||
int err = SOCKERRNO;
|
||||
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||
{
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (channel->sock_create_cb)
|
||||
{
|
||||
int err = channel->sock_create_cb(s, SOCK_DGRAM,
|
||||
channel->sock_create_cb_data);
|
||||
if (err < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
SOCK_STATE_CALLBACK(channel, s, 1, 0);
|
||||
|
@@ -17,14 +17,19 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -65,7 +70,7 @@ void ares__rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
|
||||
key->y = y;
|
||||
}
|
||||
|
||||
static struct query* find_query_by_id(ares_channel channel, int id)
|
||||
static struct query* find_query_by_id(ares_channel channel, unsigned short id)
|
||||
{
|
||||
unsigned short qid;
|
||||
struct list_node* list_head;
|
||||
@@ -90,15 +95,15 @@ static struct query* find_query_by_id(ares_channel channel, int id)
|
||||
performed per id generation. In practice this search should happen only
|
||||
once per newly generated id
|
||||
*/
|
||||
static int generate_unique_id(ares_channel channel)
|
||||
static unsigned short generate_unique_id(ares_channel channel)
|
||||
{
|
||||
int id;
|
||||
unsigned short id;
|
||||
|
||||
do {
|
||||
id = ares__generate_new_id(&channel->id_key);
|
||||
} while (find_query_by_id(channel,id));
|
||||
id = ares__generate_new_id(&channel->id_key);
|
||||
} while (find_query_by_id(channel, id));
|
||||
|
||||
return id;
|
||||
return (unsigned short)id;
|
||||
}
|
||||
|
||||
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
||||
|
@@ -24,9 +24,7 @@ ares_save_options \- Save configuration values obtained from initialized ares_ch
|
||||
.B void ares_save_options(ares_channel \fIchannel\fP, struct ares_options *\fIoptions\fP, int *\fIoptmask\fP)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B ares_save_options
|
||||
function saves the channel data identified by
|
||||
The \fBares_save_options(3)\fP function saves the channel data identified by
|
||||
.IR channel ,
|
||||
into the options struct identified by
|
||||
.IR options ,
|
||||
@@ -38,11 +36,18 @@ The resultant options and optmask are then able to be
|
||||
passed directly to ares_init_options. When the options
|
||||
are no longer needed, ares_destroy_options should be called
|
||||
to free any associated memory.
|
||||
|
||||
|
||||
.SH NOTE
|
||||
Since c-ares 1.6.0 the ares_options struct has been "locked" meaning that it
|
||||
won't be extended to cover new funtions. This function will remain
|
||||
functioning, but it can only return config data that can be represented in
|
||||
this config struct, which may no longer be the complete set of config
|
||||
options. \fBares_dup(3)\fP will not have that restriction.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy_options (3),
|
||||
.BR ares_init_options (3)
|
||||
.BR ares_init_options (3),
|
||||
.BR ares_dup (3)
|
||||
.SH AVAILABILITY
|
||||
ares_save_options(3) was added in c-ares 1.4.0
|
||||
.SH AUTHOR
|
||||
Brad House
|
||||
.br
|
||||
|
@@ -16,14 +16,15 @@
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
@@ -59,7 +60,7 @@ void ares_search(ares_channel channel, const char *name, int dnsclass,
|
||||
char *s;
|
||||
const char *p;
|
||||
int status, ndots;
|
||||
|
||||
|
||||
/* If name only yields one domain to search, then we don't have
|
||||
* to keep extra state, so just do an ares_query().
|
||||
*/
|
||||
@@ -147,7 +148,7 @@ static void search_callback(void *arg, int status, int timeouts,
|
||||
struct search_query *squery = (struct search_query *) arg;
|
||||
ares_channel channel = squery->channel;
|
||||
char *s;
|
||||
|
||||
|
||||
squery->timeouts += timeouts;
|
||||
|
||||
/* Stop searching unless we got a non-fatal error. */
|
||||
@@ -160,7 +161,7 @@ static void search_callback(void *arg, int status, int timeouts,
|
||||
if (squery->trying_as_is)
|
||||
squery->status_as_is = status;
|
||||
|
||||
/*
|
||||
/*
|
||||
* If we ever get ARES_ENODATA along the way, record that; if the search
|
||||
* should run to the very end and we got at least one ARES_ENODATA,
|
||||
* then callers like ares_gethostbyname() may want to try a T_A search
|
||||
@@ -289,10 +290,10 @@ static int single_domain(ares_channel channel, const char *name, char **s)
|
||||
if (status != ARES_SUCCESS)
|
||||
return status;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
error = ERRNO;
|
||||
switch(error)
|
||||
error = errno;
|
||||
switch(error)
|
||||
{
|
||||
case ENOENT:
|
||||
case ESRCH:
|
||||
@@ -300,7 +301,7 @@ static int single_domain(ares_channel channel, const char *name, char **s)
|
||||
default:
|
||||
DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n",
|
||||
error, strerror(error)));
|
||||
DEBUGF(fprintf(stderr, "Error opening file: %s\n",
|
||||
DEBUGF(fprintf(stderr, "Error opening file: %s\n",
|
||||
hostaliases));
|
||||
*s = NULL;
|
||||
return ARES_EFILE;
|
||||
|
@@ -17,14 +17,19 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -74,7 +79,8 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
|
||||
/* Compute the query ID. Start with no timeout. */
|
||||
query->qid = (unsigned short)DNS_HEADER_QID(qbuf);
|
||||
query->timeout.tv_sec = query->timeout.tv_usec = 0;
|
||||
query->timeout.tv_sec = 0;
|
||||
query->timeout.tv_usec = 0;
|
||||
|
||||
/* Form the TCP query buffer by prepending qlen (as two
|
||||
* network-order bytes) to qbuf.
|
||||
@@ -92,7 +98,13 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
|
||||
/* Initialize query status. */
|
||||
query->try = 0;
|
||||
query->server = 0;
|
||||
|
||||
/* Choose the server to send the query to. If rotation is enabled, keep track
|
||||
* of the next server we want to use. */
|
||||
query->server = channel->last_server;
|
||||
if (channel->rotate == 1)
|
||||
channel->last_server = (channel->last_server + 1) % channel->nservers;
|
||||
|
||||
for (i = 0; i < channel->nservers; i++)
|
||||
{
|
||||
query->server_info[i].skip_server = 0;
|
||||
|
24
ares/ares_set_socket_callback.3
Normal file
24
ares/ares_set_socket_callback.3
Normal file
@@ -0,0 +1,24 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH ARES_SET_SOCKET_CALLBACK 3 "2 Dec 2008"
|
||||
.SH NAME
|
||||
ares_set_socket_callback \- Set a socket creation callback
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
int ares_set_socket_callback(ares_channel \fIchannel\fP,
|
||||
ares_sock_create_callback \fIcallback\fP,
|
||||
void *\fIuserdata\fP)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This function sets a \fIcallback\fP in the given ares channel handle. This
|
||||
callback function will be invoked after the socket has been created, and
|
||||
connected to the remote server. The callback must return ARES_SUCCESS if
|
||||
things are fine, or use the standard ares error codes to signal errors
|
||||
back. Returned errors will abort the ares operation.
|
||||
.SH SEE ALSO
|
||||
.BR ares_init_options (3)
|
||||
.SH AVAILABILITY
|
||||
ares_set_socket_callback(3) was added in c-ares 1.6.0
|
||||
.SH AUTHOR
|
||||
Gregor Jasny
|
||||
|
67
ares/ares_strcasecmp.c
Normal file
67
ares/ares_strcasecmp.c
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
#include "ares_strcasecmp.h"
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
int ares_strcasecmp(const char *a, const char *b)
|
||||
{
|
||||
#if defined(HAVE_STRCMPI)
|
||||
return strcmpi(a, b);
|
||||
#elif defined(HAVE_STRICMP)
|
||||
return stricmp(a, b);
|
||||
#else
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < (size_t)-1; i++) {
|
||||
int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i];
|
||||
int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i];
|
||||
if (c1 != c2)
|
||||
return c1-c2;
|
||||
if (!c1)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
int ares_strncasecmp(const char *a, const char *b, size_t n)
|
||||
{
|
||||
#if defined(HAVE_STRNCMPI)
|
||||
return strncmpi(a, b, n);
|
||||
#elif defined(HAVE_STRNICMP)
|
||||
return strnicmp(a, b, n);
|
||||
#else
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i];
|
||||
int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i];
|
||||
if (c1 != c2)
|
||||
return c1-c2;
|
||||
if (!c1)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
31
ares/ares_strcasecmp.h
Normal file
31
ares/ares_strcasecmp.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef HEADER_CARES_STRCASECMP_H
|
||||
#define HEADER_CARES_STRCASECMP_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
extern int ares_strcasecmp(const char *a, const char *b);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
extern int ares_strncasecmp(const char *a, const char *b, size_t n);
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CARES_STRCASECMP_H */
|
43
ares/ares_strdup.c
Normal file
43
ares/ares_strdup.c
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
#include "ares_strdup.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
char *ares_strdup(const char *s1)
|
||||
{
|
||||
size_t sz;
|
||||
char * s2;
|
||||
|
||||
if(s1) {
|
||||
sz = strlen(s1);
|
||||
if(sz < (size_t)-1) {
|
||||
sz++;
|
||||
if(sz < ((size_t)-1) / sizeof(char)) {
|
||||
s2 = malloc(sz * sizeof(char));
|
||||
if(s2) {
|
||||
memcpy(s2, s1, sz * sizeof(char));
|
||||
return s2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (char *)NULL;
|
||||
}
|
||||
#endif
|
27
ares/ares_strdup.h
Normal file
27
ares/ares_strdup.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef HEADER_CARES_STRDUP_H
|
||||
#define HEADER_CARES_STRDUP_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
extern char *ares_strdup(const char *s1);
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CARES_STRDUP_H */
|
@@ -4,12 +4,12 @@
|
||||
#define ARES__VERSION_H
|
||||
|
||||
#define ARES_VERSION_MAJOR 1
|
||||
#define ARES_VERSION_MINOR 5
|
||||
#define ARES_VERSION_PATCH 3
|
||||
#define ARES_VERSION_MINOR 6
|
||||
#define ARES_VERSION_PATCH 1
|
||||
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
||||
(ARES_VERSION_MINOR<<8)|\
|
||||
(ARES_VERSION_PATCH))
|
||||
#define ARES_VERSION_STR "1.5.3-CVS"
|
||||
#define ARES_VERSION_STR "1.6.1-CVS"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
77
ares/ares_writev.c
Normal file
77
ares/ares_writev.c
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifndef HAVE_WRITEV
|
||||
ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
char *buffer, *bp;
|
||||
int i;
|
||||
size_t bytes = 0;
|
||||
ssize_t result;
|
||||
|
||||
/* Validate iovcnt */
|
||||
if (iovcnt <= 0)
|
||||
{
|
||||
SET_ERRNO(EINVAL);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Validate and find the sum of the iov_len values in the iov array */
|
||||
for (i = 0; i < iovcnt; i++)
|
||||
{
|
||||
if (iov[i].iov_len > INT_MAX - bytes)
|
||||
{
|
||||
SET_ERRNO(EINVAL);
|
||||
return (-1);
|
||||
}
|
||||
bytes += iov[i].iov_len;
|
||||
}
|
||||
|
||||
if (bytes == 0)
|
||||
return (0);
|
||||
|
||||
/* Allocate a temporary buffer to hold the data */
|
||||
buffer = malloc(bytes);
|
||||
if (!buffer)
|
||||
{
|
||||
SET_ERRNO(ENOMEM);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Copy the data into buffer */
|
||||
for (bp = buffer, i = 0; i < iovcnt; ++i)
|
||||
{
|
||||
memcpy (bp, iov[i].iov_base, iov[i].iov_len);
|
||||
bp += iov[i].iov_len;
|
||||
}
|
||||
|
||||
/* Send buffer contents */
|
||||
result = swrite(s, buffer, bytes);
|
||||
|
||||
free(buffer);
|
||||
|
||||
return (result);
|
||||
}
|
||||
#endif
|
||||
|
37
ares/ares_writev.h
Normal file
37
ares/ares_writev.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef HEADER_CARES_WRITEV_H
|
||||
#define HEADER_CARES_WRITEV_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
#include "ares.h"
|
||||
|
||||
#ifndef HAVE_WRITEV
|
||||
|
||||
/* Structure for scatter/gather I/O. */
|
||||
struct iovec
|
||||
{
|
||||
void *iov_base; /* Pointer to data. */
|
||||
size_t iov_len; /* Length of data. */
|
||||
};
|
||||
|
||||
extern ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CARES_WRITEV_H */
|
@@ -1,7 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
${LIBTOOLIZE:-libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS
|
||||
# The logic for finding the right libtoolize is taken from libcurl's buildconf
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# findtool works as 'which' but we use a different name to make it more
|
||||
# obvious we aren't using 'which'! ;-)
|
||||
#
|
||||
findtool(){
|
||||
file="$1"
|
||||
|
||||
old_IFS=$IFS; IFS=':'
|
||||
for path in $PATH
|
||||
do
|
||||
IFS=$old_IFS
|
||||
# echo "checks for $file in $path" >&2
|
||||
if test -f "$path/$file"; then
|
||||
echo "$path/$file"
|
||||
return
|
||||
fi
|
||||
done
|
||||
IFS=$old_IFS
|
||||
}
|
||||
|
||||
# this approach that tries 'glibtool' first is some kind of work-around for
|
||||
# some BSD-systems I believe that use to provide the GNU libtool named
|
||||
# glibtool, with 'libtool' being something completely different.
|
||||
libtool=`findtool glibtool 2>/dev/null`
|
||||
if test ! -x "$libtool"; then
|
||||
libtool=`findtool ${LIBTOOL:-libtool}`
|
||||
fi
|
||||
|
||||
if test -z "$LIBTOOLIZE"; then
|
||||
# set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found
|
||||
# $libtool is already the full path
|
||||
libtoolize="${libtool}ize"
|
||||
else
|
||||
libtoolize=`findtool $LIBTOOLIZE`
|
||||
fi
|
||||
|
||||
${libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
|
||||
${AUTOHEADER:-autoheader}
|
||||
${AUTOCONF:-autoconf}
|
||||
${AUTOMAKE:-automake} --add-missing
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2006 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -76,9 +76,30 @@
|
||||
/* FUNCTIONS */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
/* Define if you have the ioctlsocket function. */
|
||||
/* Define if you have the ioctlsocket function. */
|
||||
#define HAVE_IOCTLSOCKET 1
|
||||
|
||||
/* Define if you have a working ioctlsocket FIONBIO function. */
|
||||
#define HAVE_IOCTLSOCKET_FIONBIO 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #define HAVE_STRCASECMP 1 */
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define if you have the strncasecmp function. */
|
||||
/* #define HAVE_STRNCASECMP 1 */
|
||||
|
||||
/* Define if you have the strnicmp function. */
|
||||
#define HAVE_STRNICMP 1
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define if you have the recv function. */
|
||||
#define HAVE_RECV 1
|
||||
|
||||
@@ -97,6 +118,30 @@
|
||||
/* Define to the function return type for recv. */
|
||||
#define RECV_TYPE_RETV int
|
||||
|
||||
/* Define if you have the recvfrom function. */
|
||||
#define HAVE_RECVFROM 1
|
||||
|
||||
/* Define to the type of arg 1 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG1 SOCKET
|
||||
|
||||
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG2 char
|
||||
|
||||
/* Define to the type of arg 3 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG3 int
|
||||
|
||||
/* Define to the type of arg 4 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG4 int
|
||||
|
||||
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||
|
||||
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG6 int
|
||||
|
||||
/* Define to the function return type for recvfrom. */
|
||||
#define RECVFROM_TYPE_RETV int
|
||||
|
||||
/* Define if you have the send function. */
|
||||
#define HAVE_SEND 1
|
||||
|
||||
@@ -123,6 +168,15 @@
|
||||
#define SOCKET int
|
||||
#define NS_INADDRSZ 4
|
||||
#define HAVE_ARPA_NAMESER_H 1
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_NETDB_H 1
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_NETINET_TCP_H 1
|
||||
#define HAVE_AF_INET6 1
|
||||
#define HAVE_PF_INET6 1
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
#undef HAVE_WINSOCK_H
|
||||
#undef HAVE_WINSOCK2_H
|
||||
#undef HAVE_WS2TCPIP_H
|
||||
@@ -169,17 +223,47 @@
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||
#endif
|
||||
|
||||
/* VS2008 does not support Windows build targets prior to WinXP, */
|
||||
/* so, if no build target has been defined we will target WinXP. */
|
||||
/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
|
||||
2000 as a supported build target. VS2008 default installations provide an
|
||||
embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
|
||||
valid build target for VS2008. Popular belief is that binaries built using
|
||||
Windows SDK versions 6.X and Windows 2000 as a build target are functional */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# define VS2008_MINIMUM_TARGET 0x0500
|
||||
#endif
|
||||
|
||||
/* When no build target is specified VS2008 default build target is Windows
|
||||
Vista, which leaves out even Winsows XP. If no build target has been given
|
||||
for VS2008 we will target the minimum Officially supported build target,
|
||||
which happens to be Windows XP. */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# define VS2008_DEFAULT_TARGET 0x0501
|
||||
#endif
|
||||
|
||||
/* VS2008 default target settings and minimum build target check */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0501
|
||||
# define _WIN32_WINNT VS2008_DEFAULT_TARGET
|
||||
# endif
|
||||
# ifndef WINVER
|
||||
# define WINVER 0x0501
|
||||
# define WINVER VS2008_DEFAULT_TARGET
|
||||
# endif
|
||||
# if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
|
||||
# error VS2008 does not support Windows build targets prior to WinXP
|
||||
# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
|
||||
# error VS2008 does not support Windows build targets prior to Windows 2000
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */
|
||||
/* convoluted, compiler dependant and in some cases even build target dependat. */
|
||||
#if defined(HAVE_WS2TCPIP_H)
|
||||
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
||||
# define HAVE_FREEADDRINFO 1
|
||||
# define HAVE_GETADDRINFO 1
|
||||
# define HAVE_GETNAMEINFO 1
|
||||
# elif defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
# define HAVE_FREEADDRINFO 1
|
||||
# define HAVE_GETADDRINFO 1
|
||||
# define HAVE_GETNAMEINFO 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@@ -1,9 +1,68 @@
|
||||
AC_INIT([c-ares],[1.5.1],[daniel@haxx.se])
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
dnl Version not hardcoded here. Fetched later from ares_version.h
|
||||
AC_INIT([c-ares], [-],
|
||||
[c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares])
|
||||
|
||||
CARES_OVERRIDE_AUTOCONF
|
||||
|
||||
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
CARES_CHECK_OPTION_DEBUG
|
||||
CARES_CHECK_OPTION_OPTIMIZE
|
||||
CARES_CHECK_OPTION_WARNINGS
|
||||
|
||||
CARES_CHECK_PATH_SEPARATOR
|
||||
|
||||
dnl SED is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
AC_PATH_PROG([SED], [sed], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$SED" || test "$SED" = "not_found"; then
|
||||
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
||||
fi
|
||||
AC_SUBST([SED])
|
||||
|
||||
dnl GREP is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
AC_PATH_PROG([GREP], [grep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
||||
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
||||
fi
|
||||
AC_SUBST([GREP])
|
||||
|
||||
dnl EGREP is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
|
||||
AC_MSG_CHECKING([for egrep])
|
||||
EGREP="$GREP -E"
|
||||
AC_MSG_RESULT([$EGREP])
|
||||
else
|
||||
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
fi
|
||||
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
||||
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
||||
fi
|
||||
AC_SUBST([EGREP])
|
||||
|
||||
dnl AR is mandatory for configure process and libtool.
|
||||
dnl This is target dependant, so check it as a tool.
|
||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
||||
fi
|
||||
AC_SUBST([AR])
|
||||
|
||||
dnl Fetch c-ares version from ares_version.h
|
||||
VERSION=`$SED -ne 's/^#define ARES_VERSION_STR "\(.*\)"/\1/p' ${srcdir}/ares_version.h`
|
||||
AM_INIT_AUTOMAKE([c-ares], [$VERSION])
|
||||
AC_MSG_CHECKING([c-ares version])
|
||||
AC_MSG_RESULT([$VERSION])
|
||||
|
||||
dnl
|
||||
dnl Detect the canonical host and target build environment
|
||||
@@ -13,11 +72,19 @@ AC_CANONICAL_HOST
|
||||
dnl Get system canonical name
|
||||
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
|
||||
|
||||
AC_AIX
|
||||
AC_PROG_CC
|
||||
CARES_CHECK_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl This defines _ALL_SOURCE for AIX
|
||||
CARES_CHECK_AIX_ALL_SOURCE
|
||||
|
||||
dnl Our configure and build reentrant settings
|
||||
CARES_CONFIGURE_REENTRANT
|
||||
|
||||
dnl check for how to do large files
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
case $host_os in
|
||||
solaris*)
|
||||
AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used])
|
||||
@@ -27,72 +94,15 @@ esac
|
||||
dnl support building of Windows DLLs
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
dnl ************************************************************
|
||||
dnl Option to switch on debug options. This makes an assumption that
|
||||
dnl this is built as an 'ares' subdir in the curl source tree. Subject for
|
||||
dnl improval in the future!
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether to enable debug options])
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],[Enable pedantic debug options])
|
||||
AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
CARES_PROCESS_DEBUG_BUILD_OPTS
|
||||
|
||||
dnl when doing the debug stuff, use static library only
|
||||
AC_DISABLE_SHARED
|
||||
AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes)
|
||||
AM_CONDITIONAL(CURLDEBUG, test x$want_debug = xyes)
|
||||
|
||||
debugbuild="yes"
|
||||
|
||||
dnl the entire --enable-debug is a hack that lives and runs on top of
|
||||
dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier
|
||||
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG -I$srcdir/../include"
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
||||
dnl check for how to do large files, needed to get the curl_off_t check
|
||||
dnl done right
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_CHECK_SIZEOF(curl_off_t, ,[
|
||||
#include <stdio.h>
|
||||
#include "$srcdir/../include/curl/curl.h"
|
||||
])
|
||||
|
||||
dnl set compiler "debug" options to become more picky, and remove
|
||||
dnl optimize options from CFLAGS
|
||||
CURL_CC_DEBUG_OPTS
|
||||
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
AM_CONDITIONAL(DEBUGBUILD, test x$debugbuild = xyes)
|
||||
|
||||
dnl skip libtool C++ and Fortran compiler checks
|
||||
m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])])
|
||||
m4_defun([AC_PROG_CXX],[])
|
||||
m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])])
|
||||
m4_defun([AC_PROG_CXXCPP],[true])
|
||||
m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])])
|
||||
m4_defun([AC_PROG_F77],[])
|
||||
|
||||
dnl skip libtool C++ and Fortran linker checks
|
||||
m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])])
|
||||
m4_defun([AC_LIBTOOL_CXX],[])
|
||||
m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])])
|
||||
m4_defun([AC_LIBTOOL_CXXCPP],[true])
|
||||
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
|
||||
m4_defun([AC_LIBTOOL_F77],[])
|
||||
|
||||
dnl force libtool to build static libraries with PIC on AMD64-linux
|
||||
AC_MSG_CHECKING([if arch-OS host is AMD64-linux (to build static libraries with PIC)])
|
||||
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
|
||||
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
||||
case $host in
|
||||
x86_64*linux*)
|
||||
x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
|
||||
AC_MSG_RESULT([yes])
|
||||
with_pic=yes
|
||||
;;
|
||||
@@ -117,11 +127,43 @@ AC_MSG_RESULT($need_no_undefined)
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl check if this is the Intel ICC compiler, and if so make it stricter
|
||||
dnl (convert warning 147 into an error) so that it properly can detect the
|
||||
dnl gethostbyname_r() version
|
||||
dnl platform/compiler/architecture specific checks/flags
|
||||
dnl **********************************************************************
|
||||
|
||||
CARES_CHECK_COMPILER
|
||||
CARES_SET_COMPILER_BASIC_OPTS
|
||||
CARES_SET_COMPILER_DEBUG_OPTS
|
||||
CARES_SET_COMPILER_OPTIMIZE_OPTS
|
||||
CARES_SET_COMPILER_WARNING_OPTS
|
||||
|
||||
case $host in
|
||||
#
|
||||
x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
|
||||
#
|
||||
if test "$compiler_id" = "INTEL_UNIX_C"; then
|
||||
#
|
||||
if test "$compiler_num" -ge "900" &&
|
||||
test "$compiler_num" -lt "1000"; then
|
||||
dnl icc 9.X specific
|
||||
CFLAGS="$CFLAGS -i-dynamic"
|
||||
fi
|
||||
#
|
||||
if test "$compiler_num" -ge "1000"; then
|
||||
dnl icc 10.X or later
|
||||
CFLAGS="$CFLAGS -shared-intel"
|
||||
fi
|
||||
#
|
||||
fi
|
||||
;;
|
||||
#
|
||||
esac
|
||||
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
dnl **********************************************************************
|
||||
CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"])
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
@@ -145,43 +187,6 @@ case X-"$ac_cv_native_windows" in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl platform/compiler/architecture specific checks/flags
|
||||
dnl **********************************************************************
|
||||
|
||||
case $host in
|
||||
#
|
||||
x86_64*linux*)
|
||||
#
|
||||
dnl find out if icc is being used
|
||||
if test "z$ICC" = "z"; then
|
||||
CURL_DETECT_ICC
|
||||
fi
|
||||
#
|
||||
if test "$ICC" = "yes"; then
|
||||
dnl figure out icc version
|
||||
AC_MSG_CHECKING([icc version])
|
||||
iccver=`$CC -dumpversion`
|
||||
iccnhi=`echo $iccver | cut -d . -f1`
|
||||
iccnlo=`echo $iccver | cut -d . -f2`
|
||||
iccnum=`(expr $iccnhi "*" 100 + $iccnlo) 2>/dev/null`
|
||||
AC_MSG_RESULT($iccver)
|
||||
#
|
||||
if test "$iccnum" -ge "900" && test "$iccnum" -lt "1000"; then
|
||||
dnl icc 9.X specific
|
||||
CFLAGS="$CFLAGS -i-dynamic"
|
||||
fi
|
||||
#
|
||||
if test "$iccnum" -ge "1000"; then
|
||||
dnl icc 10.X or later
|
||||
CFLAGS="$CFLAGS -shared-intel"
|
||||
fi
|
||||
#
|
||||
fi
|
||||
;;
|
||||
#
|
||||
esac
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
@@ -325,9 +330,7 @@ then
|
||||
fi
|
||||
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" = "1"; then
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [If you have gethostbyname])
|
||||
else
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"; then
|
||||
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
|
||||
fi
|
||||
|
||||
@@ -340,6 +343,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
||||
,
|
||||
-lnsl)
|
||||
fi
|
||||
ac_cv_func_strcasecmp="no"
|
||||
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
@@ -415,26 +419,6 @@ if test "x$RECENTAIX" = "xyes"; then
|
||||
|
||||
AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code])
|
||||
|
||||
dnl check if this is the IBM xlc compiler
|
||||
dnl Details thanks to => http://predef.sourceforge.net/
|
||||
AC_MSG_CHECKING([if this is the xlc compiler])
|
||||
AC_EGREP_CPP([^__xlC__], [__xlC__],
|
||||
dnl action if the text is found, this it has not been replaced by the
|
||||
dnl cpp
|
||||
XLC="no"
|
||||
AC_MSG_RESULT([no]),
|
||||
dnl the text was not found, it was replaced by the cpp
|
||||
XLC="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$CFLAGS -qthreaded"
|
||||
dnl AIX xlc has to have strict aliasing turned off. If not,
|
||||
dnl the optimizer assumes that pointers can only point to
|
||||
dnl an object of the same type.
|
||||
CFLAGS="$CFLAGS -qnoansialias"
|
||||
dnl Force AIX xlc to stop after the compilation phase, and not
|
||||
dnl generate object code, when the source compiles with errors.
|
||||
CFLAGS="$CFLAGS -qhalt=e"
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
@@ -455,6 +439,7 @@ AC_CHECK_HEADERS(
|
||||
sys/socket.h \
|
||||
sys/ioctl.h \
|
||||
sys/param.h \
|
||||
sys/uio.h \
|
||||
netdb.h \
|
||||
netinet/in.h \
|
||||
netinet/tcp.h \
|
||||
@@ -506,7 +491,8 @@ AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(time_t)
|
||||
|
||||
AC_CHECK_TYPE(long long,
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])]
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1,
|
||||
[Define to 1 if the compiler supports the 'long long' data type.])]
|
||||
longlong="yes"
|
||||
)
|
||||
|
||||
@@ -549,11 +535,33 @@ TYPE_SIG_ATOMIC_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
CURL_CHECK_FUNC_RECV
|
||||
|
||||
CURL_CHECK_FUNC_RECVFROM
|
||||
CURL_CHECK_FUNC_SEND
|
||||
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
CARES_CHECK_FUNC_FCNTL
|
||||
CARES_CHECK_FUNC_FREEADDRINFO
|
||||
CARES_CHECK_FUNC_GETADDRINFO
|
||||
CARES_CHECK_FUNC_GETHOSTBYADDR
|
||||
CARES_CHECK_FUNC_GETHOSTBYNAME
|
||||
CARES_CHECK_FUNC_GETHOSTNAME
|
||||
CARES_CHECK_FUNC_GETSERVBYPORT_R
|
||||
CARES_CHECK_FUNC_INET_NTOP
|
||||
CARES_CHECK_FUNC_INET_PTON
|
||||
CARES_CHECK_FUNC_IOCTL
|
||||
CARES_CHECK_FUNC_IOCTLSOCKET
|
||||
CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
||||
CARES_CHECK_FUNC_SETSOCKOPT
|
||||
CARES_CHECK_FUNC_STRCASECMP
|
||||
CARES_CHECK_FUNC_STRCMPI
|
||||
CARES_CHECK_FUNC_STRDUP
|
||||
CARES_CHECK_FUNC_STRICMP
|
||||
CARES_CHECK_FUNC_STRNCASECMP
|
||||
CARES_CHECK_FUNC_STRNCMPI
|
||||
CARES_CHECK_FUNC_STRNICMP
|
||||
CARES_CHECK_FUNC_WRITEV
|
||||
|
||||
|
||||
dnl check for AF_INET6
|
||||
CARES_CHECK_CONSTANT(
|
||||
[
|
||||
@@ -720,54 +728,29 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
||||
)
|
||||
|
||||
|
||||
AC_CHECK_FUNCS( bitncmp \
|
||||
gettimeofday \
|
||||
if_indextoname,
|
||||
dnl if found
|
||||
[],
|
||||
dnl if not found, $ac_func is the name we check for
|
||||
func="$ac_func"
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_TRY_LINK( [],
|
||||
[ $func ();],
|
||||
AC_MSG_RESULT(yes!)
|
||||
eval "ac_cv_func_$func=yes"
|
||||
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
|
||||
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
|
||||
AC_MSG_RESULT(but still no)
|
||||
)
|
||||
)
|
||||
AC_CHECK_FUNCS([bitncmp \
|
||||
gettimeofday \
|
||||
if_indextoname
|
||||
],[
|
||||
],[
|
||||
func="$ac_func"
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
$func ();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
eval "ac_cv_func_$func=yes"
|
||||
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
|
||||
[Define to 1 if you have the $func function.])
|
||||
],[
|
||||
AC_MSG_RESULT([but still no])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl check for inet_pton
|
||||
AC_CHECK_FUNCS(inet_pton)
|
||||
dnl Some systems have it, but not IPv6
|
||||
if test "$ac_cv_func_inet_pton" = "yes" ; then
|
||||
AC_MSG_CHECKING(if inet_pton supports IPv6)
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
int main()
|
||||
{
|
||||
struct in6_addr addr6;
|
||||
if (inet_pton(AF_INET6, "::1", &addr6) < 1)
|
||||
exit(1);
|
||||
else
|
||||
exit(0);
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE_UNQUOTED(HAVE_INET_PTON_IPV6,1,[Define to 1 if inet_pton supports IPv6.])
|
||||
], AC_MSG_RESULT(no),AC_MSG_RESULT(no))
|
||||
fi
|
||||
dnl Check for inet_net_pton
|
||||
AC_CHECK_FUNCS(inet_net_pton)
|
||||
dnl Again, some systems have it, but not IPv6
|
||||
@@ -799,39 +782,6 @@ int main()
|
||||
fi
|
||||
|
||||
|
||||
dnl Check for inet_ntop
|
||||
AC_CHECK_FUNCS(inet_ntop)
|
||||
dnl Again, some systems have it, but not IPv6
|
||||
if test "$ac_cv_func_inet_ntop" = "yes" ; then
|
||||
AC_MSG_CHECKING(if inet_ntop supports IPv6)
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
int main()
|
||||
{
|
||||
struct in6_addr addr6;
|
||||
char buf[128];
|
||||
if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
|
||||
exit(1);
|
||||
else
|
||||
exit(0);
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6,1,
|
||||
[Define to 1 if inet_ntop supports IPv6.])
|
||||
], AC_MSG_RESULT(no),AC_MSG_RESULT(no))
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(struct in6_addr, ,
|
||||
[
|
||||
#undef inline
|
||||
@@ -894,12 +844,6 @@ dnl and get the types of five of its arguments.
|
||||
CURL_CHECK_FUNC_GETNAMEINFO
|
||||
|
||||
|
||||
dnl God bless non-standardized functions! We need to see which getservbyport_r
|
||||
dnl variant is available
|
||||
CARES_CHECK_GETSERVBYPORT_R
|
||||
|
||||
CURL_CHECK_NONBLOCKING_SOCKET
|
||||
|
||||
AC_C_BIGENDIAN(
|
||||
[AC_DEFINE(ARES_BIG_ENDIAN, 1,
|
||||
[define this if ares is built for a big endian system])],
|
||||
@@ -930,5 +874,21 @@ if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
|
||||
[a suitable file/device to read random data from])
|
||||
fi
|
||||
|
||||
CARES_CHECK_OPTION_NONBLOCKING
|
||||
CARES_CHECK_NONBLOCKING_SOCKET
|
||||
|
||||
CARES_PRIVATE_LIBS="$LIBS"
|
||||
AC_SUBST(CARES_PRIVATE_LIBS)
|
||||
|
||||
dnl squeeze whitespace out of some variables
|
||||
|
||||
squeeze CFLAGS
|
||||
squeeze CPPFLAGS
|
||||
squeeze DEFS
|
||||
squeeze LDFLAGS
|
||||
squeeze LIBS
|
||||
|
||||
squeeze CARES_PRIVATE_LIBS
|
||||
|
||||
AC_CONFIG_FILES([Makefile libcares.pc])
|
||||
AC_OUTPUT
|
||||
|
@@ -19,23 +19,22 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -47,8 +46,7 @@
|
||||
#include "ares_ipv6.h"
|
||||
#include "inet_net_pton.h"
|
||||
|
||||
#if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6) || \
|
||||
!defined(HAVE_INET_PTON) || !defined(HAVE_INET_PTON_IPV6)
|
||||
#if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6)
|
||||
|
||||
/*
|
||||
* static int
|
||||
@@ -425,7 +423,7 @@ ares_inet_net_pton(int af, const char *src, void *dst, size_t size)
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_INET_PTON) || !defined(HAVE_INET_PTON_IPV6)
|
||||
#ifndef HAVE_INET_PTON
|
||||
int ares_inet_pton(int af, const char *src, void *dst)
|
||||
{
|
||||
int size, result;
|
||||
|
@@ -18,7 +18,7 @@
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_INET_PTON) && defined(HAVE_INET_PTON_IPV6)
|
||||
#ifdef HAVE_INET_PTON
|
||||
#define ares_inet_pton(x,y,z) inet_pton(x,y,z)
|
||||
#else
|
||||
int ares_inet_pton(int af, const char *src, void *dst);
|
||||
|
@@ -18,21 +18,22 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include "nameser.h"
|
||||
#else
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -45,7 +46,7 @@
|
||||
#include "inet_ntop.h"
|
||||
|
||||
|
||||
#if !defined(HAVE_INET_NTOP) || !defined(HAVE_INET_NTOP_IPV6)
|
||||
#ifndef HAVE_INET_NTOP
|
||||
|
||||
#ifdef SPRINTF_CHAR
|
||||
# define SPRINTF(x) strlen(sprintf/**/x)
|
||||
|
@@ -18,7 +18,7 @@
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_INET_NTOP) && defined(HAVE_INET_NTOP_IPV6)
|
||||
#ifdef HAVE_INET_NTOP
|
||||
#define ares_inet_ntop(w,x,y,z) inet_ntop(w,x,y,z)
|
||||
#else
|
||||
const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# / __|____ / _` | '__/ _ \/ __|
|
||||
# | (_|_____| (_| | | | __/\__ \
|
||||
# \___| \__,_|_| \___||___/
|
||||
# $id: $
|
||||
# $Id$
|
||||
#
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
@@ -18,3 +18,4 @@ Requires:
|
||||
Requires.private:
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lcares
|
||||
Libs.private: @CARES_PRIVATE_LIBS@
|
||||
|
5
ares/m4/.cvsignore
Normal file
5
ares/m4/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
1226
ares/m4/cares-compilers.m4
Normal file
1226
ares/m4/cares-compilers.m4
Normal file
File diff suppressed because it is too large
Load Diff
214
ares/m4/cares-confopts.m4
Normal file
214
ares/m4/cares-confopts.m4
Normal file
@@ -0,0 +1,214 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2008 by Daniel Stenberg et al
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose and without fee is hereby granted, provided
|
||||
# that the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 3
|
||||
|
||||
|
||||
dnl CARES_CHECK_OPTION_DEBUG
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if configure has been invoked with option
|
||||
dnl --enable-debug or --disable-debug, and set shell
|
||||
dnl variable want_debug value as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
|
||||
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether to enable debug build options])
|
||||
OPT_DEBUG_BUILD="default"
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],[Enable debug build options])
|
||||
AC_HELP_STRING([--disable-debug],[Disable debug build options]),
|
||||
OPT_DEBUG_BUILD=$enableval)
|
||||
case "$OPT_DEBUG_BUILD" in
|
||||
no)
|
||||
dnl --disable-debug option used
|
||||
want_debug="no"
|
||||
;;
|
||||
default)
|
||||
dnl configure option not specified
|
||||
want_debug="no"
|
||||
;;
|
||||
*)
|
||||
dnl --enable-debug option used
|
||||
want_debug="yes"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$want_debug])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_OPTION_NONBLOCKING
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if configure has been invoked with option
|
||||
dnl --enable-nonblocking or --disable-nonblocking, and
|
||||
dnl set shell variable want_nonblocking as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_NONBLOCKING], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_NONBLOCKING_SOCKET])dnl
|
||||
AC_MSG_CHECKING([whether to enable non-blocking communications])
|
||||
OPT_NONBLOCKING="default"
|
||||
AC_ARG_ENABLE(nonblocking,
|
||||
AC_HELP_STRING([--enable-nonblocking],[Enable non-blocking communications])
|
||||
AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking communications]),
|
||||
OPT_NONBLOCKING=$enableval)
|
||||
case "$OPT_NONBLOCKING" in
|
||||
no)
|
||||
dnl --disable-nonblocking option used
|
||||
want_nonblocking="no"
|
||||
;;
|
||||
default)
|
||||
dnl configure option not specified
|
||||
want_nonblocking="yes"
|
||||
;;
|
||||
*)
|
||||
dnl --enable-nonblocking option used
|
||||
want_nonblocking="yes"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$want_nonblocking])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_OPTION_OPTIMIZE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if configure has been invoked with option
|
||||
dnl --enable-optimize or --disable-optimize, and set
|
||||
dnl shell variable want_optimize value as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_OPTIMIZE], [
|
||||
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
|
||||
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether to enable compiler optimizer])
|
||||
OPT_COMPILER_OPTIMIZE="default"
|
||||
AC_ARG_ENABLE(optimize,
|
||||
AC_HELP_STRING([--enable-optimize(=OPT)],[Enable compiler optimizations (default=-O2)])
|
||||
AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
|
||||
OPT_COMPILER_OPTIMIZE=$enableval)
|
||||
case "$OPT_COMPILER_OPTIMIZE" in
|
||||
no)
|
||||
dnl --disable-optimize option used. We will handle this as
|
||||
dnl a request to disable compiler optimizations if possible.
|
||||
dnl If the compiler is known CFLAGS and CPPFLAGS will be
|
||||
dnl overridden, otherwise this can not be honored.
|
||||
want_optimize="no"
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
default)
|
||||
dnl configure's optimize option not specified. Initially we will
|
||||
dnl handle this as a a request contrary to configure's setting
|
||||
dnl for --enable-debug. IOW, initially, for debug-enabled builds
|
||||
dnl this will be handled as a request to disable optimizations if
|
||||
dnl possible, and for debug-disabled builds this will be handled
|
||||
dnl initially as a request to enable optimizations if possible.
|
||||
dnl Finally, if the compiler is known and CFLAGS and CPPFLAGS do
|
||||
dnl not have any optimizer flag the request will be honored, in
|
||||
dnl any other case the request can not be honored.
|
||||
dnl IOW, existing optimizer flags defined in CFLAGS or CPPFLAGS
|
||||
dnl will always take precedence over any initial assumption.
|
||||
if test "$want_debug" = "yes"; then
|
||||
want_optimize="assume_no"
|
||||
AC_MSG_RESULT([not specified (assuming no)])
|
||||
else
|
||||
want_optimize="assume_yes"
|
||||
AC_MSG_RESULT([not specified (assuming yes)])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
dnl --enable-optimize option used. We will handle this as
|
||||
dnl a request to enable compiler optimizations if possible.
|
||||
dnl If the compiler is known CFLAGS and CPPFLAGS will be
|
||||
dnl overridden, otherwise this can not be honored.
|
||||
want_optimize="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_OPTION_WARNINGS
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if configure has been invoked with option
|
||||
dnl --enable-warnings or --disable-warnings, and set
|
||||
dnl shell variable want_warnings as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_WARNINGS], [
|
||||
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
|
||||
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether to enable strict compiler warnings])
|
||||
OPT_COMPILER_WARNINGS="default"
|
||||
AC_ARG_ENABLE(warnings,
|
||||
AC_HELP_STRING([--enable-warnings],[Enable strict compiler warnings])
|
||||
AC_HELP_STRING([--disable-warnings],[Disable strict compiler warnings]),
|
||||
OPT_COMPILER_WARNINGS=$enableval)
|
||||
case "$OPT_COMPILER_WARNINGS" in
|
||||
no)
|
||||
dnl --disable-warnings option used
|
||||
want_warnings="no"
|
||||
;;
|
||||
default)
|
||||
dnl configure option not specified, so
|
||||
dnl use same setting as --enable-debug
|
||||
want_warnings="$want_debug"
|
||||
;;
|
||||
*)
|
||||
dnl --enable-warnings option used
|
||||
want_warnings="yes"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$want_warnings])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NONBLOCKING_SOCKET
|
||||
dnl -------------------------------------------------
|
||||
dnl Check for how to set a socket into non-blocking state.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NONBLOCKING_SOCKET], [
|
||||
AC_REQUIRE([CARES_CHECK_OPTION_NONBLOCKING])dnl
|
||||
AC_REQUIRE([CARES_CHECK_FUNC_FCNTL])dnl
|
||||
AC_REQUIRE([CARES_CHECK_FUNC_IOCTL])dnl
|
||||
AC_REQUIRE([CARES_CHECK_FUNC_IOCTLSOCKET])dnl
|
||||
AC_REQUIRE([CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL])dnl
|
||||
AC_REQUIRE([CARES_CHECK_FUNC_SETSOCKOPT])dnl
|
||||
#
|
||||
tst_method="unknown"
|
||||
if test "$want_nonblocking" = "yes"; then
|
||||
AC_MSG_CHECKING([how to set a socket into non-blocking mode])
|
||||
if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
|
||||
tst_method="fcntl O_NONBLOCK"
|
||||
elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
|
||||
tst_method="ioctl FIONBIO"
|
||||
elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
|
||||
tst_method="ioctlsocket FIONBIO"
|
||||
elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
|
||||
tst_method="IoctlSocket FIONBIO"
|
||||
elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
|
||||
tst_method="setsockopt SO_NONBLOCK"
|
||||
fi
|
||||
AC_MSG_RESULT([$tst_method])
|
||||
if test "$tst_method" = "unknown"; then
|
||||
AC_MSG_WARN([cannot determine non-blocking socket method.])
|
||||
fi
|
||||
fi
|
||||
if test "$tst_method" = "unknown"; then
|
||||
AC_DEFINE_UNQUOTED(USE_BLOCKING_SOCKETS, 1,
|
||||
[Define to disable non-blocking sockets.])
|
||||
AC_MSG_WARN([non-blocking sockets disabled.])
|
||||
fi
|
||||
])
|
||||
|
2719
ares/m4/cares-functions.m4
Normal file
2719
ares/m4/cares-functions.m4
Normal file
File diff suppressed because it is too large
Load Diff
103
ares/m4/cares-override.m4
Normal file
103
ares/m4/cares-override.m4
Normal file
@@ -0,0 +1,103 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 2
|
||||
|
||||
dnl CARES_OVERRIDE_AUTOCONF
|
||||
dnl -------------------------------------------------
|
||||
dnl Placing a call to this macro in configure.ac after
|
||||
dnl the one to AC_INIT will make macros in this file
|
||||
dnl visible to the rest of the compilation overriding
|
||||
dnl those from Autoconf.
|
||||
|
||||
AC_DEFUN([CARES_OVERRIDE_AUTOCONF], [
|
||||
AC_BEFORE([$0],[AC_PROG_LIBTOOL])
|
||||
# using cares-override.m4
|
||||
])
|
||||
|
||||
dnl Override some Libtool tests
|
||||
dnl -------------------------------------------------
|
||||
dnl This is done to prevent Libtool 1.5.X from doing
|
||||
dnl unnecesary C++, Fortran and Java tests and reduce
|
||||
dnl resulting configure script by nearly 300 Kb.
|
||||
|
||||
m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
|
||||
m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
|
||||
m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
|
||||
|
||||
dnl Override Autoconf's AC_LANG_PROGRAM (C)
|
||||
dnl -------------------------------------------------
|
||||
dnl This is done to prevent compiler warning
|
||||
dnl 'function declaration isn't a prototype'
|
||||
dnl in function main. This requires at least
|
||||
dnl a c89 compiler and does not suport K&R.
|
||||
|
||||
m4_define([AC_LANG_PROGRAM(C)],
|
||||
[$1
|
||||
int main (void)
|
||||
{
|
||||
$2
|
||||
;
|
||||
return 0;
|
||||
}])
|
||||
|
||||
dnl Override Autoconf's AC_LANG_CALL (C)
|
||||
dnl -------------------------------------------------
|
||||
dnl This is a backport of Autoconf's 2.60 with the
|
||||
dnl embedded comments that hit the resulting script
|
||||
dnl removed. This is done to reduce configure size
|
||||
dnl and use fixed macro across Autoconf versions.
|
||||
|
||||
m4_define([AC_LANG_CALL(C)],
|
||||
[AC_LANG_PROGRAM([$1
|
||||
m4_if([$2], [main], ,
|
||||
[
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char $2 ();])], [return $2 ();])])
|
||||
|
||||
dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
|
||||
dnl -------------------------------------------------
|
||||
dnl This is a backport of Autoconf's 2.60 with the
|
||||
dnl embedded comments that hit the resulting script
|
||||
dnl removed. This is done to reduce configure size
|
||||
dnl and use fixed macro across Autoconf versions.
|
||||
|
||||
m4_define([AC_LANG_FUNC_LINK_TRY(C)],
|
||||
[AC_LANG_PROGRAM(
|
||||
[
|
||||
#define $1 innocuous_$1
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
#undef $1
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char $1 ();
|
||||
#if defined __stub_$1 || defined __stub___$1
|
||||
choke me
|
||||
#endif
|
||||
], [return $1 ();])])
|
||||
|
||||
dnl Override Autoconf's PATH_SEPARATOR check
|
||||
dnl -------------------------------------------------
|
||||
dnl This is done to ensure that the same check is
|
||||
dnl used across different Autoconf versions and to
|
||||
dnl allow us to use this macro early enough in the
|
||||
dnl configure script.
|
||||
|
||||
m4_define([_AS_PATH_SEPARATOR_PREPARE],
|
||||
[CARES_CHECK_PATH_SEPARATOR
|
||||
m4_define([$0],[])])
|
||||
|
||||
m4_define([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
|
||||
[CARES_CHECK_PATH_SEPARATOR
|
||||
m4_define([$0],[])])
|
||||
|
||||
|
460
ares/m4/cares-reentrant.m4
Normal file
460
ares/m4/cares-reentrant.m4
Normal file
@@ -0,0 +1,460 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2008 by Daniel Stenberg et al
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose and without fee is hereby granted, provided
|
||||
# that the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 3
|
||||
|
||||
dnl Note 1
|
||||
dnl ------
|
||||
dnl None of the CARES_CHECK_NEED_REENTRANT_* macros shall use HAVE_FOO_H to
|
||||
dnl conditionally include header files. These macros are used early in the
|
||||
dnl configure process much before header file availability is known.
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GMTIME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function gmtime_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GMTIME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([gmtime_r])
|
||||
],[
|
||||
tmp_gmtime_r="yes"
|
||||
],[
|
||||
tmp_gmtime_r="no"
|
||||
])
|
||||
if test "$tmp_gmtime_r" = "yes"; then
|
||||
AC_EGREP_CPP([gmtime_r],[
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_gmtime_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([gmtime_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_gmtime_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_LOCALTIME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function localtime_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_LOCALTIME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([localtime_r])
|
||||
],[
|
||||
tmp_localtime_r="yes"
|
||||
],[
|
||||
tmp_localtime_r="no"
|
||||
])
|
||||
if test "$tmp_localtime_r" = "yes"; then
|
||||
AC_EGREP_CPP([localtime_r],[
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_localtime_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([localtime_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_localtime_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_STRERROR_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function strerror_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_STRERROR_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([strerror_r])
|
||||
],[
|
||||
tmp_strerror_r="yes"
|
||||
],[
|
||||
tmp_strerror_r="no"
|
||||
])
|
||||
if test "$tmp_strerror_r" = "yes"; then
|
||||
AC_EGREP_CPP([strerror_r],[
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strerror_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([strerror_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strerror_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_STRTOK_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function strtok_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_STRTOK_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([strtok_r])
|
||||
],[
|
||||
tmp_strtok_r="yes"
|
||||
],[
|
||||
tmp_strtok_r="no"
|
||||
])
|
||||
if test "$tmp_strtok_r" = "yes"; then
|
||||
AC_EGREP_CPP([strtok_r],[
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strtok_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([strtok_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strtok_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_INET_NTOA_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function inet_ntoa_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_INET_NTOA_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([inet_ntoa_r])
|
||||
],[
|
||||
tmp_inet_ntoa_r="yes"
|
||||
],[
|
||||
tmp_inet_ntoa_r="no"
|
||||
])
|
||||
if test "$tmp_inet_ntoa_r" = "yes"; then
|
||||
AC_EGREP_CPP([inet_ntoa_r],[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],[
|
||||
tmp_inet_ntoa_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([inet_ntoa_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],[
|
||||
tmp_inet_ntoa_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function gethostbyaddr_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
|
||||
],[
|
||||
tmp_gethostbyaddr_r="yes"
|
||||
],[
|
||||
tmp_gethostbyaddr_r="no"
|
||||
])
|
||||
if test "$tmp_gethostbyaddr_r" = "yes"; then
|
||||
AC_EGREP_CPP([gethostbyaddr_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyaddr_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([gethostbyaddr_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyaddr_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function gethostbyname_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([gethostbyname_r])
|
||||
],[
|
||||
tmp_gethostbyname_r="yes"
|
||||
],[
|
||||
tmp_gethostbyname_r="no"
|
||||
])
|
||||
if test "$tmp_gethostbyname_r" = "yes"; then
|
||||
AC_EGREP_CPP([gethostbyname_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyname_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([gethostbyname_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyname_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function getprotobyname_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([getprotobyname_r])
|
||||
],[
|
||||
tmp_getprotobyname_r="yes"
|
||||
],[
|
||||
tmp_getprotobyname_r="no"
|
||||
])
|
||||
if test "$tmp_getprotobyname_r" = "yes"; then
|
||||
AC_EGREP_CPP([getprotobyname_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getprotobyname_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([getprotobyname_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getprotobyname_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function getservbyport_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([getservbyport_r])
|
||||
],[
|
||||
tmp_getservbyport_r="yes"
|
||||
],[
|
||||
tmp_getservbyport_r="no"
|
||||
])
|
||||
if test "$tmp_getservbyport_r" = "yes"; then
|
||||
AC_EGREP_CPP([getservbyport_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getservbyport_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([getservbyport_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getservbyport_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes several _r functions compiler visible.
|
||||
dnl Internal macro for CARES_CONFIGURE_REENTRANT.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GMTIME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_LOCALTIME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_STRERROR_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_STRTOK_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_INET_NTOA_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_SYSTEM
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl must be unconditionally done for this platform.
|
||||
dnl Internal macro for CARES_CONFIGURE_REENTRANT.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_SYSTEM], [
|
||||
case $host in
|
||||
*-*-solaris*)
|
||||
tmp_need_reentrant="yes"
|
||||
;;
|
||||
*)
|
||||
tmp_need_reentrant="no"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
|
||||
dnl -------------------------------------------------
|
||||
dnl This macro ensures that configuration tests done
|
||||
dnl after this will execute with preprocessor symbol
|
||||
dnl _REENTRANT defined. This macro also ensures that
|
||||
dnl the generated config file defines NEED_REENTRANT
|
||||
dnl and that in turn setup.h will define _REENTRANT.
|
||||
dnl Internal macro for CARES_CONFIGURE_REENTRANT.
|
||||
|
||||
AC_DEFUN([CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
|
||||
AC_DEFINE(NEED_REENTRANT, 1,
|
||||
[Define to 1 if _REENTRANT preprocessor symbol must be defined.])
|
||||
cat >>confdefs.h <<_EOF
|
||||
#ifndef _REENTRANT
|
||||
# define _REENTRANT
|
||||
#endif
|
||||
_EOF
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CONFIGURE_REENTRANT
|
||||
dnl -------------------------------------------------
|
||||
dnl This first checks if the preprocessor _REENTRANT
|
||||
dnl symbol is already defined. If it isn't currently
|
||||
dnl defined a set of checks are performed to verify
|
||||
dnl if its definition is required to make visible to
|
||||
dnl the compiler a set of *_r functions. Finally, if
|
||||
dnl _REENTRANT is already defined or needed it takes
|
||||
dnl care of making adjustments necessary to ensure
|
||||
dnl that it is defined equally for further configure
|
||||
dnl tests and generated config file.
|
||||
|
||||
AC_DEFUN([CARES_CONFIGURE_REENTRANT], [
|
||||
AC_PREREQ([2.50])dnl
|
||||
#
|
||||
AC_MSG_CHECKING([if _REENTRANT is already defined])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
#ifdef _REENTRANT
|
||||
int dummy=1;
|
||||
#else
|
||||
force compilation error
|
||||
#endif
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tmp_reentrant_initially_defined="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tmp_reentrant_initially_defined="no"
|
||||
])
|
||||
#
|
||||
if test "$tmp_reentrant_initially_defined" = "no"; then
|
||||
AC_MSG_CHECKING([if _REENTRANT is actually needed])
|
||||
CARES_CHECK_NEED_REENTRANT_SYSTEM
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([if _REENTRANT is onwards defined])
|
||||
if test "$tmp_reentrant_initially_defined" = "yes" ||
|
||||
test "$tmp_need_reentrant" = "yes"; then
|
||||
CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
#
|
||||
])
|
||||
|
74
ares/m4/cares-system.m4
Normal file
74
ares/m4/cares-system.m4
Normal file
@@ -0,0 +1,74 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2008 by Daniel Stenberg et al
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose and without fee is hereby granted, provided
|
||||
# that the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 2
|
||||
|
||||
|
||||
dnl CARES_CHECK_PATH_SEPARATOR
|
||||
dnl -------------------------------------------------
|
||||
dnl Check and compute the path separator for us. This
|
||||
dnl path separator is the symbol used to diferentiate
|
||||
dnl or separate paths inside the PATH environment var.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_PATH_SEPARATOR], [
|
||||
if test -z "$cares_cv_PATH_SEPARATOR"; then
|
||||
if test -z "$PATH"; then
|
||||
AC_MSG_ERROR([PATH not set. Cannot continue without PATH being set.])
|
||||
fi
|
||||
dnl Directory count in PATH when using a colon separator.
|
||||
tst_dirs_col=0
|
||||
tst_save_IFS=$IFS; IFS=':'
|
||||
for tst_dir in $PATH; do
|
||||
IFS=$tst_save_IFS
|
||||
test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
|
||||
done
|
||||
IFS=$tst_save_IFS
|
||||
dnl Directory count in PATH when using a semicolon separator.
|
||||
tst_dirs_sem=0
|
||||
tst_save_IFS=$IFS; IFS=';'
|
||||
for tst_dir in $PATH; do
|
||||
IFS=$tst_save_IFS
|
||||
test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
|
||||
done
|
||||
IFS=$tst_save_IFS
|
||||
if test $tst_dirs_sem -eq $tst_dirs_col; then
|
||||
dnl When both counting methods give the same result we do not want to
|
||||
dnl chose one over the other, and consider auto-detection not possible.
|
||||
if test -z "$PATH_SEPARATOR"; then
|
||||
dnl Stop dead until user provides PATH_SEPARATOR definition.
|
||||
AC_MSG_ERROR([PATH_SEPARATOR not set. Cannot continue without it.])
|
||||
fi
|
||||
else
|
||||
dnl Separator with the greater directory count is the auto-detected one.
|
||||
if test $tst_dirs_sem -gt $tst_dirs_col; then
|
||||
tst_auto_separator=';'
|
||||
else
|
||||
tst_auto_separator=':'
|
||||
fi
|
||||
if test -z "$PATH_SEPARATOR"; then
|
||||
dnl Simply use the auto-detected one when not already set.
|
||||
PATH_SEPARATOR="$tst_auto_separator"
|
||||
fi
|
||||
fi
|
||||
cares_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
|
||||
fi
|
||||
AC_SUBST([PATH_SEPARATOR])
|
||||
AC_SUBST([PATH])
|
||||
])
|
||||
|
||||
|
@@ -38,7 +38,7 @@ if(!-f "configure") {
|
||||
`./buildconf`;
|
||||
}
|
||||
print "adding $version in the configure.ac file\n";
|
||||
`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version])/' < configure.ac > configure.ac.dist`;
|
||||
`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`;
|
||||
|
||||
# now make a new configure script with this
|
||||
print "makes a new configure script\n";
|
||||
@@ -50,9 +50,11 @@ print "running configure\n";
|
||||
|
||||
# now make the actual tarball
|
||||
print "running make dist\n";
|
||||
`make dist`;
|
||||
`make dist VERSION=$version`;
|
||||
|
||||
print "removing temporary configure.ac file\n";
|
||||
`rm configure.ac.dist`;
|
||||
print "removing temporary ares_version.h file\n";
|
||||
`rm ares_version.h.dist`;
|
||||
|
||||
print "NOTE: now cvs tag this release!\n";
|
||||
|
102
ares/nameser.h
102
ares/nameser.h
@@ -3,41 +3,22 @@
|
||||
#ifndef ARES_NAMESER_H
|
||||
#define ARES_NAMESER_H
|
||||
|
||||
/* Windows-only header file provided by liren@vivisimo.com to make his Windows
|
||||
port build */
|
||||
/* header file provided by liren@vivisimo.com */
|
||||
|
||||
#ifndef NETWARE
|
||||
#include <process.h> /* for the _getpid() proto */
|
||||
#endif /* !NETWARE */
|
||||
#include <sys/types.h>
|
||||
#ifndef HAVE_ARPA_NAMESER_H
|
||||
|
||||
#ifndef NETWARE
|
||||
|
||||
#define MAXHOSTNAMELEN 256
|
||||
|
||||
/* Structure for scatter/gather I/O. */
|
||||
struct iovec
|
||||
{
|
||||
void *iov_base; /* Pointer to data. */
|
||||
size_t iov_len; /* Length of data. */
|
||||
};
|
||||
|
||||
#ifndef __WATCOMC__
|
||||
#define getpid() _getpid()
|
||||
#endif
|
||||
|
||||
int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
|
||||
#define writev(s,vect,count) ares_writev(s,vect,count)
|
||||
|
||||
#endif /* !NETWARE */
|
||||
|
||||
#define NS_CMPRSFLGS 0xc0
|
||||
#define NS_IN6ADDRSZ 16
|
||||
#define NS_INT16SZ 2
|
||||
#define NS_INADDRSZ 4
|
||||
|
||||
/* Flag bits indicating name compression. */
|
||||
#define INDIR_MASK NS_CMPRSFLGS
|
||||
#define NS_PACKETSZ 512 /* maximum packet size */
|
||||
#define NS_MAXDNAME 256 /* maximum domain name */
|
||||
#define NS_MAXCDNAME 255 /* maximum compressed domain name */
|
||||
#define NS_MAXLABEL 63
|
||||
#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
||||
#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
||||
#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
|
||||
#define NS_INT16SZ 2
|
||||
#define NS_INADDRSZ 4
|
||||
#define NS_IN6ADDRSZ 16
|
||||
#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
|
||||
#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
|
||||
|
||||
typedef enum __ns_class {
|
||||
ns_c_invalid = 0, /* Cookie. */
|
||||
@@ -51,8 +32,6 @@ typedef enum __ns_class {
|
||||
ns_c_max = 65536
|
||||
} ns_class;
|
||||
|
||||
#define C_IN ns_c_in
|
||||
|
||||
typedef enum __ns_type {
|
||||
ns_t_invalid = 0, /* Cookie. */
|
||||
ns_t_a = 1, /* Host address. */
|
||||
@@ -96,6 +75,8 @@ typedef enum __ns_type {
|
||||
ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
|
||||
ns_t_sink = 40, /* Kitchen sink (experimentatl) */
|
||||
ns_t_opt = 41, /* EDNS0 option (meta-RR) */
|
||||
ns_t_apl = 42, /* Address prefix list (RFC3123) */
|
||||
ns_t_tkey = 249, /* Transaction key */
|
||||
ns_t_tsig = 250, /* Transaction signature. */
|
||||
ns_t_ixfr = 251, /* Incremental zone transfer. */
|
||||
ns_t_axfr = 252, /* Transfer zone of authority. */
|
||||
@@ -106,19 +87,6 @@ typedef enum __ns_type {
|
||||
ns_t_max = 65536
|
||||
} ns_type;
|
||||
|
||||
#define T_PTR ns_t_ptr
|
||||
#define T_A ns_t_a
|
||||
|
||||
|
||||
#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
|
||||
#define NAMESERVER_PORT NS_DEFAULTPORT
|
||||
|
||||
#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
||||
#define HFIXEDSZ NS_HFIXEDSZ
|
||||
|
||||
#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
||||
#define QFIXEDSZ NS_QFIXEDSZ
|
||||
|
||||
typedef enum __ns_opcode {
|
||||
ns_o_query = 0, /* Standard query. */
|
||||
ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
|
||||
@@ -129,25 +97,6 @@ typedef enum __ns_opcode {
|
||||
ns_o_max = 6
|
||||
} ns_opcode;
|
||||
|
||||
#define QUERY ns_o_query
|
||||
|
||||
#define NS_MAXLABEL 63
|
||||
#define MAXLABEL NS_MAXLABEL
|
||||
|
||||
#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
|
||||
#define RRFIXEDSZ NS_RRFIXEDSZ
|
||||
|
||||
#define T_CNAME ns_t_cname
|
||||
|
||||
#define NS_MAXDNAME 256 /* maximum domain name */
|
||||
#define MAXDNAME NS_MAXDNAME
|
||||
|
||||
#define NS_MAXCDNAME 255 /* maximum compressed domain name */
|
||||
#define MAXCDNAME NS_MAXCDNAME
|
||||
|
||||
#define NS_PACKETSZ 512 /* maximum packet size */
|
||||
#define PACKETSZ NS_PACKETSZ
|
||||
|
||||
typedef enum __ns_rcode {
|
||||
ns_r_noerror = 0, /* No error occurred. */
|
||||
ns_r_formerr = 1, /* Format error. */
|
||||
@@ -168,6 +117,22 @@ typedef enum __ns_rcode {
|
||||
ns_r_badtime = 18
|
||||
} ns_rcode;
|
||||
|
||||
#endif /* HAVE_ARPA_NAMESER_H */
|
||||
|
||||
#ifndef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
|
||||
#define PACKETSZ NS_PACKETSZ
|
||||
#define MAXDNAME NS_MAXDNAME
|
||||
#define MAXCDNAME NS_MAXCDNAME
|
||||
#define MAXLABEL NS_MAXLABEL
|
||||
#define HFIXEDSZ NS_HFIXEDSZ
|
||||
#define QFIXEDSZ NS_QFIXEDSZ
|
||||
#define RRFIXEDSZ NS_RRFIXEDSZ
|
||||
#define INDIR_MASK NS_CMPRSFLGS
|
||||
#define NAMESERVER_PORT NS_DEFAULTPORT
|
||||
|
||||
#define QUERY ns_o_query
|
||||
|
||||
#define SERVFAIL ns_r_servfail
|
||||
#define NOTIMP ns_r_notimpl
|
||||
#define REFUSED ns_r_refused
|
||||
@@ -176,6 +141,7 @@ typedef enum __ns_rcode {
|
||||
#define FORMERR ns_r_formerr
|
||||
#define NXDOMAIN ns_r_nxdomain
|
||||
|
||||
#define C_IN ns_c_in
|
||||
#define C_CHAOS ns_c_chaos
|
||||
#define C_HS ns_c_hs
|
||||
#define C_NONE ns_c_none
|
||||
@@ -223,4 +189,6 @@ typedef enum __ns_rcode {
|
||||
#define T_MAILA ns_t_maila
|
||||
#define T_ANY ns_t_any
|
||||
|
||||
#endif /* HAVE_ARPA_NAMESER_COMPAT_H */
|
||||
|
||||
#endif /* ARES_NAMESER_H */
|
||||
|
60
ares/setup.h
60
ares/setup.h
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -39,6 +39,18 @@
|
||||
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/*
|
||||
* Tru64 needs _REENTRANT set for a few function prototypes and
|
||||
* things to appear in the system header files. Unixware needs it
|
||||
* to build proper reentrant code. Others may also need it.
|
||||
*/
|
||||
|
||||
#ifdef NEED_REENTRANT
|
||||
# ifndef _REENTRANT
|
||||
# define _REENTRANT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Include header files for windows builds before redefining anything.
|
||||
* Use this preproessor block only to include or exclude windows.h,
|
||||
@@ -95,6 +107,18 @@
|
||||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__)
|
||||
#define HAVE_SYS_TIME_H
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
|
||||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) && !defined(MSDOS)
|
||||
#define HAVE_SYS_UIO_H
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/*
|
||||
@@ -111,40 +135,6 @@
|
||||
#undef VERSION
|
||||
#undef PACKAGE
|
||||
|
||||
/*
|
||||
* Assume a few thing unless they're set by configure
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__)
|
||||
#define HAVE_SYS_TIME_H
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
|
||||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) && !defined(MSDOS)
|
||||
#define HAVE_SYS_UIO_H
|
||||
#endif
|
||||
|
||||
#if (defined(WIN32) || defined(WATT32)) && \
|
||||
!(defined(__MINGW32__) || defined(NETWARE) || defined(__DJGPP__))
|
||||
/* protos for the functions we provide in windows_port.c */
|
||||
int ares_strncasecmp(const char *s1, const char *s2, int n);
|
||||
int ares_strcasecmp(const char *s1, const char *s2);
|
||||
|
||||
/* use this define magic to prevent us from adding symbol names to the library
|
||||
that is a high-risk to collide with another libraries' attempts to do the
|
||||
same */
|
||||
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
|
||||
#define strcasecmp(a,b) ares_strcasecmp(a,b)
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER >= 1400
|
||||
# define strdup(a) _strdup(a)
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* IPv6 compatibility */
|
||||
#if !defined(HAVE_AF_INET6)
|
||||
#if defined(HAVE_PF_INET6)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -191,6 +191,46 @@ struct timeval {
|
||||
#endif /* HAVE_SEND */
|
||||
|
||||
|
||||
#if 0
|
||||
#if defined(HAVE_RECVFROM)
|
||||
/*
|
||||
* Currently recvfrom is only used on udp sockets.
|
||||
*/
|
||||
#if !defined(RECVFROM_TYPE_ARG1) || \
|
||||
!defined(RECVFROM_TYPE_ARG2) || \
|
||||
!defined(RECVFROM_TYPE_ARG3) || \
|
||||
!defined(RECVFROM_TYPE_ARG4) || \
|
||||
!defined(RECVFROM_TYPE_ARG5) || \
|
||||
!defined(RECVFROM_TYPE_ARG6) || \
|
||||
!defined(RECVFROM_TYPE_RETV)
|
||||
/* */
|
||||
Error Missing_definition_of_return_and_arguments_types_of_recvfrom
|
||||
/* */
|
||||
#else
|
||||
#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \
|
||||
(RECVFROM_TYPE_ARG2 *)(b), \
|
||||
(RECVFROM_TYPE_ARG3) (bl), \
|
||||
(RECVFROM_TYPE_ARG4) (0), \
|
||||
(RECVFROM_TYPE_ARG5 *)(f), \
|
||||
(RECVFROM_TYPE_ARG6 *)(fl))
|
||||
#endif
|
||||
#else /* HAVE_RECVFROM */
|
||||
#ifndef sreadfrom
|
||||
/* */
|
||||
Error Missing_definition_of_macro_sreadfrom
|
||||
/* */
|
||||
#endif
|
||||
#endif /* HAVE_RECVFROM */
|
||||
|
||||
|
||||
#ifdef RECVFROM_TYPE_ARG6_IS_VOID
|
||||
# define RECVFROM_ARG6_T int
|
||||
#else
|
||||
# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
|
||||
#endif
|
||||
#endif /* if 0 */
|
||||
|
||||
|
||||
/*
|
||||
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||
* avoid negative number inputs with argument byte codes > 127.
|
||||
|
@@ -181,6 +181,10 @@ SOURCE=..\..\ares_send.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_strcasecmp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_strerror.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -193,6 +197,10 @@ SOURCE=..\..\ares_version.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_writev.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\bitncmp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -233,10 +241,18 @@ SOURCE=..\..\ares_private.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_strcasecmp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_version.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_writev.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\bitncmp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@@ -5,20 +5,6 @@
|
||||
/* only do the following on windows
|
||||
*/
|
||||
#if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS)
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#ifdef WATT32
|
||||
#include <sys/socket.h>
|
||||
#else
|
||||
#include "nameser.h"
|
||||
#endif
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
/*
|
||||
@@ -34,57 +20,4 @@ WINAPI DllMain (HINSTANCE hnd, DWORD reason, LPVOID reserved)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __MINGW32__
|
||||
int
|
||||
ares_strncasecmp(const char *a, const char *b, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i];
|
||||
int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i];
|
||||
if (c1 != c2) return c1-c2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ares_strcasecmp(const char *a, const char *b)
|
||||
{
|
||||
return strncasecmp(a, b, strlen(a)+1);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
ares_writev (ares_socket_t s, const struct iovec *vector, size_t count)
|
||||
{
|
||||
char *buffer, *bp;
|
||||
size_t i, bytes = 0;
|
||||
|
||||
/* Find the total number of bytes to write
|
||||
*/
|
||||
for (i = 0; i < count; i++)
|
||||
bytes += vector[i].iov_len;
|
||||
|
||||
if (bytes == 0) /* not an error */
|
||||
return (0);
|
||||
|
||||
/* Allocate a temporary buffer to hold the data
|
||||
*/
|
||||
buffer = bp = (char*) alloca (bytes);
|
||||
if (!buffer)
|
||||
{
|
||||
SET_ERRNO(ENOMEM);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Copy the data into buffer.
|
||||
*/
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
memcpy (bp, vector[i].iov_base, vector[i].iov_len);
|
||||
bp += vector[i].iov_len;
|
||||
}
|
||||
return (int)swrite(s, buffer, bytes);
|
||||
}
|
||||
#endif /* WIN32 builds only */
|
||||
|
110
buildconf
110
buildconf
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
@@ -27,22 +27,57 @@ die(){
|
||||
exit
|
||||
}
|
||||
|
||||
# this works as 'which' but we use a different name to make it more obvious we
|
||||
# aren't using 'which'! ;-)
|
||||
#--------------------------------------------------------------------------
|
||||
# findtool works as 'which' but we use a different name to make it more
|
||||
# obvious we aren't using 'which'! ;-)
|
||||
#
|
||||
findtool(){
|
||||
file="$1"
|
||||
|
||||
IFS=":"
|
||||
old_IFS=$IFS; IFS=':'
|
||||
for path in $PATH
|
||||
do
|
||||
IFS=$old_IFS
|
||||
# echo "checks for $file in $path" >&2
|
||||
if test -f "$path/$file"; then
|
||||
echo "$path/$file"
|
||||
return
|
||||
fi
|
||||
done
|
||||
IFS=$old_IFS
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# removethis() removes all files and subdirectories with the given name,
|
||||
# inside and below the current subdirectory at invocation time.
|
||||
#
|
||||
removethis(){
|
||||
if test "$#" = "1"; then
|
||||
find . -depth -name $1 -print > buildconf.tmp.$$
|
||||
while read fdname
|
||||
do
|
||||
if test -f "$fdname"; then
|
||||
rm -f "$fdname"
|
||||
elif test -d "$fdname"; then
|
||||
rm -f -r "$fdname"
|
||||
fi
|
||||
done < buildconf.tmp.$$
|
||||
rm -f buildconf.tmp.$$
|
||||
fi
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Ensure that buildconf runs from the subdirectory where configure.ac lives
|
||||
#
|
||||
if test ! -f configure.ac ||
|
||||
test ! -f src/main.c ||
|
||||
test ! -f lib/urldata.h ||
|
||||
test ! -f include/curl/curl.h; then
|
||||
echo "Can not run buildconf from outside of curl's source subdirectory!"
|
||||
echo "Change to the subdirectory where buildconf is found, and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# autoconf 2.57 or newer
|
||||
#
|
||||
@@ -65,6 +100,18 @@ fi
|
||||
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
|
||||
am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$am4te_version"; then
|
||||
echo "buildconf: autom4te not found. Weird autoconf installation!"
|
||||
exit 1
|
||||
fi
|
||||
if test "$am4te_version" = "$ac_version"; then
|
||||
echo "buildconf: autom4te version $am4te_version (ok)"
|
||||
else
|
||||
echo "buildconf: autom4te version $am4te_version (ERROR: does not match autoconf version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# autoheader 2.50 or newer
|
||||
#
|
||||
@@ -108,12 +155,16 @@ fi
|
||||
|
||||
echo "buildconf: automake version $am_version (ok)"
|
||||
|
||||
ac=`findtool ${ACLOCAL:-aclocal}`
|
||||
if test -z "$ac"; then
|
||||
acloc_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'`
|
||||
if test -z "$acloc_version"; then
|
||||
echo "buildconf: aclocal not found. Weird automake installation!"
|
||||
exit 1
|
||||
fi
|
||||
if test "$acloc_version" = "$am_version"; then
|
||||
echo "buildconf: aclocal version $acloc_version (ok)"
|
||||
else
|
||||
echo "buildconf: aclocal found"
|
||||
echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
@@ -140,7 +191,7 @@ else
|
||||
libtoolize=`findtool $LIBTOOLIZE`
|
||||
fi
|
||||
|
||||
lt_pversion=`$libtool --version 2>/dev/null|head -n 2|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
|
||||
lt_pversion=`$libtool --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
|
||||
if test -z "$lt_pversion"; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
|
||||
@@ -202,14 +253,50 @@ fi
|
||||
#
|
||||
PERL=`findtool ${PERL:-perl}`
|
||||
|
||||
# ------------------------------------------------------------
|
||||
#--------------------------------------------------------------------------
|
||||
# Remove files generated on previous buildconf/configure run.
|
||||
#
|
||||
for fname in .deps \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
aclocal.m4.bak \
|
||||
autom4te.cache \
|
||||
compile \
|
||||
config.guess \
|
||||
config.h \
|
||||
config.h.in \
|
||||
config.log \
|
||||
config.status \
|
||||
config.sub \
|
||||
configure \
|
||||
curl-config \
|
||||
curlbuild.h \
|
||||
depcomp \
|
||||
libcares.pc \
|
||||
libcurl.pc \
|
||||
libtool \
|
||||
libtool.m4 \
|
||||
ltmain.sh \
|
||||
ltoptions.m4 \
|
||||
ltsugar.m4 \
|
||||
ltversion.m4 \
|
||||
lt~obsolete.m4 \
|
||||
stamp-h1 \
|
||||
stamp-h2 \
|
||||
stamp-h3 ; do
|
||||
removethis "$fname"
|
||||
done
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# run the correct scripts now
|
||||
#
|
||||
|
||||
echo "buildconf: running libtoolize"
|
||||
$libtoolize --copy --automake --force || die "The libtoolize command failed"
|
||||
|
||||
echo "buildconf: running aclocal"
|
||||
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed"
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed"
|
||||
|
||||
if test -n "$PERL"; then
|
||||
echo "buildconf: running aclocal hack to convert all mv to mv -f"
|
||||
$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
|
||||
@@ -217,10 +304,13 @@ else
|
||||
echo "buildconf: perl not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "buildconf: running autoheader"
|
||||
${AUTOHEADER:-autoheader} || die "The autoheader command failed"
|
||||
|
||||
echo "buildconf: cp lib/config.h.in src/config.h.in"
|
||||
cp lib/config.h.in src/config.h.in
|
||||
|
||||
echo "buildconf: running autoconf"
|
||||
${AUTOCONF:-autoconf} || die "The autoconf command failed"
|
||||
|
||||
|
@@ -8,3 +8,6 @@ copy src\hugehelp.c.cvs src\hugehelp.c
|
||||
|
||||
REM create Makefile
|
||||
copy Makefile.dist Makefile
|
||||
|
||||
REM create curlbuild.h
|
||||
copy include\curl\curlbuild.h.dist include\curl\curlbuild.h
|
||||
|
844
configure.ac
844
configure.ac
File diff suppressed because it is too large
Load Diff
@@ -80,71 +80,15 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--feature|--features)
|
||||
if test "@USE_SSLEAY@" = "1"; then
|
||||
echo "SSL"
|
||||
NTLM=1 # OpenSSL implies NTLM
|
||||
elif test -n "@SSL_ENABLED@"; then
|
||||
echo "SSL"
|
||||
fi
|
||||
if test "@KRB4_ENABLED@" = "1"; then
|
||||
echo "KRB4"
|
||||
fi
|
||||
if test "@IPV6_ENABLED@" = "1"; then
|
||||
echo "IPv6"
|
||||
fi
|
||||
if test "@HAVE_LIBZ@" = "1"; then
|
||||
echo "libz"
|
||||
fi
|
||||
if test "@HAVE_ARES@" = "1"; then
|
||||
echo "AsynchDNS"
|
||||
fi
|
||||
if test "@IDN_ENABLED@" = "1"; then
|
||||
echo "IDN"
|
||||
fi
|
||||
if test "@USE_WINDOWS_SSPI@" = "1"; then
|
||||
echo "SSPI"
|
||||
NTLM=1
|
||||
fi
|
||||
if test "$NTLM" = "1"; then
|
||||
echo "NTLM"
|
||||
fi
|
||||
for feature in @SUPPORT_FEATURES@ ""; do
|
||||
test -n "$feature" && echo "$feature"
|
||||
done
|
||||
;;
|
||||
|
||||
--protocols)
|
||||
if test "@CURL_DISABLE_HTTP@" != "1"; then
|
||||
echo "HTTP"
|
||||
if test "@SSL_ENABLED@" = "1"; then
|
||||
echo "HTTPS"
|
||||
fi
|
||||
fi
|
||||
if test "@CURL_DISABLE_FTP@" != "1"; then
|
||||
echo "FTP"
|
||||
if test "@SSL_ENABLED@" = "1"; then
|
||||
echo "FTPS"
|
||||
fi
|
||||
fi
|
||||
if test "@CURL_DISABLE_FILE@" != "1"; then
|
||||
echo "FILE"
|
||||
fi
|
||||
if test "@CURL_DISABLE_TELNET@" != "1"; then
|
||||
echo "TELNET"
|
||||
fi
|
||||
if test "@CURL_DISABLE_LDAP@" != "1"; then
|
||||
echo "LDAP"
|
||||
fi
|
||||
if test "@CURL_DISABLE_LDAPS@" != "1"; then
|
||||
echo "LDAPS"
|
||||
fi
|
||||
if test "@CURL_DISABLE_DICT@" != "1"; then
|
||||
echo "DICT"
|
||||
fi
|
||||
if test "@CURL_DISABLE_TFTP@" != "1"; then
|
||||
echo "TFTP"
|
||||
fi
|
||||
if test "@USE_LIBSSH2@" = "1"; then
|
||||
echo "SCP"
|
||||
echo "SFTP"
|
||||
fi
|
||||
for protocol in @SUPPORT_PROTOCOLS@; do
|
||||
echo "$protocol"
|
||||
done
|
||||
;;
|
||||
--version)
|
||||
echo libcurl @VERSION@
|
||||
|
40
diff-exclude
Normal file
40
diff-exclude
Normal file
@@ -0,0 +1,40 @@
|
||||
diff-exclude
|
||||
*~
|
||||
*.orig
|
||||
*.org
|
||||
*.rej
|
||||
configure
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.pid
|
||||
*.bak
|
||||
*.o
|
||||
*.lo
|
||||
*.Plo
|
||||
*.Po
|
||||
config.log
|
||||
config.status
|
||||
autom4te.cache
|
||||
*.patch
|
||||
CVS
|
||||
*.asc
|
||||
config.h
|
||||
*.la
|
||||
*.lai
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
.#*
|
||||
aclocal.m4
|
||||
hugehelp.c
|
||||
.deps
|
||||
.libs
|
||||
libcurl.pc
|
||||
curl-config
|
||||
stamp-h*
|
||||
curl
|
||||
curllib.dsp
|
||||
curllib.vcproj
|
||||
*.spec
|
||||
curl.list
|
@@ -32,7 +32,7 @@ C
|
||||
C++
|
||||
|
||||
Written by Jean-Philippe Barrette-LaPierre
|
||||
http://rrette.com/textpattern/index.php?s=cURLpp
|
||||
http://curlpp.org/
|
||||
|
||||
Ch
|
||||
|
||||
@@ -54,6 +54,10 @@ Dylan
|
||||
Written by Chris Double
|
||||
http://dylanlibs.sourceforge.net/
|
||||
|
||||
Eiffel
|
||||
Written by Eiffel Software
|
||||
http://curl.haxx.se/libcurl/eiffel/
|
||||
|
||||
Euphoria
|
||||
|
||||
Written by Ray Smith
|
||||
@@ -181,6 +185,7 @@ Smalltalk
|
||||
http://www.squeaksource.com/CurlPlugin/
|
||||
|
||||
SP-Forth
|
||||
|
||||
SP-Forth binding by ygrek
|
||||
http://www.forth.org.ru/~ac/lib/lin/curl/
|
||||
|
||||
@@ -199,6 +204,11 @@ Visual Basic
|
||||
libcurl-vb by Jeffrey Phillips
|
||||
http://sourceforge.net/projects/libcurl-vb/
|
||||
|
||||
Visual Foxpro
|
||||
|
||||
by Carlos Alloatti
|
||||
http://www.ctl32.com.ar/libcurl.asp
|
||||
|
||||
Q
|
||||
The libcurl module is part of the default install
|
||||
http://q-lang.sourceforge.net/
|
||||
|
129
docs/FAQ
129
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: Feb 18, 2008 (http://curl.haxx.se/docs/faq.html)
|
||||
Updated: Feb 23, 2009 (http://curl.haxx.se/docs/faq.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -26,7 +26,7 @@ FAQ
|
||||
2.1.2 only the libssl lib is missing
|
||||
2.2 Does curl work/build with other SSL libraries?
|
||||
2.3 Where can I find a copy of LIBEAY32.DLL?
|
||||
2.4 Does curl support Socks (RFC 1928) ?
|
||||
2.4 Does curl support SOCKS (RFC 1928) ?
|
||||
|
||||
3. Usage Problems
|
||||
3.1 curl: (1) SSL is disabled, https: not supported
|
||||
@@ -42,7 +42,7 @@ FAQ
|
||||
3.11 How do I POST with a different Content-Type?
|
||||
3.12 Why do FTP specific features over HTTP proxy fail?
|
||||
3.13 Why does my single/double quotes fail?
|
||||
3.14 Does curl support javascript or pac (automated proxy config)?
|
||||
3.14 Does curl support Javascript or PAC (automated proxy config)?
|
||||
3.15 Can I do recursive fetches with curl?
|
||||
3.16 What certificates do I need when I use SSL?
|
||||
3.17 How do I list the root dir of an FTP server?
|
||||
@@ -70,6 +70,8 @@ FAQ
|
||||
4.13 Why is curl -R on Windows one hour off?
|
||||
4.14 Redirects work in browser but not with curl!
|
||||
4.15 FTPS doesn't work
|
||||
4.16 My HTTP POST or PUT requests are slow!
|
||||
4.17 Non-functional connect timeouts on Windows
|
||||
|
||||
5. libcurl Issues
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -85,6 +87,7 @@ FAQ
|
||||
5.11 How do I make libcurl not receive the whole HTTP response?
|
||||
5.12 Can I make libcurl fake or hide my real IP address?
|
||||
5.13 How do I stop an ongoing transfer?
|
||||
5.14 Using C++ non-static functions for callbacks?
|
||||
|
||||
6. License Issues
|
||||
6.1 I have a GPL program, can I use the libcurl library?
|
||||
@@ -93,7 +96,7 @@ FAQ
|
||||
6.4 I have a program that uses LGPL libraries, can I use libcurl?
|
||||
6.5 Can I modify curl/libcurl for my program and keep the changes secret?
|
||||
6.6 Can you please change the curl/libcurl license to XXXX?
|
||||
6.7 What are my obligations when using libcurl in my commerical apps?
|
||||
6.7 What are my obligations when using libcurl in my commercial apps?
|
||||
|
||||
7. PHP/CURL Issues
|
||||
7.1 What is PHP/CURL?
|
||||
@@ -117,10 +120,10 @@ FAQ
|
||||
libcurl
|
||||
|
||||
A free and easy-to-use client-side URL transfer library, supporting FTP,
|
||||
FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE and LDAP. libcurl
|
||||
supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos,
|
||||
HTTP form based upload, proxies, cookies, user+password authentication,
|
||||
file transfer resume, http proxy tunneling and more!
|
||||
FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE, LDAP and LDAPS.
|
||||
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
|
||||
kerberos, HTTP form based upload, proxies, cookies, user+password
|
||||
authentication, file transfer resume, http proxy tunneling and more!
|
||||
|
||||
libcurl is highly portable, it builds and works identically on numerous
|
||||
platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX,
|
||||
@@ -135,8 +138,8 @@ FAQ
|
||||
A command line tool for getting or sending files using URL syntax.
|
||||
|
||||
Since curl uses libcurl, it supports a range of common Internet protocols,
|
||||
currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, DICT,
|
||||
TELNET and FILE.
|
||||
currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS,
|
||||
DICT, TELNET and FILE.
|
||||
|
||||
We pronounce curl and cURL with an initial k sound: [kurl].
|
||||
|
||||
@@ -225,11 +228,11 @@ FAQ
|
||||
Project cURL is entirely free and open. No person gets paid for developing
|
||||
(lib)curl. We do this voluntarily on our spare time.
|
||||
|
||||
We get some help from companies. Contactor Data hosts the curl web site,
|
||||
Haxx owns the curl web site's domain and sourceforge.net hosts project
|
||||
services we take advantage from, like the bug tracker. Also, some companies
|
||||
have sponsored certain parts of the development in the past and I hope some
|
||||
will continue to do so in the future.
|
||||
We get some help from companies. CAG Contactor hosts the curl web site, Haxx
|
||||
owns the curl web site's domain and sourceforge.net hosts project services
|
||||
we take advantage from, like the bug tracker. Also, some companies have
|
||||
sponsored certain parts of the development in the past and I hope some will
|
||||
continue to do so in the future.
|
||||
|
||||
If you want to support our project, consider a donation or a banner-program
|
||||
or even better: by helping us coding, documenting, testing etc.
|
||||
@@ -297,7 +300,7 @@ FAQ
|
||||
as used by numerous applications that include libcurl binaries in their
|
||||
distribution packages (like Adobe Acrobat Reader and Google Earth).
|
||||
|
||||
More than 80 known named companies use curl in commercial environments and
|
||||
More than 90 known named companies use curl in commercial environments and
|
||||
products. More than 100 known named open source projects depend on
|
||||
(lib)curl.
|
||||
|
||||
@@ -397,7 +400,7 @@ FAQ
|
||||
accurate and up-to-date pointers to recent OpenSSL DLLs and other binary
|
||||
packages.
|
||||
|
||||
2.4 Does curl support Socks (RFC 1928) ?
|
||||
2.4 Does curl support SOCKS (RFC 1928) ?
|
||||
|
||||
Yes, SOCKS 4 and 5 are supported.
|
||||
|
||||
@@ -555,27 +558,27 @@ FAQ
|
||||
Remember that curl works and runs on more operating systems than most single
|
||||
individuals have ever tried.
|
||||
|
||||
3.14 Does curl support javascript or pac (automated proxy config)?
|
||||
3.14 Does curl support Javascript or PAC (automated proxy config)?
|
||||
|
||||
Many web pages do magic stuff using embedded javascript. Curl and libcurl
|
||||
Many web pages do magic stuff using embedded Javascript. Curl and libcurl
|
||||
have no built-in support for that, so it will be treated just like any other
|
||||
contents.
|
||||
|
||||
.pac files are a netscape invention and are sometimes used by organizations
|
||||
to allow them to differentiate which proxies to use. The .pac contents is
|
||||
just a javascript program that gets invoked by the browser and that returns
|
||||
the name of the proxy to connect to. Since curl doesn't support javascript,
|
||||
just a Javascript program that gets invoked by the browser and that returns
|
||||
the name of the proxy to connect to. Since curl doesn't support Javascript,
|
||||
it can't support .pac proxy configuration either.
|
||||
|
||||
Some work-arounds usually suggested to overcome this javascript dependency:
|
||||
Some work-arounds usually suggested to overcome this Javascript dependency:
|
||||
|
||||
- Depending on the javascript complexity, write up a script that
|
||||
- Depending on the Javascript complexity, write up a script that
|
||||
translates it to another language and execute that.
|
||||
|
||||
- Read the javascript code and rewrite the same logic in another language.
|
||||
- Read the Javascript code and rewrite the same logic in another language.
|
||||
|
||||
- Implement a javascript interpreter, people have successfully used the
|
||||
Mozilla javascript engine in the past.
|
||||
- Implement a Javascript interpreter, people have successfully used the
|
||||
Mozilla Javascript engine in the past.
|
||||
|
||||
- Ask your admins to stop this, for a static proxy setup or similar.
|
||||
|
||||
@@ -656,21 +659,22 @@ FAQ
|
||||
|
||||
4.2 Why do I get problems when I use & or % in the URL?
|
||||
|
||||
In general unix shells, the & letter is treated special and when used, it
|
||||
In general unix shells, the & symbol is treated specially and when used, it
|
||||
runs the specified command in the background. To safely send the & as a part
|
||||
of a URL, you should quote the entire URL by using single (') or double (")
|
||||
quotes around it.
|
||||
quotes around it. Similar problems can also occur on some shells with other
|
||||
characters, including ?*!$~(){}<>\|;`. When in doubt, quote the URL.
|
||||
|
||||
An example that would invoke a remote CGI that uses &-letters could be:
|
||||
An example that would invoke a remote CGI that uses &-symbols could be:
|
||||
|
||||
curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
|
||||
|
||||
In Windows, the standard DOS shell treats the %-letter specially and you
|
||||
need to use TWO %-letters for each single one you want to use in the URL.
|
||||
In Windows, the standard DOS shell treats the %-symbol specially and you
|
||||
need to use TWO %-symbols for each single one you want to use in the URL.
|
||||
|
||||
Also note that if you want the literal %-letter to be part of the data you
|
||||
Also note that if you want the literal %-symbol to be part of the data you
|
||||
pass in a POST using -d/--data you must encode it as '%25' (which then also
|
||||
needs the %-letter doubled on Windows machines).
|
||||
needs the %-symbol doubled on Windows machines).
|
||||
|
||||
4.3 How can I use {, }, [ or ] to specify multiple URLs?
|
||||
|
||||
@@ -785,7 +789,7 @@ FAQ
|
||||
|
||||
This is supported in curl 7.10.6 or later. No earlier curl version knows
|
||||
of this magic. Later versions require the OpenSSL or Microsoft Windows
|
||||
libraries to provide this functionality. Using GnuTLS or NSS libraries will
|
||||
libraries to provide this functionality. Using the NSS library will
|
||||
not provide NTLM authentication functionality in curl.
|
||||
|
||||
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
|
||||
@@ -846,7 +850,7 @@ FAQ
|
||||
- Meta tags. You can write a HTML tag that will cause the browser to
|
||||
redirect to another given URL after a certain time.
|
||||
|
||||
- Javascript. You can write a javascript program embeded in a HTML page
|
||||
- Javascript. You can write a Javascript program embedded in a HTML page
|
||||
that redirects the browser to another given URL.
|
||||
|
||||
There is no way to make curl follow these redirects. You must either
|
||||
@@ -867,6 +871,37 @@ FAQ
|
||||
mandated by RFC4217. This kind of connection then of course uses the
|
||||
standard FTP port 21 by default.
|
||||
|
||||
4.16 My HTTP POST or PUT requests are slow!
|
||||
|
||||
libcurl makes all POST and PUT requests (except for POST requests with a
|
||||
very tiny request body) use the "Expect: 100-continue" header. This header
|
||||
allows the server to deny the operation early so that libcurl can bail out
|
||||
already before having to send any data. This is useful in authentication
|
||||
cases and others.
|
||||
|
||||
However, many servers don't implement the Expect: stuff properly and if the
|
||||
server doesn't respond (positively) within 1 second libcurl will continue
|
||||
and send off the data anyway.
|
||||
|
||||
You can disable libcurl's use of the Expect: header the same way you disable
|
||||
any header, using -H / CURLOPT_HTTPHEADER, or by forcing it to use HTTP 1.0.
|
||||
|
||||
4.17 Non-functional connect timeouts
|
||||
|
||||
In most Windows setups having a timeout longer than 21 seconds make no
|
||||
difference, as it will only send 3 TCP SYN packets and no more. The second
|
||||
packet sent three seconds after the first and the third six seconds after
|
||||
the second. No more than three packets are sent, no matter how long the
|
||||
timeout is set.
|
||||
|
||||
See option TcpMaxConnectRetransmissions on this page:
|
||||
http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
|
||||
|
||||
Also, even on non-Windows systems there may run a firewall or anti-virus
|
||||
software or similar that accepts the connection but does not actually do
|
||||
anything else. This will make (lib)curl to consider the connection connected
|
||||
and thus the connect timeout won't trigger.
|
||||
|
||||
|
||||
5. libcurl Issues
|
||||
|
||||
@@ -881,7 +916,7 @@ FAQ
|
||||
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
|
||||
need to provide one or two locking functions:
|
||||
|
||||
http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION
|
||||
http://www.openssl.org/docs/crypto/threads.html
|
||||
|
||||
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
|
||||
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
|
||||
@@ -1070,6 +1105,24 @@ FAQ
|
||||
If you're using the multi interface, you also stop a transfer by removing
|
||||
the particular easy handle from the multi stack.
|
||||
|
||||
5.14 Using C++ non-static functions for callbacks?
|
||||
|
||||
libcurl is a C library, it doesn't know anything about C++ member functions.
|
||||
|
||||
You can overcome this "limitation" with a relative ease using a static
|
||||
member function that is passed a pointer to the class:
|
||||
|
||||
// f is the pointer to your object.
|
||||
static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f)
|
||||
{
|
||||
// Call non-static member function.
|
||||
static_cast<YourClass*>(f)->nonStaticFunction();
|
||||
}
|
||||
|
||||
// This is how you pass pointer to the static function:
|
||||
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
|
||||
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
||||
|
||||
6. License Issues
|
||||
|
||||
Curl and libcurl are released under a MIT/X derivate license. The license is
|
||||
@@ -1124,7 +1177,7 @@ FAQ
|
||||
libraries that use it. It should be possible for everyone to use libcurl or
|
||||
curl in their projects, no matter what license they already have in use.
|
||||
|
||||
6.7 What are my obligations when using libcurl in my commerical apps?
|
||||
6.7 What are my obligations when using libcurl in my commercial apps?
|
||||
|
||||
Next to none. All you need to adhere to is the MIT-style license (stated in
|
||||
the COPYING file) which basically says you have to include the copyright
|
||||
@@ -1140,7 +1193,7 @@ FAQ
|
||||
your app.
|
||||
|
||||
As can be seen here: http://curl.haxx.se/docs/companies.html and
|
||||
elsewhere, more and more companies are dicovering the power
|
||||
elsewhere, more and more companies are discovering the power
|
||||
of libcurl and take advantage of it even in commercial environments.
|
||||
|
||||
|
||||
|
45
docs/HISTORY
45
docs/HISTORY
@@ -77,7 +77,7 @@ different bindings exist at the time of this writing.
|
||||
September 2000, kerberos4 support was added.
|
||||
|
||||
In November 2000 started the work on a test suite for curl. It was later
|
||||
re-written from scratch again.
|
||||
re-written from scratch again. The libcurl major SONAME number was set to 1.
|
||||
|
||||
January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or
|
||||
MPL). The MIT license is extremely liberal and can be used combined with GPL
|
||||
@@ -88,7 +88,7 @@ deemed "GPL incompatible".)
|
||||
|
||||
curl supports HTTP 1.1 starting with the release of 7.7, March 22 2001. This
|
||||
also introduced libcurl's ability to do persistent connections. 24000 lines of
|
||||
code.
|
||||
code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
|
||||
|
||||
The first experimental ftps:// support was added in March 2001.
|
||||
|
||||
@@ -129,7 +129,12 @@ December 2003, full-fledged SSL for FTP is supported.
|
||||
|
||||
January 2004: curl 7.11.0 introduced large file support.
|
||||
|
||||
June 2004: curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||
June 2004:
|
||||
|
||||
curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||
|
||||
This release bumped the major SONAME to 3 due to the removal of the
|
||||
curl_formparse() function
|
||||
|
||||
August 2004:
|
||||
Curl and libcurl 7.12.1
|
||||
@@ -144,10 +149,38 @@ August 2004:
|
||||
|
||||
April 2005:
|
||||
|
||||
GnuTLS can now optionally be used for the secure layer when curl is built.
|
||||
GnuTLS can now optionally be used for the secure layer when curl is built.
|
||||
|
||||
September 2005:
|
||||
|
||||
TFTP support was added.
|
||||
TFTP support was added.
|
||||
|
||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||
|
||||
April 2006:
|
||||
|
||||
Added the multi_socket() API
|
||||
|
||||
September 2006:
|
||||
|
||||
The major SONAME number for libcurl was bumped to 4 due to the removal of
|
||||
ftp third party transfer support.
|
||||
|
||||
November 2006:
|
||||
|
||||
Added SCP and SFTP support
|
||||
|
||||
February 2007:
|
||||
|
||||
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||
|
||||
November 2008:
|
||||
|
||||
Command line options: 128
|
||||
curl_easy_setopt() options: 158
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 37
|
||||
Contributors: 683
|
||||
|
||||
145,000 unique visitors. >100 GB downloaded.
|
||||
|
||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||
|
147
docs/INSTALL
147
docs/INSTALL
@@ -53,8 +53,12 @@ UNIX
|
||||
|
||||
./configure --with-ssl
|
||||
|
||||
If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
|
||||
you can run configure like this:
|
||||
If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL)
|
||||
and you have pkg-config installed, set the pkg-config path first, like this:
|
||||
|
||||
env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl
|
||||
|
||||
Without pkg-config installed, use this:
|
||||
|
||||
./configure --with-ssl=/opt/OpenSSL
|
||||
|
||||
@@ -70,22 +74,23 @@ UNIX
|
||||
|
||||
(with the Bourne shell and its clones):
|
||||
|
||||
CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
./configure
|
||||
|
||||
(with csh, tcsh and their clones):
|
||||
|
||||
env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
./configure
|
||||
env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
./configure
|
||||
|
||||
If you have shared SSL libs installed in a directory where your run-time
|
||||
linker doesn't find them (which usually causes configure failures), you can
|
||||
provide the -R option to ld on some operating systems to set a hard-coded
|
||||
path to the run-time linker:
|
||||
|
||||
LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
|
||||
env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
|
||||
|
||||
MORE OPTIONS
|
||||
------------
|
||||
|
||||
To force configure to use the standard cc compiler if both cc and gcc are
|
||||
present, run configure like
|
||||
@@ -127,7 +132,7 @@ UNIX
|
||||
To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
|
||||
you need to use both --without-ssl and --with-gnutls.
|
||||
|
||||
To build with yassl support instead of OpenSSL or GunTLS, you must build
|
||||
To build with yassl support instead of OpenSSL or GnuTLS, you must build
|
||||
yassl with its OpenSSL emulation enabled and point to that directory root
|
||||
with configure --with-ssl.
|
||||
|
||||
@@ -140,6 +145,16 @@ UNIX
|
||||
To get support for SCP and SFTP, build with --with-libssh2 and have
|
||||
libssh2 0.16 or later installed.
|
||||
|
||||
SPECIAL CASES
|
||||
-------------
|
||||
Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
|
||||
to get correct large file support.
|
||||
|
||||
The Open Watcom C compiler on Linux requires configuring with the variables:
|
||||
|
||||
./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
|
||||
RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
|
||||
|
||||
|
||||
Win32
|
||||
=====
|
||||
@@ -272,6 +287,37 @@ Win32
|
||||
at runtime.
|
||||
Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
|
||||
|
||||
MSVC 6 IDE
|
||||
----------
|
||||
|
||||
A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the
|
||||
source distribution archive to allow proper building of the two included
|
||||
projects, the libcurl library and the curl tool.
|
||||
|
||||
1) Open the vc6curl.dsw workspace with MSVC6's IDE.
|
||||
2) Select 'Build' from top menu.
|
||||
3) Select 'Batch Build' from dropdown menu.
|
||||
4) Make sure that the eight project configurations are 'checked'.
|
||||
5) Click on the 'Build' button.
|
||||
6) Once the eight project configurations are built you are done.
|
||||
|
||||
Dynamic and static libcurl libraries are built in debug and release flavours,
|
||||
and can be located each one in its own subdirectory, DLL-Debug, DLL-Release,
|
||||
LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory.
|
||||
|
||||
In the same way four curl executables are created, each using its respective
|
||||
library. The resulting curl executables are located in its own subdirectory,
|
||||
DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir.
|
||||
|
||||
These reference VC++ 6.0 configurations are generated using the dynamic CRT.
|
||||
|
||||
Intentionally, these reference VC++ 6.0 projects and configurations don't use
|
||||
third party libraries, such as OpenSSL or Zlib, to allow proper compilation
|
||||
and configuration for all new users without further requirements.
|
||||
|
||||
If you need something more 'involved' you might adjust them for your own use,
|
||||
or explore the world of makefiles described above 'MSVC from command line'.
|
||||
|
||||
Borland C++ compiler
|
||||
---------------------
|
||||
|
||||
@@ -300,9 +346,8 @@ Win32
|
||||
-L c:\openssl\out32\ssleay32.lib
|
||||
simplessl.c
|
||||
|
||||
|
||||
MSVC IDE
|
||||
--------
|
||||
OTHER MSVC IDEs
|
||||
---------------
|
||||
|
||||
If you use VC++, Borland or similar compilers. Include all lib source
|
||||
files in a static lib "project" (all .c and .h files that is).
|
||||
@@ -311,9 +356,6 @@ Win32
|
||||
Make the sources in the src/ drawer be a "win32 console application"
|
||||
project. Name it curl.
|
||||
|
||||
For VC++ 6, there's an included Makefile.vc6 that should be possible
|
||||
to use out-of-the-box.
|
||||
|
||||
|
||||
Disabling Specific Protocols in Win32 builds
|
||||
--------------------------------------------
|
||||
@@ -332,14 +374,16 @@ Win32
|
||||
CURL_DISABLE_DICT disables DICT
|
||||
CURL_DISABLE_FILE disables FILE
|
||||
CURL_DISABLE_TFTP disables TFTP
|
||||
CURL_DISABLE_HTTP disables HTTP
|
||||
|
||||
If you want to set any of these defines you have the following
|
||||
possibilities:
|
||||
|
||||
- Modify lib/config-win32.h
|
||||
- Modify lib/setup.h
|
||||
- Modify lib/Makefile.vc6
|
||||
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
|
||||
in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project.
|
||||
in the libcurl.dsw/libcurl.dsp Visual C++ 6 IDE project.
|
||||
|
||||
|
||||
Important static libcurl usage note
|
||||
@@ -618,41 +662,32 @@ eCos
|
||||
Minix
|
||||
=====
|
||||
curl can be compiled on Minix 3 using gcc or ACK (starting with
|
||||
ver. 3.1.3). The default heap size allocated to several required
|
||||
programs is inadequate for configuring and compiling curl and will
|
||||
result in strange errors unless fixed (which only needs to be done
|
||||
once).
|
||||
ver. 3.1.3).
|
||||
|
||||
ACK
|
||||
---
|
||||
Increase heap sizes with the commands:
|
||||
Increase the heap sizes of the compiler with the command:
|
||||
|
||||
chmem =1024000 /usr/lib/em_cemcom.ansi
|
||||
chmem =512000 /usr/lib/i386/as
|
||||
|
||||
If you have bash installed:
|
||||
|
||||
chmem =2048000 /usr/local/bin/bash
|
||||
binsizes xxl
|
||||
|
||||
Configure and compile with:
|
||||
|
||||
./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
|
||||
./configure CONFIG_SHELL=/bin/bigsh CC=cc LD=cc AR=/usr/bin/aal \
|
||||
GREP=grep CPPFLAGS='-D_POSIX_SOURCE=1 -I/usr/local/include'
|
||||
make
|
||||
chmem =256000 src/curl
|
||||
|
||||
GCC
|
||||
---
|
||||
If you have bash installed:
|
||||
|
||||
chmem =2048000 /usr/local/bin/bash
|
||||
|
||||
Make sure gcc is in your PATH with the command:
|
||||
|
||||
export PATH=/usr/gnu/bin:$PATH
|
||||
|
||||
then configure and compile curl with:
|
||||
|
||||
./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar
|
||||
./configure CONFIG_SHELL=/bin/bigsh CC=gcc AR=/usr/gnu/bin/gar GREP=grep
|
||||
make
|
||||
chmem =256000 src/curl
|
||||
|
||||
|
||||
Symbian OS
|
||||
@@ -673,7 +708,7 @@ CROSS COMPILE
|
||||
(This section was graciously brought to us by Jim Duey, with additions by
|
||||
Dan Fandrich)
|
||||
|
||||
Download and unpack the cURL package. Version should be 7.9.1 or later.
|
||||
Download and unpack the cURL package.
|
||||
|
||||
'cd' to the new directory. (e.g. cd curl-7.12.3)
|
||||
|
||||
@@ -723,12 +758,12 @@ REDUCING SIZE
|
||||
important factor. First, be sure to set the CFLAGS variable when
|
||||
configuring with any relevant compiler optimization flags to reduce the
|
||||
size of the binary. For gcc, this would mean at minimum the -Os option,
|
||||
potentially the -march=X and -mdynamic-no-pic options as well, e.g.:
|
||||
and potentially the -march=X and -mdynamic-no-pic options as well, e.g.
|
||||
|
||||
./configure CFLAGS='-Os' ...
|
||||
|
||||
Note that newer compilers often produce smaller code than older versions
|
||||
due to better optimization.
|
||||
due to improved optimization.
|
||||
|
||||
Be sure to specify as many --disable- and --without- flags on the configure
|
||||
command-line as you can to disable all the libcurl features that you
|
||||
@@ -737,31 +772,49 @@ REDUCING SIZE
|
||||
will not use, here are some other flags that can reduce the size of the
|
||||
library:
|
||||
|
||||
--disable-ares (disables support for the ARES DNS library)
|
||||
--disable-ares (disables support for the C-ARES DNS library)
|
||||
--disable-cookies (disables support for HTTP cookies)
|
||||
--disable-crypto-auth (disables HTTP cryptographic authentication)
|
||||
--disable-ipv6 (disables support for IPv6)
|
||||
--disable-manual (disables support for the built-in documentation)
|
||||
--disable-proxy (disables support for HTTP and SOCKS proxies)
|
||||
--disable-verbose (eliminates debugging strings and error code strings)
|
||||
--enable-hidden-symbols (eliminates unneeded symbols in the shared library)
|
||||
--without-libidn (disables support for the libidn DNS library)
|
||||
--without-ssl (disables support for SSL/TLS)
|
||||
--without-zlib (disables support for on-the-fly decompression)
|
||||
|
||||
The GNU linker has a number of options to reduce the size of the libcurl
|
||||
dynamic libraries on some platforms even further. Specify them by giving
|
||||
the options -Wl,-Bsymbolic and -Wl,-s on the gcc command-line.
|
||||
The GNU compiler and linker have a number of options that can reduce the
|
||||
size of the libcurl dynamic libraries on some platforms even further.
|
||||
Specify them by providing appropriate CFLAGS and LDFLAGS variables on the
|
||||
configure command-line:
|
||||
CFLAGS="-ffunction-sections -fdata-sections" \
|
||||
LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
|
||||
|
||||
Be sure also to strip debugging symbols from your binaries after
|
||||
compiling using 'strip' (or the appropriate variant if cross-compiling).
|
||||
If space is really tight, you may be able to remove some unneeded
|
||||
sections of the shared library using the -R option to objcopy (e.g. the
|
||||
.comment section).
|
||||
|
||||
Using these techniques it is possible to create an HTTP-only shared libcurl
|
||||
library for i386 Linux platforms that is only 96 KiB in size (as of libcurl
|
||||
version 7.17.1, using gcc 4.2.2).
|
||||
Using these techniques it is possible to create a basic HTTP-only shared
|
||||
libcurl library for i386 Linux platforms that is only 94 KiB in size, and
|
||||
an FTP-only library that is 87 KiB in size (as of libcurl version 7.19.1,
|
||||
using gcc 4.2.2).
|
||||
|
||||
You may find that statically linking libcurl to your application will
|
||||
result in a lower total size.
|
||||
result in a lower total size than dynamically linking.
|
||||
|
||||
Note that the curl test harness can detect the use of some, but not all, of
|
||||
the --disable statements suggested above. Use will cause tests relying on
|
||||
those features to fail. The test harness can be manually forced to skip
|
||||
the relevant tests by specifying certain key words on the runtests.pl
|
||||
command line. Following is a list of appropriate key words:
|
||||
|
||||
--disable-cookies !cookies
|
||||
--disable-crypto-auth !HTTP\ Digest\ auth !HTTP\ proxy\ Digest\ auth
|
||||
--disable-manual !--manual
|
||||
--disable-proxy !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5
|
||||
|
||||
|
||||
PORTS
|
||||
@@ -778,15 +831,22 @@ PORTS
|
||||
- Alpha OpenBSD 3.0
|
||||
- Alpha OpenVMS V7.1-1H2
|
||||
- Alpha Tru64 v5.0 5.1
|
||||
- AVR32 Linux
|
||||
- ARM INTEGRITY
|
||||
- ARM iPhone OS
|
||||
- Cell Linux
|
||||
- Cell Cell OS
|
||||
- HP-PA HP-UX 9.X 10.X 11.X
|
||||
- HP-PA Linux
|
||||
- HP3000 MPE/iX
|
||||
- MicroBlaze uClinux
|
||||
- MIPS IRIX 6.2, 6.5
|
||||
- MIPS Linux
|
||||
- OS/400
|
||||
- Pocket PC/Win CE 3.0
|
||||
- Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
|
||||
- PowerPC Darwin 1.0
|
||||
- PowerPC INTEGRITY
|
||||
- PowerPC Linux
|
||||
- PowerPC Mac OS 9
|
||||
- PowerPC Mac OS X
|
||||
@@ -799,7 +859,7 @@ PORTS
|
||||
- StrongARM (and other ARM) RISC OS 3.1, 4.02
|
||||
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6
|
||||
- StrongARM NetBSD 1.4.1
|
||||
- Symbian OS (P.I.P.S.)
|
||||
- Symbian OS (P.I.P.S.) 9.x
|
||||
- TPF
|
||||
- Ultrix 4.3a
|
||||
- UNICOS 9.0
|
||||
@@ -828,6 +888,7 @@ PORTS
|
||||
- m68k OpenBSD
|
||||
- m88k dg-dgux5.4R3.00
|
||||
- s390 Linux
|
||||
- x86_64 Linux
|
||||
- XScale/PXA250 Linux 2.4
|
||||
- Nios II uClinux
|
||||
|
||||
|
@@ -22,6 +22,56 @@ CVS
|
||||
Tagging shall be used extensively, and by the time we release new archives we
|
||||
should tag the sources with a name similar to the released version number.
|
||||
|
||||
Portability
|
||||
===========
|
||||
|
||||
We write curl and libcurl to compile with C89 compilers. On 32bit and up
|
||||
machines. Most of libcurl assumes more or less POSIX compliance but that's
|
||||
not a requirement.
|
||||
|
||||
We write libcurl to build and work with lots of third party tools, and we
|
||||
want it to remain functional and buildable with these and later versions
|
||||
(older versions may still work but is not what we work hard to maintain):
|
||||
|
||||
OpenSSL 0.9.6
|
||||
GnuTLS 1.2
|
||||
zlib 1.1.4
|
||||
libssh2 0.16
|
||||
c-ares 1.5.0
|
||||
libidn 0.4.1
|
||||
*yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
|
||||
openldap 2.0
|
||||
MIT krb5 lib 1.2.4
|
||||
qsossl V5R2M0
|
||||
NSS 3.11.x
|
||||
Heimdal ?
|
||||
|
||||
* = only partly functional, but that's due to bugs in the third party lib, not
|
||||
because of libcurl code
|
||||
|
||||
On systems where configure runs, we aim at working on them all - if they have
|
||||
a suitable C compiler. On systems that don't run configure, we strive to keep
|
||||
curl running fine on:
|
||||
|
||||
Windows 98
|
||||
AS/400 V5R2M0
|
||||
Symbian 9.1
|
||||
Windows CE ?
|
||||
TPF ?
|
||||
|
||||
When writing code (mostly for generating stuff included in release tarballs)
|
||||
we use a few "build tools" and we make sure that we remain functional with
|
||||
these versions:
|
||||
|
||||
GNU Libtool 1.4.2
|
||||
GNU Autoconf 2.57
|
||||
GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
|
||||
GNU M4 1.4
|
||||
perl 4
|
||||
roffit 0.5
|
||||
groff ? (any version that supports "groff -Tps -man [in] [out]")
|
||||
ps2pdf (gs) ?
|
||||
|
||||
Windows vs Unix
|
||||
===============
|
||||
|
||||
|
@@ -3,19 +3,45 @@ join in and help us correct one or more of these! Also be sure to check the
|
||||
changelog of the current development status, as one or more of these problems
|
||||
may have been fixed since this was written!
|
||||
|
||||
62. CURLOPT_TIMEOUT does not work properly with the regular multi and
|
||||
multi_socket interfaces. The work-around for apps is to simply remove the
|
||||
easy handle once the time is up. See also:
|
||||
http://curl.haxx.se/bug/view.cgi?id=2501457
|
||||
|
||||
61. If an upload using Expect: 100-continue receives an HTTP 417 response,
|
||||
it ought to be automatically resent without the Expect:. A workaround is
|
||||
for the client application to redo the transfer after disabling Expect:.
|
||||
http://curl.haxx.se/mail/archive-2008-02/0043.html
|
||||
|
||||
60. libcurl closes the connection if an HTTP 401 reply is received while it
|
||||
is waiting for the the 100-continue response.
|
||||
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
||||
|
||||
59. If the CURLOPT_PORT option is used on an FTP URL like
|
||||
"ftp://example.com/file;type=A" the ";type=A" is stripped off.
|
||||
|
||||
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
||||
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
||||
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
||||
|
||||
57. On VMS-Alpha: When using an http-file-upload the file is not sent to the
|
||||
Server with the correct content-length. Sending a file with 511 or less
|
||||
bytes, content-length 512 is used. Sending a file with 513 - 1023 bytes,
|
||||
content-length 1024 is used. Files with a length of a multiple of 512 Bytes
|
||||
show the correct content-length. Only these files work for upload.
|
||||
http://curl.haxx.se/bug/view.cgi?id=2057858
|
||||
|
||||
56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
|
||||
server using the multi interface, the commands are not being sent correctly
|
||||
and instead the connection is "cancelled" (the operation is considered done)
|
||||
prematurely. There is a half-baked (busy-looping) patch provided in the bug
|
||||
report but it cannot be accepted as-is. See
|
||||
http://curl.haxx.se/bug/view.cgi?id=2006544
|
||||
|
||||
55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
|
||||
library header files exporting symbols/macros that should be kept private
|
||||
to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/
|
||||
|
||||
54. User names embedded in URLs without a password are parsed incorrectly--the
|
||||
host name is treated as part of the user name and the port number becomes the
|
||||
password. This can be observed test 279.
|
||||
|
||||
53. SFTP busy-loop problem. When doing SFTP uploads, we can see that libcurl
|
||||
occasionally will busy-loop while waiting for certain network conditions.
|
||||
Reported by Pavel Shalagin, explained somewhat by Daniel Stenberg here:
|
||||
http://curl.haxx.se/mail/lib-2008-04/0439.html
|
||||
|
||||
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
||||
where a connection can be re-used without actually being properly
|
||||
SSL-negoatiated:
|
||||
@@ -33,13 +59,6 @@ may have been fixed since this was written!
|
||||
function will return prematurely and will confuse the rest of the HTTP
|
||||
protocol code. This should be very rare.
|
||||
|
||||
45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
|
||||
getaddrinfo() sorts the response list which effectively kills how libcurl
|
||||
deals with round-robin DNS entries. All details:
|
||||
http://curl.haxx.se/mail/lib-2007-07/0168.html
|
||||
initial suggested function to use for randomizing the response:
|
||||
http://curl.haxx.se/mail/lib-2007-07/0178.html
|
||||
|
||||
43. There seems to be a problem when connecting to the Microsoft telnet server.
|
||||
http://curl.haxx.se/bug/view.cgi?id=1720605
|
||||
|
||||
@@ -146,11 +165,6 @@ may have been fixed since this was written!
|
||||
doesn't do a HEAD first to get the initial size. This needs to be done
|
||||
manually for HTTP PUT resume to work, and then '-C [index]'.
|
||||
|
||||
7. CURLOPT_USERPWD and CURLOPT_PROXYUSERPWD have no way of providing user names
|
||||
that contain a colon. This can't be fixed easily in a backwards compatible
|
||||
way without adding new options (and then, they should most probably allow
|
||||
setting user name and password separately).
|
||||
|
||||
6. libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that
|
||||
such parts should be sent to the server as 'CWD ' (without an argument).
|
||||
The only exception to this rule, is that we knowingly break this if the
|
||||
|
70
docs/MANUAL
70
docs/MANUAL
@@ -48,6 +48,9 @@ SIMPLE USAGE
|
||||
curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
|
||||
scp://shell.example.com/~/personal.txt
|
||||
|
||||
Get the main page from an IPv6 web server:
|
||||
|
||||
curl -g "http://[2001:1890:1112:1::20]/"
|
||||
|
||||
DOWNLOAD TO A FILE
|
||||
|
||||
@@ -86,6 +89,13 @@ USING PASSWORDS
|
||||
standards while the recommended "explicit" way is done by using FTP:// and
|
||||
the --ftp-ssl option.
|
||||
|
||||
SFTP / SCP
|
||||
|
||||
This is similar to FTP, but you can specify a private key to use instead of
|
||||
a password. Note that the private key may itself be protected by a password
|
||||
that is unrelated to the login password of the remote system. If you
|
||||
provide a private key file you must also provide a public key file.
|
||||
|
||||
HTTP
|
||||
|
||||
Curl also supports user and password in HTTP URLs, thus you can pick a file
|
||||
@@ -126,6 +136,14 @@ PROXY
|
||||
|
||||
curl -U user:passwd -x my-proxy:888 http://www.get.this/
|
||||
|
||||
A comma-separated list of hosts and domains which do not use the proxy can
|
||||
be specified as:
|
||||
|
||||
curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
|
||||
|
||||
If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
|
||||
curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
|
||||
|
||||
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
||||
|
||||
See also the environment variables Curl support that offer further proxy
|
||||
@@ -154,9 +172,9 @@ RANGES
|
||||
|
||||
UPLOADING
|
||||
|
||||
FTP
|
||||
FTP / FTPS / SFTP / SCP
|
||||
|
||||
Upload all data on stdin to a specified ftp site:
|
||||
Upload all data on stdin to a specified server:
|
||||
|
||||
curl -T - ftp://ftp.upload.com/myfile
|
||||
|
||||
@@ -169,7 +187,7 @@ UPLOADING
|
||||
|
||||
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
|
||||
|
||||
Upload a local file to get appended to the remote file using ftp:
|
||||
Upload a local file to get appended to the remote file:
|
||||
|
||||
curl -T localfile -a ftp://ftp.upload.com/remotefile
|
||||
|
||||
@@ -331,7 +349,7 @@ REFERRER
|
||||
|
||||
curl -e www.coolsite.com http://www.showme.com/
|
||||
|
||||
NOTE: The referer field is defined in the HTTP spec to be a full URL.
|
||||
NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.
|
||||
|
||||
USER AGENT
|
||||
|
||||
@@ -494,9 +512,9 @@ CONFIG FILE
|
||||
can also specify the long options without the dashes to make it more
|
||||
readable. You can separate the options and the parameter with spaces, or
|
||||
with = or :. Comments can be used within the file. If the first letter on a
|
||||
line is a '#'-letter the rest of the line is treated as a comment.
|
||||
line is a '#'-symbol the rest of the line is treated as a comment.
|
||||
|
||||
If you want the parameter to contain spaces, you must inclose the entire
|
||||
If you want the parameter to contain spaces, you must enclose the entire
|
||||
parameter within double quotes ("). Within those quotes, you specify a
|
||||
quote as \".
|
||||
|
||||
@@ -564,10 +582,18 @@ FTP and PATH NAMES
|
||||
|
||||
(I.e with an extra slash in front of the file name.)
|
||||
|
||||
SFTP and SCP and PATH NAMES
|
||||
|
||||
With sftp: and scp: URLs, the path name given is the absolute name on the
|
||||
server. To access a file relative to the remote user's home directory,
|
||||
prefix the file with /~/ , such as:
|
||||
|
||||
curl -u $USER sftp://home.example.com/~/.bashrc
|
||||
|
||||
FTP and firewalls
|
||||
|
||||
The FTP protocol requires one of the involved parties to open a second
|
||||
connction as soon as data is about to get transfered. There are two ways to
|
||||
connection as soon as data is about to get transfered. There are two ways to
|
||||
do this.
|
||||
|
||||
The default way for curl is to issue the PASV command which causes the
|
||||
@@ -775,8 +801,9 @@ ENVIRONMENT VARIABLES
|
||||
|
||||
NO_PROXY
|
||||
|
||||
If a tail substring of the domain-path for a host matches one of these
|
||||
strings, transactions with that node will not be proxied.
|
||||
If the host name matches one of these strings, or the host is within the
|
||||
domain of one of these strings, transactions with that node will not be
|
||||
proxied.
|
||||
|
||||
|
||||
The usage of the -x/--proxy flag overrides the environment variables.
|
||||
@@ -875,7 +902,8 @@ MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
|
||||
As is mentioned above, you can download multiple files with one command line
|
||||
by simply adding more URLs. If you want those to get saved to a local file
|
||||
instead of just printed to stdout, you need to add one save option for each
|
||||
URL you specify. Note that this also goes for the -O option.
|
||||
URL you specify. Note that this also goes for the -O option (but not
|
||||
--remote-name-all).
|
||||
|
||||
For example: get two files and use -O for the first and a custom file
|
||||
name for the second:
|
||||
@@ -886,6 +914,28 @@ MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
|
||||
|
||||
curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt
|
||||
|
||||
IPv6
|
||||
|
||||
curl will connect to a server with IPv6 when a host lookup returns an IPv6
|
||||
address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6
|
||||
options can specify which address to use when both are available. IPv6
|
||||
addresses can also be specified directly in URLs using the syntax:
|
||||
|
||||
http://[2001:1890:1112:1::20]/overview.html
|
||||
|
||||
When this style is used, the -g option must be given to stop curl from
|
||||
interpreting the square brackets as special globbing characters. Link local
|
||||
and site local addresses including a scope identifier, such as fe80::1234%1,
|
||||
may also be used, but the scope portion must be numeric and the percent
|
||||
character must be URL escaped. The previous example in an SFTP URL might
|
||||
look like:
|
||||
|
||||
sftp://[fe80::1234%251]/
|
||||
|
||||
IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
|
||||
or --ftp-port options) should not be URL encoded.
|
||||
|
||||
|
||||
MAILING LISTS
|
||||
|
||||
For your convenience, we have several open mailing lists to discuss curl,
|
||||
|
67
docs/THANKS
67
docs/THANKS
@@ -31,9 +31,12 @@ Anders Gustafsson
|
||||
Andi Jahja
|
||||
Andre Guibert de Bruet
|
||||
Andreas Damm
|
||||
Andreas Faerber
|
||||
Andreas Ntaflos
|
||||
Andreas Olsson
|
||||
Andreas Rieke
|
||||
Andreas Schuldei
|
||||
Andreas Wurf
|
||||
Andres Garcia
|
||||
Andrew Benham
|
||||
Andrew Biggs
|
||||
@@ -42,20 +45,28 @@ Andrew Francis
|
||||
Andrew Fuller
|
||||
Andrew Moise
|
||||
Andrew Wansink
|
||||
Andrew de los Reyes
|
||||
Andr<EFBFBD>s Garc<72>a
|
||||
Andy Cedilnik
|
||||
Andy Serpa
|
||||
Andy Tsouladze
|
||||
Angus Mackay
|
||||
Anthony Bryan
|
||||
Antoine Calando
|
||||
Anton Kalmykov
|
||||
Arkadiusz Miskiewicz
|
||||
Armel Asselin
|
||||
Arnaud Ebalard
|
||||
Arve Knudsen
|
||||
Ates Goral
|
||||
Augustus Saunders
|
||||
Avery Fay
|
||||
Axel Tillequin
|
||||
Bart Whiteley
|
||||
Bas Mevissen
|
||||
Ben Greear
|
||||
Ben Madsen
|
||||
Ben Van Hof
|
||||
Benjamin Gerard
|
||||
Bernard Leak
|
||||
Bertrand Demiddelaer
|
||||
@@ -71,6 +82,7 @@ Brian Akins
|
||||
Brian Dessent
|
||||
Brian R Duffy
|
||||
Brian Ulm
|
||||
Brock Noland
|
||||
Bruce Mitchener
|
||||
Bryan Henderson
|
||||
Bryan Kemp
|
||||
@@ -82,11 +94,13 @@ Chris Combes
|
||||
Chris Flerackers
|
||||
Chris Gaukroger
|
||||
Chris Maltby
|
||||
Christian Krause
|
||||
Christian Kurz
|
||||
Christian Robottom Reis
|
||||
Christian Vogt
|
||||
Christophe Demory
|
||||
Christophe Legry
|
||||
Christopher Palow
|
||||
Christopher R. Palmer
|
||||
Ciprian Badescu
|
||||
Clarence Gardner
|
||||
@@ -95,6 +109,7 @@ Cody Jones
|
||||
Colin Hogben
|
||||
Colin Watson
|
||||
Colm Buckley
|
||||
Constantine Sapuntzakis
|
||||
Cory Nelson
|
||||
Craig Davison
|
||||
Craig Markwardt
|
||||
@@ -111,6 +126,7 @@ Dan Zitter
|
||||
Daniel Black
|
||||
Daniel Cater
|
||||
Daniel Egger
|
||||
Daniel Fandrich
|
||||
Daniel Johnson
|
||||
Daniel Stenberg
|
||||
Daniel at touchtunes
|
||||
@@ -120,6 +136,7 @@ Dave Halbakken
|
||||
Dave Hamilton
|
||||
Dave May
|
||||
Dave Vasilevsky
|
||||
David Bau
|
||||
David Byron
|
||||
David Cohen
|
||||
David Eriksson
|
||||
@@ -133,11 +150,13 @@ David LeBlanc
|
||||
David McCreedy
|
||||
David Odin
|
||||
David Phillips
|
||||
David Rosenstrauch
|
||||
David Shaw
|
||||
David Tarendash
|
||||
David Thiel
|
||||
David Wright
|
||||
David Yan
|
||||
Dengminwen
|
||||
Detlef Schmier
|
||||
Diego Casorran
|
||||
Dima Barsky
|
||||
@@ -165,8 +184,10 @@ Dylan Ellicott
|
||||
Dylan Salisbury
|
||||
Early Ehlinger
|
||||
Edin Kadribasic
|
||||
Eduard Bloch
|
||||
Eetu Ojanen
|
||||
Ellis Pritchard
|
||||
Emanuele Bovisio
|
||||
Emil Romanus
|
||||
Emiliano Ida
|
||||
Enrico Scholz
|
||||
@@ -194,6 +215,7 @@ Forrest Cahoon
|
||||
Frank Hempel
|
||||
Frank Keeney
|
||||
Frank Ticheler
|
||||
Fred Machado
|
||||
Fred New
|
||||
Fred Noz
|
||||
Frederic Lepied
|
||||
@@ -219,6 +241,7 @@ Giuseppe Attardi
|
||||
Giuseppe D'Ambrosio
|
||||
Glen Nakamura
|
||||
Glen Scott
|
||||
Grant Erickson
|
||||
Greg Hewgill
|
||||
Greg Morse
|
||||
Greg Onufer
|
||||
@@ -234,6 +257,7 @@ Hamish Mackenzie
|
||||
Hang Kin Lau
|
||||
Hanno Kranzhoff
|
||||
Hans Steegers
|
||||
Hans-Jurgen May
|
||||
Hardeep Singh
|
||||
Harshal Pradhan
|
||||
Heikki Korpela
|
||||
@@ -241,10 +265,12 @@ Henrik Storner
|
||||
Hzhijun
|
||||
Ian Ford
|
||||
Ian Gulliver
|
||||
Ian Lynagh
|
||||
Ian Turner
|
||||
Ian Wilkes
|
||||
Ignacio Vazquez-Abrams
|
||||
Igor Franchuk
|
||||
Igor Novoseltsev
|
||||
Igor Polyakov
|
||||
Ilguiz Latypov
|
||||
Ilja van Sprundel
|
||||
@@ -273,6 +299,7 @@ Jayesh A Shah
|
||||
Jaz Fresh
|
||||
Jean Jacques Drouin
|
||||
Jean-Claude Chauve
|
||||
Jean-Francois Bertrand
|
||||
Jean-Louis Lemaire
|
||||
Jean-Marc Ranger
|
||||
Jean-Philippe Barrette-LaPierre
|
||||
@@ -280,6 +307,7 @@ Jeff Johnson
|
||||
Jeff Lawson
|
||||
Jeff Phillips
|
||||
Jeff Pohlmeyer
|
||||
Jeff Weber
|
||||
Jeffrey Pohlmeyer
|
||||
Jeremy Friesner
|
||||
Jerome Muffat-Meridol
|
||||
@@ -287,6 +315,7 @@ Jes Badwal
|
||||
Jesper Jensen
|
||||
Jesse Noller
|
||||
Jim Drash
|
||||
Jim Meyering
|
||||
Joe Halpin
|
||||
Joe Malicki
|
||||
Joel Chen
|
||||
@@ -297,7 +326,9 @@ John Crow
|
||||
John Janssen
|
||||
John Kelly
|
||||
John Lask
|
||||
John Lightsey
|
||||
John McGowan
|
||||
John Wilkinson
|
||||
Johnny Luong
|
||||
Jon Grubbs
|
||||
Jon Travis
|
||||
@@ -307,6 +338,7 @@ Jonatan Lander
|
||||
Jonathan Hseu
|
||||
Jongki Suwandi
|
||||
Jose Kahan
|
||||
Josef Wolf
|
||||
Josh Kapell
|
||||
Juan F. Codagnone
|
||||
Juan Ignacio Herv<72>s
|
||||
@@ -329,9 +361,11 @@ Katie Wang
|
||||
Kees Cook
|
||||
Keith MacDonald
|
||||
Keith McGuigan
|
||||
Keith Mok
|
||||
Ken Hirsch
|
||||
Ken Rastatter
|
||||
Kent Boortz
|
||||
Keshav Krity
|
||||
Kevin Fisk
|
||||
Kevin Lussier
|
||||
Kevin Reed
|
||||
@@ -357,6 +391,8 @@ Lau Hang Kin
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Len Krause
|
||||
Lenny Rachitsky
|
||||
Liam Healy
|
||||
Linas Vepstas
|
||||
Ling Thio
|
||||
Linus Nielsen Feltzing
|
||||
@@ -372,7 +408,7 @@ Maciej Karpiuk
|
||||
Maciej W. Rozycki
|
||||
Manfred Schwarb
|
||||
Marc Boucher
|
||||
Marcelo Juchem
|
||||
Marcelo Juchem
|
||||
Marcin Konicki
|
||||
Marco G. Salvagno
|
||||
Marcus Webster
|
||||
@@ -380,12 +416,14 @@ Mario Schroeder
|
||||
Mark Butler
|
||||
Mark Davies
|
||||
Mark Eichin
|
||||
Mark Karpeles
|
||||
Mark Lentczner
|
||||
Markus Koetter
|
||||
Markus Moeller
|
||||
Markus Oberhumer
|
||||
Martijn Koster
|
||||
Martin C. Martin
|
||||
Martin Drasar
|
||||
Martin Hedenfalk
|
||||
Martin Skinner
|
||||
Marty Kuhrt
|
||||
@@ -401,12 +439,14 @@ Matthew Blain
|
||||
Matthew Clarke
|
||||
Maurice Barnum
|
||||
Max Katsev
|
||||
Maxim Ivanov
|
||||
Maxim Perenesenko
|
||||
Mekonikum
|
||||
Mettgut Jamalla
|
||||
Michael Benedict
|
||||
Michael Calmer
|
||||
Michael Curtis
|
||||
Michael Goffioul
|
||||
Michael Jahn
|
||||
Michael Jerris
|
||||
Michael Mealling
|
||||
@@ -420,6 +460,7 @@ Mike Bytnar
|
||||
Mike Dobbs
|
||||
Mike Hommey
|
||||
Mike Protts
|
||||
Mike Revi
|
||||
Miklos Nemeth
|
||||
Mitz Wark
|
||||
Mohamed Lrhazi
|
||||
@@ -443,15 +484,18 @@ Niels van Tongeren
|
||||
Nikita Schmidt
|
||||
Nikitinskit Dmitriy
|
||||
Niklas Angebrand
|
||||
Nikolai Kondrashov
|
||||
Nir Soffer
|
||||
Nis Jorgensen
|
||||
Nodak Sodak
|
||||
Norbert Frese
|
||||
Norbert Novotny
|
||||
Ofer
|
||||
Olaf Stueben
|
||||
Olaf St<53>ben
|
||||
Oren Tirosh
|
||||
P R Schaffner
|
||||
Pascal Terjan
|
||||
Patrick Bihan-Faou
|
||||
Patrick Monnerat
|
||||
Patrick Smith
|
||||
@@ -463,11 +507,14 @@ Paul Querna
|
||||
Pavel Cenek
|
||||
Pavel Orehov
|
||||
Pawel A. Gajda
|
||||
Pawel Kierski
|
||||
Pedro Neves
|
||||
Pete Su
|
||||
Peter Bray
|
||||
Peter Forret
|
||||
Peter Heuchert
|
||||
Peter Korsgaard
|
||||
Peter Lamberg
|
||||
Peter O'Gorman
|
||||
Peter Pentchev
|
||||
Peter Silva
|
||||
@@ -477,7 +524,10 @@ Peter Todd
|
||||
Peter Verhas
|
||||
Peter Wullinger
|
||||
Peteris Krumins
|
||||
Phil Blundell
|
||||
Phil Karn
|
||||
Phil Lisiecki
|
||||
Phil Pellouchoud
|
||||
Philip Gladstone
|
||||
Philip Langdale
|
||||
Philippe Hameau
|
||||
@@ -485,8 +535,10 @@ Philippe Raoult
|
||||
Philippe Vaucher
|
||||
Pierre
|
||||
Pooyan McSporran
|
||||
Pramod Sharma
|
||||
Puneet Pawaia
|
||||
Quagmire
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Ralf S. Engelschall
|
||||
Ralph Beckmann
|
||||
@@ -528,6 +580,7 @@ Rodney Simmons
|
||||
Roland Blom
|
||||
Roland Krikava
|
||||
Roland Zimmermann
|
||||
Rolland Dudemaine
|
||||
Roman Koifman
|
||||
Ron Zapp
|
||||
Rosimildo da Silva
|
||||
@@ -542,9 +595,12 @@ Sampo Kellomaki
|
||||
Samuel D<>az Garc<72>a
|
||||
Samuel Listopad
|
||||
Sander Gates
|
||||
Sandor Feldi
|
||||
Saul good
|
||||
Scott Barrett
|
||||
Scott Cantor
|
||||
Scott Davis
|
||||
Scott McCreary
|
||||
Sebastien Willemijns
|
||||
Sergio Ballestrero
|
||||
Seshubabu Pasam
|
||||
@@ -563,6 +619,7 @@ Spiridonoff A.V
|
||||
Stadler Stephan
|
||||
Stefan Esser
|
||||
Stefan Krause
|
||||
Stefan Teleman
|
||||
Stefan Ulrich
|
||||
Stephan Bergmann
|
||||
Stephen Collyer
|
||||
@@ -574,6 +631,7 @@ Steve Lhomme
|
||||
Steve Little
|
||||
Steve Marx
|
||||
Steve Oliphant
|
||||
Steve Roskowski
|
||||
Steven Bazyl
|
||||
Steven G. Johnson
|
||||
Stoned Elipot
|
||||
@@ -586,6 +644,7 @@ Thomas J. Moore
|
||||
Thomas Klausner
|
||||
Thomas Schwinge
|
||||
Thomas Tonino
|
||||
Tim Ansell
|
||||
Tim Baker
|
||||
Tim Bartley
|
||||
Tim Costello
|
||||
@@ -620,8 +679,10 @@ Victor Snezhko
|
||||
Vikram Saxena
|
||||
Vilmos Nebehaj
|
||||
Vincent Bronner
|
||||
Vincent Le Normand
|
||||
Vincent Penquerc'h
|
||||
Vincent Sanders
|
||||
Vlad Grachov
|
||||
Vladimir Lazarenko
|
||||
Vojtech Janota
|
||||
Vojtech Minarik
|
||||
@@ -635,9 +696,11 @@ Wojciech Zwiefka
|
||||
Xavier Bouchoux
|
||||
Yang Tse
|
||||
Yarram Sunil
|
||||
Yehoshua Hershberg
|
||||
Yuriy Sosov
|
||||
Yves Lejeune
|
||||
Zmey Petroff
|
||||
Zvi Har'El
|
||||
Zvi Har'El
|
||||
nk
|
||||
swalkaus at yahoo.com
|
||||
tommink[at]post.pl
|
||||
|
130
docs/TODO
130
docs/TODO
@@ -15,15 +15,13 @@
|
||||
1.1 Zero-copy interface
|
||||
1.2 More data sharing
|
||||
1.3 struct lifreq
|
||||
1.4 Get IP address
|
||||
1.5 c-ares ipv6
|
||||
1.6 configure-based info in public headers
|
||||
1.4 signal-based resolver timeouts
|
||||
|
||||
2. libcurl - multi interface
|
||||
2.1 More non-blocking
|
||||
2.2 Pause transfers
|
||||
2.3 Remove easy interface internally
|
||||
2.4 Avoid having to remove/readd handles
|
||||
2.2 Remove easy interface internally
|
||||
2.3 Avoid having to remove/readd handles
|
||||
2.4 Fix HTTP Pipelining for PUT
|
||||
|
||||
3. Documentation
|
||||
3.1 More and better
|
||||
@@ -38,9 +36,8 @@
|
||||
4.7 ASCII support
|
||||
|
||||
5. HTTP
|
||||
5.1 Other HTTP versions with CONNECT
|
||||
5.2 Better persistency for HTTP 1.0
|
||||
5.3 support FF3 sqlite cookie files
|
||||
5.1 Better persistency for HTTP 1.0
|
||||
5.2 support FF3 sqlite cookie files
|
||||
|
||||
6. TELNET
|
||||
6.1 ditch stdin
|
||||
@@ -50,15 +47,14 @@
|
||||
|
||||
7. SSL
|
||||
7.1 Disable specific versions
|
||||
7.2 Provide mytex locking API
|
||||
7.3 dumpcert
|
||||
7.4 Evaluate SSL patches
|
||||
7.5 Cache OpenSSL contexts
|
||||
7.6 Export session ids
|
||||
7.7 Provide callback for cert verification
|
||||
7.8 Support other SSL libraries
|
||||
7.9 Support SRP on the TLS layer
|
||||
7.10 improve configure --with-ssl
|
||||
7.2 Provide mutex locking API
|
||||
7.3 Evaluate SSL patches
|
||||
7.4 Cache OpenSSL contexts
|
||||
7.5 Export session ids
|
||||
7.6 Provide callback for cert verification
|
||||
7.7 Support other SSL libraries
|
||||
7.8 Support SRP on the TLS layer
|
||||
7.9 improve configure --with-ssl
|
||||
|
||||
8. GnuTLS
|
||||
8.1 Make NTLM work without OpenSSL functions
|
||||
@@ -131,54 +127,26 @@
|
||||
SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
|
||||
To support ipv6 interface addresses for network interfaces properly.
|
||||
|
||||
1.4 Get IP address
|
||||
1.4 signal-based resolver timeouts
|
||||
|
||||
Add the following to curl_easy_getinfo(): GET_HTTP_IP, GET_FTP_IP and
|
||||
GET_FTP_DATA_IP. Return a string with the used IP.
|
||||
libcurl built without an asynchronous resolver library uses alarm() to time
|
||||
out DNS lookups. When a timeout occurs, this causes libcurl to jump from the
|
||||
signal handler back into the library with a sigsetjmp, which effectively
|
||||
causes libcurl to continue running within the signal handler. This is
|
||||
non-portable and could cause problems on some platforms. A discussion on the
|
||||
problem is available at http://curl.haxx.se/mail/lib-2008-09/0197.html
|
||||
|
||||
1.5 c-ares ipv6
|
||||
|
||||
Make libcurl built with c-ares use c-ares' IPv6 abilities. They weren't
|
||||
present when we first added c-ares support but they have been added since!
|
||||
When this is done and works, we can actually start considering making c-ares
|
||||
powered libcurl the default build (which of course would require that we'd
|
||||
bundle the c-ares source code in the libcurl source code releases).
|
||||
|
||||
1.6 configure-based info in public headers
|
||||
|
||||
Make the public headers include the proper system includes based on what was
|
||||
present at the time when configure was run. Currently, the sys/select.h
|
||||
header is for example included by curl/multi.h only on specific platforms we
|
||||
know MUST have it. This is error-prone. We therefore want the header files to
|
||||
adapt to configure results. Those results must be stored in a new header and
|
||||
they must use a curl name space, i.e not be HAVE_* prefix (as that would risk
|
||||
collide with other apps that use libcurl and that runs configure).
|
||||
|
||||
Work on this has been started but hasn't been finished, and the initial patch
|
||||
and some details are found here:
|
||||
http://curl.haxx.se/mail/lib-2006-12/0084.html
|
||||
|
||||
The remaining problems to solve involve the platforms that can't run
|
||||
configure.
|
||||
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
||||
ought to be replaced by setitimer on systems that support it.
|
||||
|
||||
2. libcurl - multi interface
|
||||
|
||||
2.1 More non-blocking
|
||||
|
||||
Make sure we don't ever loop because of non-blocking sockets return
|
||||
Make sure we don't ever loop because of non-blocking sockets returning
|
||||
EWOULDBLOCK or similar. The GnuTLS connection etc.
|
||||
|
||||
2.2 Pause transfers
|
||||
|
||||
Make transfers treated more carefully. We need a way to tell libcurl we have
|
||||
data to write, as the current system expects us to upload data each time the
|
||||
socket is writable and there is no way to say that we want to upload data
|
||||
soon just not right now, without that aborting the upload. The opposite
|
||||
situation should be possible as well, that we tell libcurl we're ready to
|
||||
accept read data. Today libcurl feeds the data as soon as it is available for
|
||||
reading, no matter what.
|
||||
|
||||
2.3 Remove easy interface internally
|
||||
2.2 Remove easy interface internally
|
||||
|
||||
Make curl_easy_perform() a wrapper-function that simply creates a multi
|
||||
handle, adds the easy handle to it, runs curl_multi_perform() until the
|
||||
@@ -187,7 +155,7 @@
|
||||
internally use and assume the multi interface. The select()-loop should use
|
||||
curl_multi_socket().
|
||||
|
||||
2.4 Avoid having to remove/readd handles
|
||||
2.3 Avoid having to remove/readd handles
|
||||
|
||||
curl_multi_handle_control() - this can control the easy handle (while) added
|
||||
to a multi handle in various ways:
|
||||
@@ -204,6 +172,13 @@
|
||||
|
||||
o RESUME?
|
||||
|
||||
2.4 Fix HTTP Pipelining for PUT
|
||||
|
||||
HTTP Pipelining can be a way to greatly enhance performance for multiple
|
||||
serial requests and currently libcurl only supports that for HEAD and GET
|
||||
requests but it should also be possible for PUT.
|
||||
|
||||
|
||||
3. Documentation
|
||||
|
||||
3.1 More and better
|
||||
@@ -256,18 +231,12 @@
|
||||
|
||||
5. HTTP
|
||||
|
||||
5.1 Other HTTP versions with CONNECT
|
||||
|
||||
When doing CONNECT to a HTTP proxy, libcurl always uses HTTP/1.0. This has
|
||||
never been reported as causing trouble to anyone, but should be considered to
|
||||
use the HTTP version the user has chosen.
|
||||
|
||||
5.2 Better persistency for HTTP 1.0
|
||||
5.1 Better persistency for HTTP 1.0
|
||||
|
||||
"Better" support for persistent connections over HTTP 1.0
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1089001
|
||||
|
||||
5.3 support FF3 sqlite cookie files
|
||||
5.2 support FF3 sqlite cookie files
|
||||
|
||||
Firefox 3 is changing from its former format to a a sqlite database instead.
|
||||
We should consider how (lib)curl can/should support this.
|
||||
@@ -304,23 +273,18 @@ to provide the data to send.
|
||||
Provide an option that allows for disabling specific SSL versions, such as
|
||||
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
|
||||
|
||||
7.2 Provide mytex locking API
|
||||
7.2 Provide mutex locking API
|
||||
|
||||
Provide a libcurl API for setting mutex callbacks in the underlying SSL
|
||||
library, so that the same application code can use mutex-locking
|
||||
independently of OpenSSL or GnutTLS being used.
|
||||
|
||||
7.3 dumpcert
|
||||
|
||||
Anton Fedorov's "dumpcert" patch:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0088.html
|
||||
|
||||
7.4 Evaluate SSL patches
|
||||
7.3 Evaluate SSL patches
|
||||
|
||||
Evaluate/apply Gertjan van Wingerde's SSL patches:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||
|
||||
7.5 Cache OpenSSL contexts
|
||||
7.4 Cache OpenSSL contexts
|
||||
|
||||
"Look at SSL cafile - quick traces look to me like these are done on every
|
||||
request as well, when they should only be necessary once per ssl context (or
|
||||
@@ -330,7 +294,7 @@ to provide the data to send.
|
||||
style connections are re-used. It will make us use slightly more memory but
|
||||
it will libcurl do less creations and deletions of SSL contexts.
|
||||
|
||||
7.6 Export session ids
|
||||
7.5 Export session ids
|
||||
|
||||
Add an interface to libcurl that enables "session IDs" to get
|
||||
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
|
||||
@@ -338,24 +302,24 @@ to provide the data to send.
|
||||
the state from such a buffer at a later date - this is used by mod_ssl for
|
||||
apache to implement and SSL session ID cache".
|
||||
|
||||
7.7 Provide callback for cert verification
|
||||
7.6 Provide callback for cert verification
|
||||
|
||||
OpenSSL supports a callback for customised verification of the peer
|
||||
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
|
||||
it be? There's so much that could be done if it were!
|
||||
|
||||
7.8 Support other SSL libraries
|
||||
7.7 Support other SSL libraries
|
||||
|
||||
Make curl's SSL layer capable of using other free SSL libraries. Such as
|
||||
MatrixSSL (http://www.matrixssl.org/).
|
||||
|
||||
7.9 Support SRP on the TLS layer
|
||||
7.8 Support SRP on the TLS layer
|
||||
|
||||
Peter Sylvester's patch for SRP on the TLS layer. Awaits OpenSSL support for
|
||||
this, no need to support this in libcurl before there's an OpenSSL release
|
||||
that does it.
|
||||
|
||||
7.10 improve configure --with-ssl
|
||||
7.9 improve configure --with-ssl
|
||||
|
||||
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||
then NSS...
|
||||
@@ -364,10 +328,10 @@ to provide the data to send.
|
||||
|
||||
8.1 Make NTLM work without OpenSSL functions
|
||||
|
||||
Get NTLM working using the functions provided by libgcrypt, since GnuTLS
|
||||
already depends on that to function. Not strictly SSL/TLS related, but
|
||||
hey... Another option is to get available DES and MD4 source code from the
|
||||
cryptopp library. They are fine license-wise, but are C++.
|
||||
Get NTLM working using the functions provided by NSS. Not strictly
|
||||
SSL/TLS related, but hey... Another option is to get available DES and
|
||||
MD4 source code from the cryptopp library. They are fine license-wise,
|
||||
but are C++.
|
||||
|
||||
8.2 SSL engine stuff
|
||||
|
||||
|
@@ -375,12 +375,11 @@ Date: May 28, 2008
|
||||
11.1 Certificates
|
||||
|
||||
In the HTTPS world, you use certificates to validate that you are the one
|
||||
you you claim to be, as an addition to normal passwords. Curl supports
|
||||
client-side certificates. All certificates are locked with a pass phrase,
|
||||
which you need to enter before the certificate can be used by curl. The pass
|
||||
phrase can be specified on the command line or if not, entered interactively
|
||||
when curl queries for it. Use a certificate with curl on a HTTPS server
|
||||
like:
|
||||
you claim to be, as an addition to normal passwords. Curl supports client-
|
||||
side certificates. All certificates are locked with a pass phrase, which you
|
||||
need to enter before the certificate can be used by curl. The pass phrase
|
||||
can be specified on the command line or if not, entered interactively when
|
||||
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
||||
|
||||
curl -E mycert.pem https://that.secure.server.com
|
||||
|
||||
|
@@ -28,7 +28,7 @@ curl-config \- Get information about a libcurl installation
|
||||
.B curl-config [options]
|
||||
.SH DESCRIPTION
|
||||
.B curl-config
|
||||
displays information about a previous curl and libcurl installation.
|
||||
displays information about the curl and libcurl installation.
|
||||
.SH OPTIONS
|
||||
.IP "--ca"
|
||||
Displays the built-in path to the CA cert bundle this libcurl uses.
|
||||
@@ -36,7 +36,7 @@ Displays the built-in path to the CA cert bundle this libcurl uses.
|
||||
Displays the compiler used to build libcurl.
|
||||
.IP "--cflags"
|
||||
Set of compiler options (CFLAGS) to use when compiling files that use
|
||||
libcurl. Currently that is only thw include path to the curl include files.
|
||||
libcurl. Currently that is only the include path to the curl include files.
|
||||
.IP "--checkfor [version]"
|
||||
Specify the oldest possible libcurl version string you want, and this
|
||||
script will return 0 if the current installation is new enough or it
|
||||
@@ -46,7 +46,7 @@ enough. (Added in 7.15.4)
|
||||
Lists what particular main features the installed libcurl was built with. At
|
||||
the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
|
||||
any particular order. The keywords will be separated by newlines. There may be
|
||||
none, one or several keywords in the list.
|
||||
none, one, or several keywords in the list.
|
||||
.IP "--help"
|
||||
Displays the available options.
|
||||
.IP "--libs"
|
||||
@@ -61,7 +61,7 @@ Lists what particular protocols the installed libcurl was built to support. At
|
||||
the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
|
||||
TELNET, LDAP, DICT. Do not assume any particular order. The protocols will
|
||||
be listed using uppercase and are separated by newlines. There may be none,
|
||||
one or several protocols in the list. (Added in 7.13.0)
|
||||
one, or several protocols in the list. (Added in 7.13.0)
|
||||
.IP "--static-libs"
|
||||
Shows the complete set of libs and other linker options you will need in order
|
||||
to link your application with libcurl statically. (Added in 7.17.1)
|
||||
|
565
docs/curl.1
565
docs/curl.1
File diff suppressed because it is too large
Load Diff
@@ -16,11 +16,10 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <curl/multi.h>
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WIN32
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <curl/multi.h>
|
||||
|
||||
static const char *urls[] = {
|
||||
"http://www.microsoft.com",
|
||||
@@ -114,7 +113,7 @@ int main(void)
|
||||
|
||||
/* we can optionally limit the total amount of connections this multi handle
|
||||
uses */
|
||||
curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, MAX);
|
||||
curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX);
|
||||
|
||||
for (C = 0; C < MAX; ++C) {
|
||||
init(cm, C);
|
||||
|
@@ -7,7 +7,16 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
|
||||
makefile.dj $(COMPLICATED_EXAMPLES)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
||||
# $(top_builddir), to ensure that these paths which belong to the library
|
||||
# being currently built and tested are searched before the library which
|
||||
# might possibly already be installed in the system.
|
||||
#
|
||||
# $(top_builddir)/include is for libcurl's generated curl/curlbuild.h file
|
||||
# $(top_srcdir)/include is for libcurl's external include files
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include
|
||||
|
||||
LIBDIR = $(top_builddir)/lib
|
||||
|
||||
|
@@ -5,13 +5,12 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
||||
https multi-app multi-debugcallback multi-double \
|
||||
multi-post multi-single persistant post-callback \
|
||||
postit2 sepheaders simple simplepost simplessl \
|
||||
sendrecv
|
||||
sendrecv httpcustomheader certinfo
|
||||
|
||||
# These examples require external dependencies that may not be commonly
|
||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||
COMPLICATED_EXAMPLES = \
|
||||
curlgtk.c curlx.c htmltitle.cc cacertinmem.c ftpuploadresume.c \
|
||||
ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c
|
||||
|
||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
|
||||
|
||||
|
@@ -9,10 +9,23 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef WIN32
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef _WIN64
|
||||
typedef __int64 intptr_t;
|
||||
# else
|
||||
typedef int intptr_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user