Compare commits
1204 Commits
curl-7_17_
...
curl-7_19_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 | ||
![]() |
323273382c | ||
![]() |
6f0a2608b4 | ||
![]() |
ea86edbd82 | ||
![]() |
e7b5a8e6cb | ||
![]() |
27eaf0cf02 | ||
![]() |
c84904d8c8 | ||
![]() |
01e1c85304 | ||
![]() |
4774582dfb | ||
![]() |
1ed09ff7a4 | ||
![]() |
d89cf27d65 | ||
![]() |
35d5ba2626 | ||
![]() |
e5f0c38fa9 | ||
![]() |
47925f3dd7 | ||
![]() |
82c5950c7e | ||
![]() |
1806879bb2 | ||
![]() |
998b046d70 | ||
![]() |
ec4f6e93c2 | ||
![]() |
b49dcfb52b | ||
![]() |
c62d55342d | ||
![]() |
f7815fa93c | ||
![]() |
6e305e11e3 | ||
![]() |
b97606f0b0 | ||
![]() |
f26154bfa9 | ||
![]() |
d220ac8582 | ||
![]() |
c57e748107 | ||
![]() |
d6f8f16068 | ||
![]() |
466429efb0 | ||
![]() |
89977c73d1 | ||
![]() |
a9a05a32bd | ||
![]() |
2045c79e37 | ||
![]() |
e60b5245d3 | ||
![]() |
90bbabce56 | ||
![]() |
ddfbe8b649 | ||
![]() |
d001f6a396 | ||
![]() |
d31da176eb | ||
![]() |
e664cd5826 | ||
![]() |
b8abeab6d3 | ||
![]() |
4aa176c127 | ||
![]() |
498e939f0e | ||
![]() |
9a22b893b6 | ||
![]() |
76d0d40946 | ||
![]() |
791ad1210e | ||
![]() |
100945694a | ||
![]() |
abe2e6ecf7 | ||
![]() |
d8efc99217 | ||
![]() |
0163b5b8be | ||
![]() |
baee3996ab | ||
![]() |
8ad1928d93 | ||
![]() |
24bf52bc69 | ||
![]() |
862049c490 | ||
![]() |
a8fc98aa30 | ||
![]() |
d70f33748c | ||
![]() |
b006c31b7b | ||
![]() |
ae45a462e0 | ||
![]() |
3cb0dd6685 | ||
![]() |
c2a84aa6f0 | ||
![]() |
9346e55d5a | ||
![]() |
8fc2f8ef62 | ||
![]() |
512b9ac194 | ||
![]() |
560a82aeaf | ||
![]() |
7358db5c27 | ||
![]() |
e059efda1b | ||
![]() |
164a985115 | ||
![]() |
ade57a781c | ||
![]() |
9f12ed83f2 | ||
![]() |
8aabd9839b | ||
![]() |
882fbb0433 | ||
![]() |
15eee5dbbb | ||
![]() |
cfc1d037ff | ||
![]() |
c24ed07596 | ||
![]() |
08aab6a620 | ||
![]() |
2748c64d60 | ||
![]() |
c4f1ab3cc5 | ||
![]() |
5e06ec8409 | ||
![]() |
04d0a84ae5 | ||
![]() |
c1dfe2c529 | ||
![]() |
7f88e8badb | ||
![]() |
2f66ff2e4f | ||
![]() |
76c251513e | ||
![]() |
80afddacc8 | ||
![]() |
7543c9df50 | ||
![]() |
83fb13329d | ||
![]() |
e06c923605 | ||
![]() |
ab1169895f | ||
![]() |
01e81c7e10 | ||
![]() |
7bf1142ae0 | ||
![]() |
af9f7a952b | ||
![]() |
514592b892 | ||
![]() |
d72efff878 | ||
![]() |
e4c60e2030 | ||
![]() |
ed80eb5b0f | ||
![]() |
60dd765b3d | ||
![]() |
b380dd030f | ||
![]() |
19479ea021 | ||
![]() |
d708ef6731 | ||
![]() |
d1238baecb | ||
![]() |
0510759bc4 | ||
![]() |
6d5cca5ed0 | ||
![]() |
e2b82b4325 | ||
![]() |
cf4570a06f | ||
![]() |
6df5dddd90 | ||
![]() |
d4e9b141db | ||
![]() |
ec0665a931 | ||
![]() |
836fa69e2e | ||
![]() |
9026dc2da4 | ||
![]() |
98c9af4c59 | ||
![]() |
e481d679b2 | ||
![]() |
eb68aa38e3 | ||
![]() |
082237e2b5 | ||
![]() |
dd08a7a4f6 | ||
![]() |
a60c9ef88e | ||
![]() |
4e3d235e04 | ||
![]() |
19da3606f9 | ||
![]() |
fc9e0d2249 | ||
![]() |
21a0f09081 | ||
![]() |
b84b71f524 | ||
![]() |
3d29bda9f8 | ||
![]() |
459c664043 | ||
![]() |
45edad84cb | ||
![]() |
fd31f7e7e5 | ||
![]() |
7b2531da24 | ||
![]() |
848a13654d | ||
![]() |
1cca8f5a30 | ||
![]() |
12ffcf0b45 | ||
![]() |
852989856d | ||
![]() |
7dfdbf8fbe | ||
![]() |
1eebb90030 | ||
![]() |
ab71654078 | ||
![]() |
7a6cff4b3a | ||
![]() |
c3ba2198b1 | ||
![]() |
ff748f1a41 | ||
![]() |
b8193b6321 | ||
![]() |
113d0937de | ||
![]() |
d0a506661f | ||
![]() |
4e71173928 | ||
![]() |
e0f0a2ccee | ||
![]() |
96edebf4d9 | ||
![]() |
3783b455c0 | ||
![]() |
7ee5238f5e | ||
![]() |
b398169567 | ||
![]() |
1960eebc2d | ||
![]() |
ad1dd08693 | ||
![]() |
95fd093c4a | ||
![]() |
ed1ad28e29 | ||
![]() |
7076505c24 | ||
![]() |
5825cf9457 | ||
![]() |
ff40415aee | ||
![]() |
f48eb36f75 | ||
![]() |
768e3e796e | ||
![]() |
3869d4a3a7 | ||
![]() |
a87c468c5c | ||
![]() |
7abf50a5c0 | ||
![]() |
d3f46eb61b | ||
![]() |
72c58b0d1d | ||
![]() |
6c89e1b311 | ||
![]() |
09777a4fc2 | ||
![]() |
0331071346 | ||
![]() |
614ae7b2bc | ||
![]() |
af41ada7aa | ||
![]() |
6a33a4456e | ||
![]() |
e0c2a39ad4 | ||
![]() |
cda1f2be58 | ||
![]() |
79e06c4147 | ||
![]() |
ead2618c31 | ||
![]() |
84eb9fee76 | ||
![]() |
79300cdcd9 | ||
![]() |
a9591ad1b7 | ||
![]() |
098106b54c | ||
![]() |
74bb59fa57 | ||
![]() |
c97d112b30 | ||
![]() |
2dc20b84c1 | ||
![]() |
39b689f966 | ||
![]() |
6fd3ff4032 | ||
![]() |
ab8d1464a7 | ||
![]() |
bf90d11a31 | ||
![]() |
a08b6ae813 | ||
![]() |
74c500b6ec | ||
![]() |
26aeadbc3e | ||
![]() |
d0a4b50e19 | ||
![]() |
ebaf06a741 | ||
![]() |
34d837c2dd | ||
![]() |
7607d5145b | ||
![]() |
12a90289ed | ||
![]() |
592697583d | ||
![]() |
b50a96982e | ||
![]() |
aa2a54c10a | ||
![]() |
532d4b5106 | ||
![]() |
5788719988 | ||
![]() |
ac0b911eda | ||
![]() |
10232bfe9e | ||
![]() |
a9c1ca9fc5 | ||
![]() |
d051dd8087 | ||
![]() |
bf52cef16f | ||
![]() |
16a9c5e02b | ||
![]() |
fef1a90938 | ||
![]() |
27870d48ff | ||
![]() |
2f66f3ce08 | ||
![]() |
369df58a0d | ||
![]() |
3d08b352a2 | ||
![]() |
d13be06aaa | ||
![]() |
f1c69192da | ||
![]() |
a2314225e0 | ||
![]() |
1e482fe6a8 | ||
![]() |
80e7f9b9de | ||
![]() |
d219269f1b | ||
![]() |
0ff0512aff | ||
![]() |
bdd731177e | ||
![]() |
abd1c526f0 | ||
![]() |
a050a5fa9b | ||
![]() |
7f7b643c0d | ||
![]() |
cd2814725a | ||
![]() |
342fa1cf06 | ||
![]() |
b425e851fb | ||
![]() |
7c6a026230 | ||
![]() |
2c9763da3e | ||
![]() |
a782c3e368 | ||
![]() |
95bd901efe | ||
![]() |
98c9a5b7f6 | ||
![]() |
516192e7f2 | ||
![]() |
c37cdbe2cf | ||
![]() |
c0a30b04c2 | ||
![]() |
86cbb23282 | ||
![]() |
e9a460411f | ||
![]() |
a57098ea9b | ||
![]() |
6f3166c15b | ||
![]() |
1380c9af9f | ||
![]() |
942daece00 | ||
![]() |
040a4443a1 | ||
![]() |
641d5c4111 | ||
![]() |
ad4a9955c5 | ||
![]() |
553ed99e3b | ||
![]() |
b74cdee6ab | ||
![]() |
f3c0afa5b8 | ||
![]() |
a69ba639ba | ||
![]() |
fc9ad03e66 | ||
![]() |
b9d66dca51 | ||
![]() |
ecf1c6ca5d | ||
![]() |
9b48991ebd | ||
![]() |
7a8a20416f | ||
![]() |
458925ae0b | ||
![]() |
e44dc92197 | ||
![]() |
9bb51d767e | ||
![]() |
82e095a275 | ||
![]() |
0e40261a11 | ||
![]() |
8e9e33ae52 | ||
![]() |
40e1a016f9 | ||
![]() |
1cf559492a | ||
![]() |
4957a838ef | ||
![]() |
91aeebed26 | ||
![]() |
b16ea66cec | ||
![]() |
80cec5a62a | ||
![]() |
6c2c281a7e | ||
![]() |
0836893335 | ||
![]() |
590f0358d8 | ||
![]() |
115446be37 | ||
![]() |
d83606ee3a | ||
![]() |
8f4fda1d6f | ||
![]() |
18cbb4d7d6 | ||
![]() |
22e84d92b7 | ||
![]() |
3d74649908 | ||
![]() |
ed63d9d4de | ||
![]() |
8adc7038fe | ||
![]() |
b12fef3f31 | ||
![]() |
6cc8df95dd | ||
![]() |
f105e23444 | ||
![]() |
7513d29a48 | ||
![]() |
97a41f3646 | ||
![]() |
84de433e62 | ||
![]() |
724ad15dad | ||
![]() |
79aa6c841e | ||
![]() |
058e764af8 | ||
![]() |
0d09f342c4 | ||
![]() |
9682c2037e | ||
![]() |
74241e7d85 | ||
![]() |
3154f04fb9 | ||
![]() |
6982ed4db7 | ||
![]() |
9dd3e4d481 | ||
![]() |
1d95109ffa | ||
![]() |
e9bb7b7712 | ||
![]() |
5e9c564883 | ||
![]() |
3bb4602227 | ||
![]() |
064eebeaf1 | ||
![]() |
4ae644e427 | ||
![]() |
d208e56b16 | ||
![]() |
e6170eb20d | ||
![]() |
2c80bcbc81 | ||
![]() |
b60dbfa9e9 | ||
![]() |
9019fc5671 | ||
![]() |
5db0f70491 | ||
![]() |
53a549000c | ||
![]() |
55700cb01f | ||
![]() |
f9a6062081 | ||
![]() |
0cae201044 | ||
![]() |
9df37b93df | ||
![]() |
7b5c86033a | ||
![]() |
ade0890746 | ||
![]() |
7a5596bf02 | ||
![]() |
d2125cf501 | ||
![]() |
c9eb41c056 | ||
![]() |
0d722204c3 | ||
![]() |
e829d5643f | ||
![]() |
1093287494 | ||
![]() |
6398f71cc4 | ||
![]() |
e2b50b203d | ||
![]() |
ab0de23d83 | ||
![]() |
ec54fbd9ed | ||
![]() |
074bd2a19b | ||
![]() |
fb23b85770 | ||
![]() |
3458ce9ae5 | ||
![]() |
ba3e7a8656 | ||
![]() |
240bae4eb2 | ||
![]() |
4180ca7638 | ||
![]() |
0e73361a06 | ||
![]() |
23547fa2a0 | ||
![]() |
550d6f74b9 | ||
![]() |
f7b71c2abe | ||
![]() |
0da90b5d91 | ||
![]() |
f20c94ced9 | ||
![]() |
3e635a2334 | ||
![]() |
e78652d850 | ||
![]() |
48918c3047 | ||
![]() |
dc42d6fb8d | ||
![]() |
d2ad98d8c5 | ||
![]() |
d25aab2704 | ||
![]() |
cfaf88aab4 | ||
![]() |
ecc75be6f3 | ||
![]() |
13ebf61850 | ||
![]() |
b3fafe9b3a | ||
![]() |
c66943bd89 | ||
![]() |
11fae450fa | ||
![]() |
cf9259dd92 | ||
![]() |
6634e3c3a3 | ||
![]() |
533ae704a1 | ||
![]() |
fcc320ee40 | ||
![]() |
dc9fe9c361 | ||
![]() |
75c369dcca | ||
![]() |
019f6a1926 | ||
![]() |
44fba11b34 | ||
![]() |
df07c87b89 | ||
![]() |
8f9e0357dd | ||
![]() |
736af32b49 | ||
![]() |
6942d313ff | ||
![]() |
940c075bd8 | ||
![]() |
08e5c0812f | ||
![]() |
a8c71961e0 | ||
![]() |
d6f47cc60c | ||
![]() |
63d595a047 | ||
![]() |
15e56c3284 | ||
![]() |
fc1443dcfc | ||
![]() |
59e3651af3 | ||
![]() |
4c841a1f0c | ||
![]() |
339ebdf08b | ||
![]() |
f01d324c83 | ||
![]() |
405e192b8c | ||
![]() |
1a340de0e5 | ||
![]() |
05c191199d | ||
![]() |
1fd7085ef1 | ||
![]() |
c3a7a757f7 | ||
![]() |
dca46e6470 | ||
![]() |
7edd13822c | ||
![]() |
a2bff51ede | ||
![]() |
5dc1240c49 | ||
![]() |
c764331dd9 | ||
![]() |
586444b6b8 | ||
![]() |
ce1649564c | ||
![]() |
d76a74cc5e | ||
![]() |
1b701c746f | ||
![]() |
15bf168527 | ||
![]() |
20e9fc73e2 | ||
![]() |
bad6410d08 | ||
![]() |
fecb67b246 | ||
![]() |
2c0956200f | ||
![]() |
acd9d72466 | ||
![]() |
cd63a461d7 | ||
![]() |
7bd098f670 | ||
![]() |
4b5c504bd4 | ||
![]() |
ffae4f6b48 | ||
![]() |
454e840590 | ||
![]() |
ed0a413711 | ||
![]() |
ff812ccdc9 | ||
![]() |
03bbf4de48 | ||
![]() |
a62e155ca4 | ||
![]() |
b620e62f0f | ||
![]() |
b3186dee17 | ||
![]() |
ea3f63281c | ||
![]() |
7b9435890d | ||
![]() |
1bfbd25027 | ||
![]() |
ceb5a8ca7b | ||
![]() |
ddc98c6fc9 | ||
![]() |
ff6ff66e50 | ||
![]() |
a7b98f5f6b | ||
![]() |
6bae091c1b | ||
![]() |
33d68653f0 | ||
![]() |
267836e83c | ||
![]() |
87fdfe770d | ||
![]() |
8fca5c2e69 | ||
![]() |
5f2055729e | ||
![]() |
c6df788866 | ||
![]() |
e67b2524d1 | ||
![]() |
d7bcc26179 | ||
![]() |
69e540dfa6 | ||
![]() |
2198869eb1 | ||
![]() |
fb07259e0d | ||
![]() |
9d28a0252c | ||
![]() |
d54c14ccf9 | ||
![]() |
41def4be6e | ||
![]() |
2d38d0d515 | ||
![]() |
e796c79d18 | ||
![]() |
c93ba48da2 | ||
![]() |
e322513698 | ||
![]() |
6fa72e6417 | ||
![]() |
c914e6ea5d | ||
![]() |
79cb74f03a | ||
![]() |
34cf35051a | ||
![]() |
9bd28a021f | ||
![]() |
5ee3f41e0d | ||
![]() |
64e88ff6a7 | ||
![]() |
acd7c94598 | ||
![]() |
bdb2beb8e4 | ||
![]() |
727e23322f | ||
![]() |
ef0ed9b720 | ||
![]() |
a674654f83 | ||
![]() |
3caeb0a91f | ||
![]() |
a4eddf0d0d | ||
![]() |
fcf9029179 | ||
![]() |
e40327ba00 | ||
![]() |
bdd0e3d3f5 | ||
![]() |
e9490fdbd9 | ||
![]() |
bd40b3ff3f | ||
![]() |
8c66811e09 | ||
![]() |
daadcfd1de | ||
![]() |
62df0ff025 | ||
![]() |
01d95b56a0 | ||
![]() |
f6adae8d35 | ||
![]() |
bcaadb4284 | ||
![]() |
8d963aa0e2 | ||
![]() |
0530b0a5ca | ||
![]() |
5396121595 | ||
![]() |
bcfc7d90d1 | ||
![]() |
47246eb401 | ||
![]() |
3620e71010 | ||
![]() |
c522f349fe | ||
![]() |
6893fcaa9b | ||
![]() |
301ae1ae1b | ||
![]() |
ddaa78f08b | ||
![]() |
3d55877764 | ||
![]() |
3ee32d7920 | ||
![]() |
b3de497d83 | ||
![]() |
ed6466d176 | ||
![]() |
991505e077 | ||
![]() |
56f17d2c9f | ||
![]() |
19ae96f4d0 | ||
![]() |
53108806af | ||
![]() |
1d620a3df4 | ||
![]() |
69f685056d | ||
![]() |
9c7d4394f9 | ||
![]() |
bcc3c9279a | ||
![]() |
5d63404966 | ||
![]() |
a8ae8087c4 | ||
![]() |
502da27d65 | ||
![]() |
4ab8ebb232 | ||
![]() |
f866af912d | ||
![]() |
4f00a8db73 | ||
![]() |
5004529685 | ||
![]() |
2b63eb8511 | ||
![]() |
f09fe4b49f | ||
![]() |
22c76df44d | ||
![]() |
35be09cf58 | ||
![]() |
3564aec388 | ||
![]() |
a042090467 | ||
![]() |
148d727525 | ||
![]() |
08adf67969 | ||
![]() |
e2c817731a | ||
![]() |
8df7e0bdba | ||
![]() |
14ff7e75e0 | ||
![]() |
d270d6518a | ||
![]() |
18faa50940 | ||
![]() |
0ce484eed9 | ||
![]() |
bce5ae9a07 | ||
![]() |
15f832d1c2 | ||
![]() |
c249a8aa1b | ||
![]() |
fc794ae012 | ||
![]() |
07227e8089 | ||
![]() |
32cc75d6cb | ||
![]() |
1c0a19ad53 | ||
![]() |
de23b98522 | ||
![]() |
5e1c9e90d9 | ||
![]() |
59b4bdf78d | ||
![]() |
34d02d1969 | ||
![]() |
2408b236ca | ||
![]() |
4acd437952 | ||
![]() |
314f62958d | ||
![]() |
c616d56e96 | ||
![]() |
f111c9edae | ||
![]() |
7138296633 | ||
![]() |
195e94c0fa | ||
![]() |
cadd08f36a | ||
![]() |
7306b7829b | ||
![]() |
423309541a | ||
![]() |
9c6533d287 | ||
![]() |
b430576436 | ||
![]() |
65008a4e55 | ||
![]() |
3df484088f | ||
![]() |
2912189875 | ||
![]() |
fcb2595ed6 | ||
![]() |
0878af3ec0 | ||
![]() |
fe0d7aee49 | ||
![]() |
2e42b0a252 | ||
![]() |
fcc485092a | ||
![]() |
a4945fe687 | ||
![]() |
88d89b2177 | ||
![]() |
61a2d5ea75 | ||
![]() |
c479c64333 | ||
![]() |
7a2177dc42 | ||
![]() |
bf6e2f28ba | ||
![]() |
f5da1e5484 | ||
![]() |
fd8d862c37 | ||
![]() |
083d3190e5 | ||
![]() |
6787d1ed35 | ||
![]() |
d9023c16ab | ||
![]() |
193d33fd4a | ||
![]() |
a46b40b7fd | ||
![]() |
0b9b8acb08 | ||
![]() |
bf98b635cd | ||
![]() |
7795eb6db8 | ||
![]() |
31674559d3 | ||
![]() |
04e4d9a0b3 | ||
![]() |
f277124a0f | ||
![]() |
6adf5880f5 | ||
![]() |
4e8c4fc80b | ||
![]() |
fc1d1ea934 | ||
![]() |
9cd30c2012 | ||
![]() |
d639ed1aaf | ||
![]() |
c3a02f5407 | ||
![]() |
674845f239 | ||
![]() |
07a1857d59 | ||
![]() |
f4ffa85f60 | ||
![]() |
bcd7d03b3b | ||
![]() |
82c9379b6c | ||
![]() |
c1730dc50a | ||
![]() |
20695098c8 | ||
![]() |
ee52ae001c | ||
![]() |
26115aac5d | ||
![]() |
ca6b27aed2 | ||
![]() |
4fabe22173 | ||
![]() |
7b1a22147e | ||
![]() |
dc24540ed1 | ||
![]() |
92eae30f4d | ||
![]() |
79ef08f631 | ||
![]() |
e3c5f8374b | ||
![]() |
6dc68b4193 | ||
![]() |
afab4d888f | ||
![]() |
c751dfd65d | ||
![]() |
dbca1347f1 | ||
![]() |
3b6315ce1f | ||
![]() |
3c1db5f250 | ||
![]() |
562e9b7bf3 | ||
![]() |
a83e72692f | ||
![]() |
bd99a7dc8c | ||
![]() |
db2d52a792 | ||
![]() |
24602edc17 | ||
![]() |
b0b40d9a00 | ||
![]() |
71b105ceb1 | ||
![]() |
ccb4956145 | ||
![]() |
3d09cb0a88 | ||
![]() |
a03c2d825b | ||
![]() |
06fb242e23 | ||
![]() |
a086952244 | ||
![]() |
2b314064ae | ||
![]() |
439990be88 | ||
![]() |
41d8186c7e | ||
![]() |
6e9276229f | ||
![]() |
636f5eb882 | ||
![]() |
963ef5414c | ||
![]() |
975812d246 | ||
![]() |
089668ec73 | ||
![]() |
cc0ce38acc | ||
![]() |
8cdff55b80 | ||
![]() |
662bee7193 | ||
![]() |
f8172f85b1 | ||
![]() |
7d3ea12b62 | ||
![]() |
59dc9085d1 | ||
![]() |
4e4f33a297 | ||
![]() |
8fa599215b | ||
![]() |
31e2409d6b | ||
![]() |
15c304225f | ||
![]() |
e1998e3b58 | ||
![]() |
5c447f2499 | ||
![]() |
9d0ffb9cc6 | ||
![]() |
2be50baf97 | ||
![]() |
a1772ca406 | ||
![]() |
30eda92a53 | ||
![]() |
1f058f1014 | ||
![]() |
84d0477cb9 | ||
![]() |
1c93e75375 | ||
![]() |
380ed8bebf | ||
![]() |
98e8978857 | ||
![]() |
56ddfbea6e | ||
![]() |
45a2240ead | ||
![]() |
f75ba55b51 | ||
![]() |
46e6115d72 | ||
![]() |
800a72878a | ||
![]() |
649f7b7fd3 | ||
![]() |
c1b734a3e1 | ||
![]() |
cf806748ec | ||
![]() |
b28dc011e0 | ||
![]() |
ee4fef3768 | ||
![]() |
058a023fae | ||
![]() |
0c367fef94 | ||
![]() |
a418d290f1 | ||
![]() |
08cb30801c | ||
![]() |
788de4f7ba | ||
![]() |
ebce0a16f6 | ||
![]() |
df546bd58c | ||
![]() |
05221e9056 | ||
![]() |
e963714de6 | ||
![]() |
dc11239ff1 | ||
![]() |
d59841618d | ||
![]() |
8d3964782a | ||
![]() |
162c039e9d | ||
![]() |
13648f8ccd | ||
![]() |
5b809a3104 | ||
![]() |
3daa54d636 | ||
![]() |
8f1829d1d2 | ||
![]() |
6efb6addf2 | ||
![]() |
d789097af0 | ||
![]() |
4bd2d49ca1 | ||
![]() |
ecfede9b3c | ||
![]() |
cb04619de2 | ||
![]() |
61e2e86aef | ||
![]() |
9b86eecb94 | ||
![]() |
35212da048 | ||
![]() |
755e743cdd | ||
![]() |
1a323390ec | ||
![]() |
23559fd118 | ||
![]() |
d994a873a4 | ||
![]() |
b6575ce0b0 | ||
![]() |
e2b2a84497 | ||
![]() |
86956c2261 | ||
![]() |
ef6dfdc7fd | ||
![]() |
f3b85ef79d | ||
![]() |
1d7e42ee9f | ||
![]() |
6dfb5b4e1f | ||
![]() |
930085751c | ||
![]() |
258c4686b2 | ||
![]() |
600d0b1303 | ||
![]() |
2f928797cf | ||
![]() |
f3f06e823c | ||
![]() |
58292f49c5 | ||
![]() |
5376d1047c | ||
![]() |
1746b57161 | ||
![]() |
0561bffab3 | ||
![]() |
968e943eac | ||
![]() |
5be00c95a7 | ||
![]() |
c80b9c3778 | ||
![]() |
536f98a766 | ||
![]() |
c4e5613a7d | ||
![]() |
bff962398d | ||
![]() |
2b15823dab | ||
![]() |
59dcc7e191 | ||
![]() |
ea3fe98867 | ||
![]() |
4f05613fbb | ||
![]() |
22e52ddd6e | ||
![]() |
1125d45397 | ||
![]() |
44d408204a | ||
![]() |
50feea3eef | ||
![]() |
ca95f58ac0 | ||
![]() |
ed636cbe44 | ||
![]() |
738e4f410c | ||
![]() |
4e731a0189 | ||
![]() |
5cf6a539fe | ||
![]() |
17fde12fb8 | ||
![]() |
5c8b973d4f | ||
![]() |
b22e03b2b2 | ||
![]() |
a2926ebe7c | ||
![]() |
c508d70258 | ||
![]() |
f5971f54ff | ||
![]() |
c5b16d4468 | ||
![]() |
3c71a1bab7 | ||
![]() |
3ec322685b | ||
![]() |
9a39839a43 | ||
![]() |
e87c996fe0 | ||
![]() |
32195c673d | ||
![]() |
b99a61c5b0 | ||
![]() |
c960cd41e8 | ||
![]() |
a29471d0f7 | ||
![]() |
ba6f20a244 | ||
![]() |
61572a1f97 | ||
![]() |
dee3844f13 | ||
![]() |
cbd1a77ec2 | ||
![]() |
33f7ac06c3 | ||
![]() |
70f10f1ac9 | ||
![]() |
775b60fa09 | ||
![]() |
66e4d391d3 | ||
![]() |
caf880be18 | ||
![]() |
c8355c27e9 | ||
![]() |
c2d7e2ae17 | ||
![]() |
98ecad0da6 | ||
![]() |
bbc4e05434 | ||
![]() |
ad6e28073c | ||
![]() |
af29dcbafb | ||
![]() |
b9a7f4e502 | ||
![]() |
51009a40b4 | ||
![]() |
2ec8f77f21 | ||
![]() |
7f62028d66 | ||
![]() |
d34fe06fb0 | ||
![]() |
2f3d520571 | ||
![]() |
48dd0c5673 | ||
![]() |
8be493296d | ||
![]() |
6f33531861 | ||
![]() |
16897354bc | ||
![]() |
823a0454a6 | ||
![]() |
6790c559af | ||
![]() |
c56c4a0a47 | ||
![]() |
45064c5778 | ||
![]() |
7aba59f577 | ||
![]() |
59b05ac383 | ||
![]() |
9b15f1be26 | ||
![]() |
38cd2d781f | ||
![]() |
2f285b3f16 | ||
![]() |
57d2fb41d0 | ||
![]() |
0f77fe55b6 | ||
![]() |
68ee002ad0 | ||
![]() |
1fc3b18592 | ||
![]() |
5a5287ef2a |
@@ -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 - 2007, Daniel Stenberg, <daniel@haxx.se>.
|
||||
Copyright (c) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
9
CVS-INFO
9
CVS-INFO
@@ -12,8 +12,8 @@ inner sanctum.
|
||||
|
||||
Compile and build instructions follow below.
|
||||
|
||||
CHANGES.0 contains ancient changes.
|
||||
CHANGES.$year contains changes for the particular year.
|
||||
CHANGES.0 contains ancient changes
|
||||
CHANGES contains the most recent changes
|
||||
|
||||
Makefile.dist is included as the root Makefile in distribution archives
|
||||
|
||||
@@ -49,9 +49,8 @@ installed:
|
||||
|
||||
If you don't have nroff and perl and you for some reason don't want to
|
||||
install them, you can rename the source file src/hugehelp.c.cvs to
|
||||
src/hugehelp.c and avoid having to generate this file. This will of course
|
||||
give you an older version of the file that isn't up-to-date. That file was
|
||||
checked in once and won't be updated very regularly.
|
||||
src/hugehelp.c and avoid having to generate this file. This will give you
|
||||
a stubbed version of the file that doesn't contain actual content.
|
||||
|
||||
MAC OS X
|
||||
|
||||
|
17
Makefile.am
17
Makefile.am
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2008, 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
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat libcurl.pc.in
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
|
||||
libcurl.pc.in vc6curl.dsw
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
@@ -72,7 +75,7 @@ test-torture:
|
||||
endif
|
||||
|
||||
examples:
|
||||
@(cd docs/examples; $(MAKE) all)
|
||||
@(cd docs/examples; $(MAKE) check)
|
||||
|
||||
#
|
||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||
@@ -131,3 +134,11 @@ install-data-hook:
|
||||
uninstall-hook:
|
||||
cd include && $(MAKE) uninstall
|
||||
cd docs && $(MAKE) uninstall
|
||||
|
||||
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 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2008, 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
|
||||
@@ -128,6 +128,12 @@ vc:
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC)
|
||||
|
||||
vc-x64:
|
||||
cd lib
|
||||
MACHINE=x64 nmake /f Makefile.$(VC) cfg=release
|
||||
cd ..\src
|
||||
MACHINE=x64 nmake /f Makefile.$(VC)
|
||||
|
||||
vc-zlib:
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||
@@ -251,6 +257,14 @@ 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
|
||||
@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
|
||||
|
||||
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
|
||||
|
||||
|
118
RELEASE-NOTES
118
RELEASE-NOTES
@@ -1,53 +1,69 @@
|
||||
Curl and libcurl 7.17.1
|
||||
Curl and libcurl 7.19.0
|
||||
|
||||
Public curl release number: 102
|
||||
Releases counted from the very beginning: 128
|
||||
Available command line options: 121
|
||||
Available curl_easy_setopt() options: 147
|
||||
Number of public functions in libcurl: 55
|
||||
Amount of public web site mirrors: 43
|
||||
Number of known libcurl bindings: 36
|
||||
Number of contributors: 588
|
||||
Public curl releases: 106
|
||||
Command line options: 127
|
||||
curl_easy_setopt() options: 153
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 36
|
||||
Contributors: 654
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o automatically append ";type=<a|i>" when using HTTP proxies for FTP urls
|
||||
o improved NSS support
|
||||
o added --proxy-negotiate
|
||||
o added --post301 and CURLOPT_POST301
|
||||
o builds with c-ares 1.5.0
|
||||
o added CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 and --hostpubmd5
|
||||
o renamed CURLE_SSL_PEER_CERTIFICATE to CURLE_PEER_FAILED_VERIFICATION
|
||||
o added CURLOPT_OPENSOCKETFUNCTION and CURLOPT_OPENSOCKETDATA
|
||||
o CULROPT_COOKIELIST supports "FLUSH"
|
||||
o added CURLOPT_COPYPOSTFIELDS
|
||||
o added --static-libs to curl-config
|
||||
o curl_off_t gets its size/typedef somewhat differently than before. This _may_
|
||||
cause an ABI change for you. See lib/README.curl_off_t for a full explanation.
|
||||
|
||||
o Added CURLINFO_PRIMARY_IP
|
||||
o Added CURLOPT_CRLFILE and CURLE_SSL_CRL_BADFILE
|
||||
o Added CURLOPT_ISSUERCERT and CURLE_SSL_ISSUER_ERROR
|
||||
o curl's option parser for boolean options reworked
|
||||
o Added --remote-name-all
|
||||
o Now builds for the INTEGRITY operating system
|
||||
o Added CURLINFO_APPCONNECT_TIME
|
||||
o Added test selection by key word in runtests.pl
|
||||
o the curl tool's -w option support the %{ssl_verify_result} variable
|
||||
o Added CURLOPT_ADDRESS_SCOPE and scope parsing of the URL according to RFC4007
|
||||
o Support --append on SFTP uploads (not with OpenSSH, though)
|
||||
o Added curlbuild.h and curlrules.h to the external library interface
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o curl-config --protocols now properly reports LDAPS, SCP and SFTP
|
||||
o ldapv3 support on Windows
|
||||
o ldap builds with the MSVC makefiles
|
||||
o no HOME and no key given caused SSH auth failure
|
||||
o Negotiate authentication over proxy
|
||||
o --ftp-method nocwd on directory listings
|
||||
o FTP, CURLOPT_NOBODY enabled and CURLOPT_HEADER disabled now does TYPE
|
||||
before SIZE
|
||||
o re-used handle transfers with SFTP
|
||||
o curl_easy_escape() problem with byte values >= 128
|
||||
o handles chunked-encoded CONNECT responses
|
||||
o misuse of ares_timeout() result
|
||||
o --local-port on TFTP transfers
|
||||
o CURLOPT_POSTFIELDS could fail to send binary data
|
||||
o specifying a proxy with a trailing slash didn't work (unless it also
|
||||
contained a port number)
|
||||
o redirect from HTTP to FTP or TFTP memory problems and leaks
|
||||
o re-used connections a bit too much when using non-SSL protocols tunneled
|
||||
over a HTTP proxy
|
||||
o embed the manifest in VC8 builds
|
||||
o use valgrind in the tests even when the lib is built shared with libtool
|
||||
o libcurl built with NSS can now ignore the peer verification even when the
|
||||
ca cert bundle is absent
|
||||
o Fixed curl-config --ca
|
||||
o Fixed the multi interface connection re-use with NSS-built libcurl
|
||||
o connection re-use when using the multi interface with pipelining enabled
|
||||
o curl_multi_socket() socket callback fix for close/re-create sockets case
|
||||
o SCP or SFTP over socks proxy crashed
|
||||
o RC4-MD5 cipher now works with NSS-built libcurl
|
||||
o range requests with --head are now done correctly
|
||||
o fallback to gettimeofday when monotonic clock is unavailable at run-time
|
||||
o range numbers could be made to wrongly get output as signed
|
||||
o unexpected 1xx responses hung transfers
|
||||
o FTP transfers segfault when using different CURLOPT_FTP_FILEMETHOD
|
||||
o c-ares powered libcurls can resolve/use IPv6 addresses
|
||||
o poll not working on Windows Vista due to POLLPRI being incorrectly used
|
||||
o user-agent in CONNECT with non-HTTP protocols
|
||||
o CURL_READFUNC_PAUSE problems fixed
|
||||
o --use-ascii now works on Symbian OS, MS-DOS and OS/2
|
||||
o CURLINFO_SSL_VERIFYRESULT is fixed
|
||||
o FTP URLs and IPv6 URLs mangled when sent to proxy with CURLOPT_PORT set
|
||||
o a user name in a proxy URL without a password was parsed incorrectly
|
||||
o library will now be built with _REENTRANT symbol defined only if needed
|
||||
o no longer link with gdi32 on Windows cross-compiled targets
|
||||
o HTTP PUT with -C - sent bad Content-Range: header
|
||||
o HTTP PUT or POST with redirect could lead to hang
|
||||
o re-use of connections with failed SSL connects in the multi interface
|
||||
o NTLM over proxy state was wrongly cleared when host connection was closed
|
||||
o Windows SSPI DLL loading is now done in curl_global_init()
|
||||
o runtests.pl has an improved find-stunnel-and-invoke
|
||||
o FTP sessions could go out of sync on a long header boundary condition
|
||||
o potential buffer overflows in the MS-DOS command-line port fixed
|
||||
o --stderr is now honoured with the -v option
|
||||
o memory leak in libcurl on Windows built with OpenSSL
|
||||
o improved curl_m*printf() integral data type size and signedness handling
|
||||
o error when --dump-header - used with more than one URL
|
||||
o proxy closing connect during CONNECT with auth with the multi interface
|
||||
o CURLOPT_UPLOAD sets HTTP method back to GET or HEAD when passed in a 0
|
||||
o shared cookies could get locked twice
|
||||
o deal with closed connection while doing POST/PUT
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -57,16 +73,16 @@ Other curl-related news:
|
||||
|
||||
o
|
||||
|
||||
New curl mirrors:
|
||||
|
||||
o http://curl.wetzlmayr.at/ is a new web mirror in Nuremberg, Germany
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Dan Fandrich, Michal Marek, G<>nter Knauf, Rob Crittenden, Immanuel Gregoire,
|
||||
Mark Davies, Max Katsev, Philip Langdale, Alex Fishman, Johnny Luong,
|
||||
Alexey Pesternikov, Yang Tse, Kim Rinnewitz, Michael Wallner,
|
||||
Patrick Monnerat, Vladimir Lazarenko
|
||||
Lenny Rachitsky, Axel Tillequin, Arnaud Ebalard, Yang Tse, Dan Fandrich,
|
||||
Rob Crittenden, Dengminwen, Christopher Palow, Hans-Jurgen May,
|
||||
Phil Pellouchoud, Eduard Bloch, John Lightsey, Stephen Collyer, Tor Arntsen,
|
||||
Rolland Dudemaine, Phil Blundell, Scott Barrett, Andreas Schuldei,
|
||||
Peter Lamberg, David Bau, Pramod Sharma, Yehoshua Hershberg,
|
||||
Constantine Sapuntzakis, Lars Nilsson, Andy Tsouladze, Jamie Lokier,
|
||||
Vincent Le Normand
|
||||
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
26
TODO-RELEASE
26
TODO-RELEASE
@@ -1,4 +1,26 @@
|
||||
To be addressed before 7.17.1 (planned release: late October 2007)
|
||||
To be addressed before 7.19.0 (planned release: August 2008)
|
||||
=============================
|
||||
|
||||
106 -
|
||||
|
||||
To be addressed before 7.19.1 (planned release: October 2008)
|
||||
=============================
|
||||
|
||||
157 - the CERTINFO patch as posted to:
|
||||
http://curl.haxx.se/mail/lib-2008-08/0105.html
|
||||
|
||||
158 - Martin Drasar's CURLOPT_POSTREDIR work:
|
||||
http://curl.haxx.se/mail/lib-2008-08/0170.html
|
||||
|
||||
162 - Craig Perras' note "http upload: how to stop on error"
|
||||
http://curl.haxx.se/mail/archive-2008-08/0138.html
|
||||
|
||||
163 - Detecting illegal attempts at chunked transfers on HTTP 1.0
|
||||
(tests 1069, 1072, 1073)
|
||||
http://curl.haxx.se/mail/archive-2008-08/0435.html
|
||||
|
||||
164 - Automatic downgrading to HTTP 1.0 (tests 1071 through 1074)
|
||||
|
||||
165 - "Problem with CURLOPT_RESUME_FROM and CURLOPT_APPEND" by Daniele Pinau,
|
||||
recipe: http://curl.haxx.se/mail/lib-2008-08/0439.html
|
||||
|
||||
166 -
|
||||
|
2560
acinclude.m4
2560
acinclude.m4
File diff suppressed because it is too large
Load Diff
@@ -21,3 +21,4 @@ depcomp
|
||||
libcares.la
|
||||
missing
|
||||
ares_version.h.dist
|
||||
libcares.pc
|
||||
|
47
ares/AUTHORS
47
ares/AUTHORS
@@ -1,28 +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
|
||||
Nick Mathewson
|
||||
Phil Blundell
|
||||
Ravi Pratap
|
||||
Robin Cornelius
|
||||
Sebastian at basti79.de
|
||||
Shmulik Regev
|
||||
Ashish Sharma
|
||||
Brad Spencer
|
||||
Steinar H. Gunderson
|
||||
Tofu Linden
|
||||
Vlad Dinulescu
|
||||
William Ahern
|
||||
Yang Tse
|
||||
liren at vivisimo.com
|
||||
|
179
ares/CHANGES
179
ares/CHANGES
@@ -1,5 +1,184 @@
|
||||
Changelog for the c-ares project
|
||||
|
||||
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.
|
||||
|
||||
Version 1.5.2 (May 29, 2008)
|
||||
|
||||
* May 13 2008 (Daniel Stenberg)
|
||||
|
||||
- Introducing millisecond resolution support for the timeout option. See
|
||||
ares_init_options()'s ARES_OPT_TIMEOUTMS.
|
||||
|
||||
* May 9 2008 (Yang Tse)
|
||||
|
||||
- Use monotonic time source if available, for private function ares__tvnow()
|
||||
|
||||
* May 7 2008 (Daniel Stenberg)
|
||||
|
||||
- Sebastian made c-ares able to return all PTR-records when doing reverse
|
||||
lookups. It is not common practice to have multiple PTR-Records for a single
|
||||
IP, but its perfectly legal and some sites have those.
|
||||
|
||||
- Doug Goldstein provided a configure patch: updates autoconf 2.13 usage to
|
||||
autoconf 2.57 usage (which is the version you have specified as the minimum
|
||||
version). It's a minor change but it does clean up some warnings with newer
|
||||
autoconf (specifically 2.62).
|
||||
|
||||
* May 5 2008 (Yang Tse)
|
||||
|
||||
- Improved parsing of resolver configuration files.
|
||||
|
||||
* April 4 2008 (Daniel Stenberg)
|
||||
|
||||
- Eino Tuominen improved the code when a file is used to seed the randomizer.
|
||||
|
||||
- Alexey Simak made adig support NAPTR records
|
||||
|
||||
- Alexey Simak fixed the VC dsp file by adding the missing source file
|
||||
ares_expand_string.c
|
||||
|
||||
* December 11 2007 (Gisle Vanem)
|
||||
|
||||
- Added another sample application; acountry.c which converts an
|
||||
IPv4-address(es) and/or host-name(s) to country-name and country-code.
|
||||
This uses the service of the DNSBL at countries.nerd.dk.
|
||||
|
||||
* December 3 2007 (Daniel Stenberg)
|
||||
|
||||
- Brad Spencer fixed the configure script to assume that there's no
|
||||
/dev/urandom when built cross-compiled as then the script cannot check for
|
||||
it.
|
||||
|
||||
- Erik Kline cleaned up ares_gethostbyaddr.c:next_lookup() somewhat
|
||||
|
||||
Version 1.5.1 (Nov 21, 2007)
|
||||
|
||||
* November 21 2007 (Daniel Stenberg)
|
||||
|
||||
- Robin Cornelius pointed out that ares_llist.h was missing in the release
|
||||
archive for 1.5.0
|
||||
|
||||
Version 1.5.0 (Nov 21, 2007)
|
||||
|
||||
* October 2 2007 (Daniel Stenberg)
|
||||
|
||||
- ares_strerror() segfaulted if the input error number was out of the currently
|
||||
|
35
ares/FILES
35
ares/FILES
@@ -1,35 +0,0 @@
|
||||
*.c
|
||||
*.h
|
||||
*.3
|
||||
NEWS
|
||||
README
|
||||
README.cares
|
||||
CHANGES
|
||||
FILES
|
||||
maketgz
|
||||
aclocal.m4
|
||||
acinclude.m4
|
||||
Makefile.in
|
||||
Makefile.dj
|
||||
Makefile.m32
|
||||
Makefile.netware
|
||||
Makefile.vc6
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
configure
|
||||
configure.ac
|
||||
config.guess
|
||||
config.sub
|
||||
vc/adig/adig.dep
|
||||
vc/adig/adig.dsp
|
||||
vc/adig/adig.mak
|
||||
vc/adig/adig.plg
|
||||
vc/vc.dsw
|
||||
vc/ahost/ahost.dep
|
||||
vc/ahost/ahost.dsp
|
||||
vc/ahost/ahost.mak
|
||||
vc/ahost/ahost.plg
|
||||
vc/areslib/areslib.dep
|
||||
vc/areslib/areslib.dsp
|
||||
vc/areslib/areslib.mak
|
||||
vc/areslib/areslib.plg
|
@@ -1,18 +1,54 @@
|
||||
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
|
||||
|
||||
man_MANS = $(MANPAGES)
|
||||
|
||||
MSVCFILES = vc/adig/adig.dep vc/adig/adig.dsp vc/vc.dsw vc/ahost/ahost.dep \
|
||||
vc/ahost/ahost.dsp vc/areslib/areslib.dep vc/areslib/areslib.dsp \
|
||||
vc/areslib/areslib.dsw
|
||||
MSVCFILES = vc/vc.dsw vc/acountry/acountry.dsp vc/adig/adig.dsp \
|
||||
vc/ahost/ahost.dsp vc/areslib/areslib.dsp vc/areslib/areslib.dsw
|
||||
|
||||
if DEBUGBUILD
|
||||
PROGS =
|
||||
else
|
||||
PROGS = ahost adig acountry
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS =$(PROGS)
|
||||
|
||||
# adig and ahost are just sample programs and thus not mentioned with the
|
||||
# regular sources and headers
|
||||
EXTRA_DIST = CHANGES README.cares Makefile.inc adig.c ahost.c $(man_MANS) \
|
||||
$(MSVCFILES) AUTHORS config-win32.h RELEASE-NOTES libcares.pc.in
|
||||
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
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcares.pc
|
||||
|
||||
VER=-version-info 2:0:0
|
||||
# This flag accepts an argument of the form current[:revision[:age]]. So,
|
||||
@@ -61,6 +97,15 @@ libcares_ladir = $(includedir)
|
||||
# what headers to install on 'make install':
|
||||
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h
|
||||
|
||||
ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h
|
||||
ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
|
||||
adig_SOURCES = adig.c ares_getopt.c ares_getopt.h
|
||||
adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
|
||||
acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h
|
||||
acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
|
||||
# Make files named *.dist replace the file without .dist extension
|
||||
dist-hook:
|
||||
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||
|
@@ -10,19 +10,25 @@ include ../packages/DOS/common.dj
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \
|
||||
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_SYS_UIO_H -DHAVE_NETINET_IN_H \
|
||||
-DHAVE_NETINET_TCP_H -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND \
|
||||
-DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' \
|
||||
-DHAVE_PROCESS_H -DHAVE_ARPA_NAMESER_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' \
|
||||
-DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \
|
||||
-DSEND_TYPE_ARG4='int' -DSEND_TYPE_RETV='int' \
|
||||
-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 -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
|
||||
|
||||
LDFLAGS = -s
|
||||
|
||||
@@ -49,7 +55,7 @@ EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
|
||||
|
||||
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
||||
|
||||
all: $(OBJ_DIR) libcares.a ahost.exe adig.exe
|
||||
all: $(OBJ_DIR) libcares.a ahost.exe adig.exe acountry.exe
|
||||
@echo Welcome to c-ares.
|
||||
|
||||
libcares.a: $(OBJECTS)
|
||||
@@ -61,11 +67,14 @@ ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||
|
||||
acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) libcares.a
|
||||
|
||||
vclean realclean: clean
|
||||
rm -f ahost.exe adig.exe depend.dj
|
||||
rm -f ahost.exe adig.exe acountry.exe depend.dj
|
||||
- rmdir $(OBJ_DIR)
|
||||
|
||||
-include depend.dj
|
||||
|
@@ -6,11 +6,11 @@ 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_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_parse_ns_reply.c ares_llist.c ares__timeval.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
|
||||
setup_once.h ares_llist.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 \
|
||||
|
@@ -32,7 +32,7 @@ $(LIB): $(OBJLIB)
|
||||
|
||||
all: $(LIB) demos
|
||||
|
||||
demos: adig.exe ahost.exe
|
||||
demos: adig.exe ahost.exe acountry.exe
|
||||
|
||||
tags:
|
||||
etags *.[ch]
|
||||
@@ -61,7 +61,7 @@ install:
|
||||
done)
|
||||
|
||||
clean:
|
||||
$(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe
|
||||
$(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe acountry.exe
|
||||
|
||||
distclean: clean
|
||||
$(RM) config.cache config.log config.status Makefile
|
||||
|
@@ -14,14 +14,14 @@ NDKBASE = c:/novell
|
||||
endif
|
||||
|
||||
ifndef INSTDIR
|
||||
INSTDIR = ../curl-$(LIBCURL_VERSION_STR)-bin-nw
|
||||
INSTDIR = ../ares-$(LIBCARES_VERSION_STR)-bin-nw
|
||||
endif
|
||||
|
||||
# Edit the vars below to change NLM target settings.
|
||||
TARGETS = adig.nlm ahost.nlm
|
||||
TARGETS = adig.nlm ahost.nlm acountry.nlm
|
||||
LTARGET = libcares.$(LIBEXT)
|
||||
VERSION = $(LIBCARES_VERSION)
|
||||
COPYR = Copyright (C) 1996 - 2007, Daniel Stenberg, <daniel@haxx.se>
|
||||
COPYR = Copyright (C) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>
|
||||
DESCR = cURL $(subst .def,,$(notdir $@)) $(LIBCARES_VERSION_STR) - http://curl.haxx.se
|
||||
MTSAFE = YES
|
||||
STACK = 64000
|
||||
@@ -63,18 +63,19 @@ else
|
||||
CC = gcc
|
||||
endif
|
||||
# a native win32 awk can be downloaded from here:
|
||||
# http://www.gknw.net/development/prgtools/awk-20050424.zip
|
||||
# http://www.gknw.net/development/prgtools/awk-20070501.zip
|
||||
AWK = awk
|
||||
YACC = bison -y
|
||||
CP = cp -afv
|
||||
MKDIR = mkdir
|
||||
# RM = rm -f
|
||||
# if you want to mark the target as MTSAFE you will need a tool for
|
||||
# generating the xdc data for the linker; here's a minimal tool:
|
||||
# http://www.gknw.com/development/prgtools/mkxdc.zip
|
||||
# http://www.gknw.net/development/prgtools/mkxdc.zip
|
||||
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
|
||||
@@ -161,10 +162,6 @@ nlm: prebuild $(TARGETS)
|
||||
|
||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h
|
||||
|
||||
dist: all
|
||||
-$(RM) $(OBJLIB) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
|
||||
-$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
|
||||
|
||||
install: $(INSTDIR) all
|
||||
@$(CP) *.nlm $(INSTDIR)
|
||||
@$(CP) ../CHANGES $(INSTDIR)
|
||||
@@ -190,11 +187,8 @@ endif
|
||||
@-$(RM) $@
|
||||
@$(LD) $(LDFLAGS) $<
|
||||
|
||||
$(INSTDIR):
|
||||
@mkdir $(INSTDIR)
|
||||
|
||||
$(OBJDIR):
|
||||
@mkdir $(OBJDIR)
|
||||
$(OBJDIR) $(INSTDIR):
|
||||
@$(MKDIR) $@
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
# @echo Compiling $<
|
||||
@@ -202,7 +196,7 @@ $(OBJDIR)/%.o: %.c
|
||||
|
||||
$(OBJDIR)/version.inc: ares_version.h $(OBJDIR)
|
||||
@echo Creating $@
|
||||
@$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
|
||||
@$(AWK) -f get_ver.awk $< > $@
|
||||
|
||||
$(OBJDIR)/%.xdc: Makefile.netware
|
||||
@echo Creating $@
|
||||
@@ -269,8 +263,9 @@ ifdef IMPORTS
|
||||
@echo $(DL)import $(IMPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)input $(OBJEXE)$(DL) >> $@
|
||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||
@echo $(DL)input $(OBJEXE)$(DL) >> $@
|
||||
@echo $(DL)input $(@:.def=.o)$(DL) >> $@
|
||||
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
||||
endif
|
||||
|
||||
@@ -287,20 +282,25 @@ 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 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) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define DL_LDAP_FILE "ldapsdk.nlm"$(DL) >> $@
|
||||
@echo $(DL)#define socklen_t int$(DL) >> $@
|
||||
@echo $(DL)#define strncasecmp strnicmp$(DL) >> $@
|
||||
@echo $(DL)#define strcasecmp stricmp$(DL) >> $@
|
||||
@@ -331,6 +331,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) >> $@
|
||||
@@ -338,7 +346,6 @@ else
|
||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
|
||||
@echo $(DL)#define DL_LDAP_FILE "lldapsdk.nlm"$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@
|
||||
@@ -357,6 +364,7 @@ endif
|
||||
@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) >> $@
|
||||
@@ -380,7 +388,6 @@ endif
|
||||
@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_UTIME_H 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) >> $@
|
||||
|
@@ -62,6 +62,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\ares_init.obj \
|
||||
$(OBJ_DIR)\ares_llist.obj \
|
||||
$(OBJ_DIR)\ares_timeout.obj \
|
||||
$(OBJ_DIR)\ares__timeval.obj \
|
||||
$(OBJ_DIR)\ares_destroy.obj \
|
||||
$(OBJ_DIR)\ares_mkquery.obj \
|
||||
$(OBJ_DIR)\ares_version.obj \
|
||||
@@ -76,7 +77,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\inet_net_pton.obj \
|
||||
$(OBJ_DIR)\inet_ntop.obj
|
||||
|
||||
all: $(OBJ_DIR) cares.lib cares.dll cares_imp.lib ahost.exe adig.exe
|
||||
all: $(OBJ_DIR) cares.lib cares.dll cares_imp.lib ahost.exe adig.exe acountry.exe
|
||||
@echo Welcome to c-ares library and examples
|
||||
|
||||
$(OBJ_DIR):
|
||||
@@ -110,6 +111,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 >> $@
|
||||
@@ -122,7 +124,6 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
||||
@echo ares_inet_pton >> $@
|
||||
@echo ares_writev >> $@
|
||||
@echo ares_getnameinfo >> $@
|
||||
@echo ares_gettimeofday >> $@
|
||||
@echo ares_parse_aaaa_reply >> $@
|
||||
|
||||
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||
@@ -131,11 +132,15 @@ ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.
|
||||
adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
||||
|
||||
acountry.exe: $(OBJ_DIR) $(OBJ_DIR)\acountry.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\acountry.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
||||
|
||||
clean:
|
||||
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
|
||||
|
||||
vclean realclean: clean
|
||||
- del $(DEF_FILE) cares.lib cares_imp.* cares.dll ahost.exe adig.exe
|
||||
- del $(DEF_FILE) cares.lib cares_imp.* cares.dll
|
||||
- del ahost.exe adig.exe acountry.exe
|
||||
- rd $(OBJ_DIR)
|
||||
|
||||
.c{$(OBJ_DIR)}.obj:
|
||||
@@ -190,6 +195,9 @@ $(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \
|
||||
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.h
|
||||
|
||||
$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.h
|
||||
|
||||
$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.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.
|
||||
|
@@ -1,9 +1,10 @@
|
||||
This is what's new and changed in the c-ares 1.4.1 release:
|
||||
This is what's new and changed in the c-ares 1.5.4 release:
|
||||
|
||||
o
|
||||
|
||||
Thanks go to these friendly people for their efforts and contributions:
|
||||
|
||||
|
||||
and obviously Daniel Stenberg
|
||||
|
||||
Have fun!
|
||||
|
1290
ares/acinclude.m4
1290
ares/acinclude.m4
File diff suppressed because it is too large
Load Diff
596
ares/acountry.c
Normal file
596
ares/acountry.c
Normal file
@@ -0,0 +1,596 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* IP-address/hostname to country converter.
|
||||
*
|
||||
* Problem; you want to know where IP a.b.c.d is located.
|
||||
*
|
||||
* Use ares_gethostbyname ("d.c.b.a.zz.countries.nerd.dk")
|
||||
* and get the CNAME (host->h_name). Result will be:
|
||||
* CNAME = zz<CC>.countries.nerd.dk with address 127.0.x.y (ver 1) or
|
||||
* CNAME = <a.b.c.d>.zz.countries.nerd.dk with address 127.0.x.y (ver 2)
|
||||
*
|
||||
* The 2 letter country code in <CC> and the ISO-3166 country
|
||||
* number in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
||||
* the <CC> number.
|
||||
*
|
||||
* Ref: http://countries.nerd.dk/more.html
|
||||
*
|
||||
* Written by G. Vanem <gvanem@broadpark.no> 2006, 2007
|
||||
*
|
||||
* NB! This program may not be big-endian aware.
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_getopt.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "inet_ntop.h"
|
||||
|
||||
#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;
|
||||
static const char *nerd_ver2 = nerd_fmt + 11;
|
||||
static int verbose = 0;
|
||||
|
||||
#define TRACE(fmt) do { \
|
||||
if (verbose > 0) \
|
||||
printf fmt ; \
|
||||
} while (0)
|
||||
|
||||
static void wait_ares(ares_channel channel);
|
||||
static void callback(void *arg, int status, int timeouts, struct hostent *host);
|
||||
static void callback2(void *arg, int status, int timeouts, struct hostent *host);
|
||||
static void find_country_from_cname(const char *cname, struct in_addr addr);
|
||||
|
||||
static void Abort(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
va_end(args);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
ares_channel channel;
|
||||
int ch, status;
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
|
||||
WSADATA wsaData;
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
while ((ch = ares_getopt(argc, argv, "dvh?")) != -1)
|
||||
switch (ch)
|
||||
{
|
||||
case 'd':
|
||||
#ifdef WATT32
|
||||
dbug_init();
|
||||
#endif
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
default:
|
||||
Abort(usage);
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
if (argc < 1)
|
||||
Abort(usage);
|
||||
|
||||
status = ares_init(&channel);
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
fprintf(stderr, "ares_init: %s\n", ares_strerror(status));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Initiate the queries, one per command-line argument. */
|
||||
for ( ; *argv; argv++)
|
||||
{
|
||||
struct in_addr addr;
|
||||
char buf[100];
|
||||
|
||||
/* If this fails, assume '*argv' is a host-name that
|
||||
* must be resolved first
|
||||
*/
|
||||
if (ares_inet_pton(AF_INET, *argv, &addr) != 1)
|
||||
{
|
||||
ares_gethostbyname(channel, *argv, AF_INET, callback2, &addr);
|
||||
wait_ares(channel);
|
||||
if (addr.s_addr == INADDR_NONE)
|
||||
{
|
||||
printf("Failed to lookup %s\n", *argv);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(buf, nerd_fmt,
|
||||
(unsigned int)(addr.s_addr >> 24),
|
||||
(unsigned int)((addr.s_addr >> 16) & 255),
|
||||
(unsigned int)((addr.s_addr >> 8) & 255),
|
||||
(unsigned int)(addr.s_addr & 255));
|
||||
TRACE(("Looking up %s...", buf));
|
||||
fflush(stdout);
|
||||
ares_gethostbyname(channel, buf, AF_INET, callback, buf);
|
||||
}
|
||||
|
||||
wait_ares(channel);
|
||||
ares_destroy(channel);
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for the queries to complete.
|
||||
*/
|
||||
static void wait_ares(ares_channel channel)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
struct timeval *tvp, tv;
|
||||
fd_set read_fds, write_fds;
|
||||
int nfds;
|
||||
|
||||
FD_ZERO(&read_fds);
|
||||
FD_ZERO(&write_fds);
|
||||
nfds = ares_fds(channel, &read_fds, &write_fds);
|
||||
if (nfds == 0)
|
||||
break;
|
||||
tvp = ares_timeout(channel, NULL, &tv);
|
||||
select(nfds, &read_fds, &write_fds, NULL, tvp);
|
||||
ares_process(channel, &read_fds, &write_fds);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the callback used when we have the IP-address of interest.
|
||||
* Extract the CNAME and figure out the country-code from it.
|
||||
*/
|
||||
static void callback(void *arg, int status, int timeouts, struct hostent *host)
|
||||
{
|
||||
const char *name = (const char*)arg;
|
||||
const char *cname;
|
||||
char buf[20];
|
||||
|
||||
(void)timeouts;
|
||||
|
||||
if (!host || status != ARES_SUCCESS)
|
||||
{
|
||||
printf("Failed to lookup %s: %s\n", name, ares_strerror(status));
|
||||
return;
|
||||
}
|
||||
|
||||
TRACE(("\nFound address %s, name %s\n",
|
||||
ares_inet_ntop(AF_INET,(const char*)host->h_addr,buf,sizeof(buf)),
|
||||
host->h_name));
|
||||
|
||||
cname = host->h_name; /* CNAME gets put here */
|
||||
if (!cname)
|
||||
printf("Failed to get CNAME for %s\n", name);
|
||||
else
|
||||
find_country_from_cname(cname, *(struct in_addr*)host->h_addr);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the callback used to obtain the IP-address of the host of interest.
|
||||
*/
|
||||
static void callback2(void *arg, int status, int timeouts, struct hostent *host)
|
||||
{
|
||||
struct in_addr *addr = (struct in_addr*) arg;
|
||||
|
||||
(void)timeouts;
|
||||
if (!host || status != ARES_SUCCESS)
|
||||
memset(addr, INADDR_NONE, sizeof(*addr));
|
||||
else
|
||||
memcpy(addr, host->h_addr, sizeof(*addr));
|
||||
}
|
||||
|
||||
struct search_list {
|
||||
int country_number; /* ISO-3166 country number */
|
||||
char short_name[3]; /* A2 short country code */
|
||||
const char *long_name; /* normal country name */
|
||||
};
|
||||
|
||||
const struct search_list *list_lookup(int number, const struct search_list *list, int num)
|
||||
{
|
||||
while (num > 0 && list->long_name)
|
||||
{
|
||||
if (list->country_number == number)
|
||||
return (list);
|
||||
num--;
|
||||
list++;
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ref: ftp://ftp.ripe.net/iso3166-countrycodes.txt
|
||||
*/
|
||||
static const struct search_list country_list[] = {
|
||||
{ 4, "af", "Afghanistan" },
|
||||
{ 248, "ax", "<EFBFBD>land Island" },
|
||||
{ 8, "al", "Albania" },
|
||||
{ 12, "dz", "Algeria" },
|
||||
{ 16, "as", "American Samoa" },
|
||||
{ 20, "ad", "Andorra" },
|
||||
{ 24, "ao", "Angola" },
|
||||
{ 660, "ai", "Anguilla" },
|
||||
{ 10, "aq", "Antarctica" },
|
||||
{ 28, "ag", "Antigua & Barbuda" },
|
||||
{ 32, "ar", "Argentina" },
|
||||
{ 51, "am", "Armenia" },
|
||||
{ 533, "aw", "Aruba" },
|
||||
{ 36, "au", "Australia" },
|
||||
{ 40, "at", "Austria" },
|
||||
{ 31, "az", "Azerbaijan" },
|
||||
{ 44, "bs", "Bahamas" },
|
||||
{ 48, "bh", "Bahrain" },
|
||||
{ 50, "bd", "Bangladesh" },
|
||||
{ 52, "bb", "Barbados" },
|
||||
{ 112, "by", "Belarus" },
|
||||
{ 56, "be", "Belgium" },
|
||||
{ 84, "bz", "Belize" },
|
||||
{ 204, "bj", "Benin" },
|
||||
{ 60, "bm", "Bermuda" },
|
||||
{ 64, "bt", "Bhutan" },
|
||||
{ 68, "bo", "Bolivia" },
|
||||
{ 70, "ba", "Bosnia & Herzegowina" },
|
||||
{ 72, "bw", "Botswana" },
|
||||
{ 74, "bv", "Bouvet Island" },
|
||||
{ 76, "br", "Brazil" },
|
||||
{ 86, "io", "British Indian Ocean Territory" },
|
||||
{ 96, "bn", "Brunei Darussalam" },
|
||||
{ 100, "bg", "Bulgaria" },
|
||||
{ 854, "bf", "Burkina Faso" },
|
||||
{ 108, "bi", "Burundi" },
|
||||
{ 116, "kh", "Cambodia" },
|
||||
{ 120, "cm", "Cameroon" },
|
||||
{ 124, "ca", "Canada" },
|
||||
{ 132, "cv", "Cape Verde" },
|
||||
{ 136, "ky", "Cayman Islands" },
|
||||
{ 140, "cf", "Central African Republic" },
|
||||
{ 148, "td", "Chad" },
|
||||
{ 152, "cl", "Chile" },
|
||||
{ 156, "cn", "China" },
|
||||
{ 162, "cx", "Christmas Island" },
|
||||
{ 166, "cc", "Cocos Islands" },
|
||||
{ 170, "co", "Colombia" },
|
||||
{ 174, "km", "Comoros" },
|
||||
{ 178, "cg", "Congo" },
|
||||
{ 180, "cd", "Congo" },
|
||||
{ 184, "ck", "Cook Islands" },
|
||||
{ 188, "cr", "Costa Rica" },
|
||||
{ 384, "ci", "Cote d'Ivoire" },
|
||||
{ 191, "hr", "Croatia" },
|
||||
{ 192, "cu", "Cuba" },
|
||||
{ 196, "cy", "Cyprus" },
|
||||
{ 203, "cz", "Czech Republic" },
|
||||
{ 208, "dk", "Denmark" },
|
||||
{ 262, "dj", "Djibouti" },
|
||||
{ 212, "dm", "Dominica" },
|
||||
{ 214, "do", "Dominican Republic" },
|
||||
{ 218, "ec", "Ecuador" },
|
||||
{ 818, "eg", "Egypt" },
|
||||
{ 222, "sv", "El Salvador" },
|
||||
{ 226, "gq", "Equatorial Guinea" },
|
||||
{ 232, "er", "Eritrea" },
|
||||
{ 233, "ee", "Estonia" },
|
||||
{ 231, "et", "Ethiopia" },
|
||||
{ 238, "fk", "Falkland Islands" },
|
||||
{ 234, "fo", "Faroe Islands" },
|
||||
{ 242, "fj", "Fiji" },
|
||||
{ 246, "fi", "Finland" },
|
||||
{ 250, "fr", "France" },
|
||||
{ 249, "fx", "France, Metropolitan" },
|
||||
{ 254, "gf", "French Guiana" },
|
||||
{ 258, "pf", "French Polynesia" },
|
||||
{ 260, "tf", "French Southern Territories" },
|
||||
{ 266, "ga", "Gabon" },
|
||||
{ 270, "gm", "Gambia" },
|
||||
{ 268, "ge", "Georgia" },
|
||||
{ 276, "de", "Germany" },
|
||||
{ 288, "gh", "Ghana" },
|
||||
{ 292, "gi", "Gibraltar" },
|
||||
{ 300, "gr", "Greece" },
|
||||
{ 304, "gl", "Greenland" },
|
||||
{ 308, "gd", "Grenada" },
|
||||
{ 312, "gp", "Guadeloupe" },
|
||||
{ 316, "gu", "Guam" },
|
||||
{ 320, "gt", "Guatemala" },
|
||||
{ 324, "gn", "Guinea" },
|
||||
{ 624, "gw", "Guinea-Bissau" },
|
||||
{ 328, "gy", "Guyana" },
|
||||
{ 332, "ht", "Haiti" },
|
||||
{ 334, "hm", "Heard & Mc Donald Islands" },
|
||||
{ 336, "va", "Vatican City" },
|
||||
{ 340, "hn", "Honduras" },
|
||||
{ 344, "hk", "Hong kong" },
|
||||
{ 348, "hu", "Hungary" },
|
||||
{ 352, "is", "Iceland" },
|
||||
{ 356, "in", "India" },
|
||||
{ 360, "id", "Indonesia" },
|
||||
{ 364, "ir", "Iran" },
|
||||
{ 368, "iq", "Iraq" },
|
||||
{ 372, "ie", "Ireland" },
|
||||
{ 376, "il", "Israel" },
|
||||
{ 380, "it", "Italy" },
|
||||
{ 388, "jm", "Jamaica" },
|
||||
{ 392, "jp", "Japan" },
|
||||
{ 400, "jo", "Jordan" },
|
||||
{ 398, "kz", "Kazakhstan" },
|
||||
{ 404, "ke", "Kenya" },
|
||||
{ 296, "ki", "Kiribati" },
|
||||
{ 408, "kp", "Korea (north)" },
|
||||
{ 410, "kr", "Korea (south)" },
|
||||
{ 414, "kw", "Kuwait" },
|
||||
{ 417, "kg", "Kyrgyzstan" },
|
||||
{ 418, "la", "Laos" },
|
||||
{ 428, "lv", "Latvia" },
|
||||
{ 422, "lb", "Lebanon" },
|
||||
{ 426, "ls", "Lesotho" },
|
||||
{ 430, "lr", "Liberia" },
|
||||
{ 434, "ly", "Libya" },
|
||||
{ 438, "li", "Liechtenstein" },
|
||||
{ 440, "lt", "Lithuania" },
|
||||
{ 442, "lu", "Luxembourg" },
|
||||
{ 446, "mo", "Macao" },
|
||||
{ 807, "mk", "Macedonia" },
|
||||
{ 450, "mg", "Madagascar" },
|
||||
{ 454, "mw", "Malawi" },
|
||||
{ 458, "my", "Malaysia" },
|
||||
{ 462, "mv", "Maldives" },
|
||||
{ 466, "ml", "Mali" },
|
||||
{ 470, "mt", "Malta" },
|
||||
{ 584, "mh", "Marshall Islands" },
|
||||
{ 474, "mq", "Martinique" },
|
||||
{ 478, "mr", "Mauritania" },
|
||||
{ 480, "mu", "Mauritius" },
|
||||
{ 175, "yt", "Mayotte" },
|
||||
{ 484, "mx", "Mexico" },
|
||||
{ 583, "fm", "Micronesia" },
|
||||
{ 498, "md", "Moldova" },
|
||||
{ 492, "mc", "Monaco" },
|
||||
{ 496, "mn", "Mongolia" },
|
||||
{ 500, "ms", "Montserrat" },
|
||||
{ 504, "ma", "Morocco" },
|
||||
{ 508, "mz", "Mozambique" },
|
||||
{ 104, "mm", "Myanmar" },
|
||||
{ 516, "na", "Namibia" },
|
||||
{ 520, "nr", "Nauru" },
|
||||
{ 524, "np", "Nepal" },
|
||||
{ 528, "nl", "Netherlands" },
|
||||
{ 530, "an", "Netherlands Antilles" },
|
||||
{ 540, "nc", "New Caledonia" },
|
||||
{ 554, "nz", "New Zealand" },
|
||||
{ 558, "ni", "Nicaragua" },
|
||||
{ 562, "ne", "Niger" },
|
||||
{ 566, "ng", "Nigeria" },
|
||||
{ 570, "nu", "Niue" },
|
||||
{ 574, "nf", "Norfolk Island" },
|
||||
{ 580, "mp", "Northern Mariana Islands" },
|
||||
{ 578, "no", "Norway" },
|
||||
{ 512, "om", "Oman" },
|
||||
{ 586, "pk", "Pakistan" },
|
||||
{ 585, "pw", "Palau" },
|
||||
{ 275, "ps", "Palestinian Territory" },
|
||||
{ 591, "pa", "Panama" },
|
||||
{ 598, "pg", "Papua New Guinea" },
|
||||
{ 600, "py", "Paraguay" },
|
||||
{ 604, "pe", "Peru" },
|
||||
{ 608, "ph", "Philippines" },
|
||||
{ 612, "pn", "Pitcairn" },
|
||||
{ 616, "pl", "Poland" },
|
||||
{ 620, "pt", "Portugal" },
|
||||
{ 630, "pr", "Puerto Rico" },
|
||||
{ 634, "qa", "Qatar" },
|
||||
{ 638, "re", "Reunion" },
|
||||
{ 642, "ro", "Romania" },
|
||||
{ 643, "ru", "Russia" },
|
||||
{ 646, "rw", "Rwanda" },
|
||||
{ 659, "kn", "Saint Kitts & Nevis" },
|
||||
{ 662, "lc", "Saint Lucia" },
|
||||
{ 670, "vc", "Saint Vincent" },
|
||||
{ 882, "ws", "Samoa" },
|
||||
{ 674, "sm", "San Marino" },
|
||||
{ 678, "st", "Sao Tome & Principe" },
|
||||
{ 682, "sa", "Saudi Arabia" },
|
||||
{ 686, "sn", "Senegal" },
|
||||
{ 891, "cs", "Serbia and Montenegro" },
|
||||
{ 690, "sc", "Seychelles" },
|
||||
{ 694, "sl", "Sierra Leone" },
|
||||
{ 702, "sg", "Singapore" },
|
||||
{ 703, "sk", "Slovakia" },
|
||||
{ 705, "si", "Slovenia" },
|
||||
{ 90, "sb", "Solomon Islands" },
|
||||
{ 706, "so", "Somalia" },
|
||||
{ 710, "za", "South Africa" },
|
||||
{ 239, "gs", "South Georgia" },
|
||||
{ 724, "es", "Spain" },
|
||||
{ 144, "lk", "Sri Lanka" },
|
||||
{ 654, "sh", "St. Helena" },
|
||||
{ 666, "pm", "St. Pierre & Miquelon" },
|
||||
{ 736, "sd", "Sudan" },
|
||||
{ 740, "sr", "Suriname" },
|
||||
{ 744, "sj", "Svalbard & Jan Mayen Islands" },
|
||||
{ 748, "sz", "Swaziland" },
|
||||
{ 752, "se", "Sweden" },
|
||||
{ 756, "ch", "Switzerland" },
|
||||
{ 760, "sy", "Syrian Arab Republic" },
|
||||
{ 626, "tl", "Timor-Leste" },
|
||||
{ 158, "tw", "Taiwan" },
|
||||
{ 762, "tj", "Tajikistan" },
|
||||
{ 834, "tz", "Tanzania" },
|
||||
{ 764, "th", "Thailand" },
|
||||
{ 768, "tg", "Togo" },
|
||||
{ 772, "tk", "Tokelau" },
|
||||
{ 776, "to", "Tonga" },
|
||||
{ 780, "tt", "Trinidad & Tobago" },
|
||||
{ 788, "tn", "Tunisia" },
|
||||
{ 792, "tr", "Turkey" },
|
||||
{ 795, "tm", "Turkmenistan" },
|
||||
{ 796, "tc", "Turks & Caicos Islands" },
|
||||
{ 798, "tv", "Tuvalu" },
|
||||
{ 800, "ug", "Uganda" },
|
||||
{ 804, "ua", "Ukraine" },
|
||||
{ 784, "ae", "United Arab Emirates" },
|
||||
{ 826, "gb", "United Kingdom" },
|
||||
{ 840, "us", "United States" },
|
||||
{ 581, "um", "United States Minor Outlying Islands" },
|
||||
{ 858, "uy", "Uruguay" },
|
||||
{ 860, "uz", "Uzbekistan" },
|
||||
{ 548, "vu", "Vanuatu" },
|
||||
{ 862, "ve", "Venezuela" },
|
||||
{ 704, "vn", "Vietnam" },
|
||||
{ 92, "vg", "Virgin Islands (British)" },
|
||||
{ 850, "vi", "Virgin Islands (US)" },
|
||||
{ 876, "wf", "Wallis & Futuna Islands" },
|
||||
{ 732, "eh", "Western Sahara" },
|
||||
{ 887, "ye", "Yemen" },
|
||||
{ 894, "zm", "Zambia" },
|
||||
{ 716, "zw", "Zimbabwe" }
|
||||
};
|
||||
|
||||
/*
|
||||
* Check if start of 'str' is simply an IPv4 address.
|
||||
*/
|
||||
#define BYTE_OK(x) ((x) >= 0 && (x) <= 255)
|
||||
|
||||
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 &&
|
||||
BYTE_OK(a0) && BYTE_OK(a1) && BYTE_OK(a2) && BYTE_OK(a3) &&
|
||||
length >= (3+4))
|
||||
{
|
||||
rc = 1;
|
||||
*end = str + length;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the country-code and name from the CNAME. E.g.:
|
||||
* version 1: CNAME = zzno.countries.nerd.dk with address 127.0.2.66
|
||||
* yields ccode_A" = "no" and cnumber 578 (2.66).
|
||||
* version 2: CNAME = <a.b.c.d>.zz.countries.nerd.dk with address 127.0.2.66
|
||||
* yields cnumber 578 (2.66). ccode_A is "";
|
||||
*/
|
||||
static void find_country_from_cname(const char *cname, struct in_addr addr)
|
||||
{
|
||||
const struct search_list *country;
|
||||
char ccode_A2[3], *ccopy, *dot_4;
|
||||
int cnumber, z0, z1, ver_1, ver_2;
|
||||
u_long ip;
|
||||
|
||||
ip = ntohl(addr.s_addr);
|
||||
z0 = tolower(cname[0]);
|
||||
z1 = tolower(cname[1]);
|
||||
ccopy = strdup(cname);
|
||||
|
||||
ver_1 = (z0 == 'z' && z1 == 'z' && !strcasecmp(cname+4,nerd_ver1));
|
||||
ver_2 = (is_addr(ccopy,&dot_4) && !strcasecmp(dot_4,nerd_ver2));
|
||||
|
||||
if (ver_1)
|
||||
{
|
||||
const char *dot = strchr(cname, '.');
|
||||
if ((z0 != 'z' && z1 != 'z') || dot != cname+4)
|
||||
{
|
||||
printf("Unexpected CNAME %s (ver_1)\n", cname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (ver_2)
|
||||
{
|
||||
z0 = tolower(dot_4[1]);
|
||||
z1 = tolower(dot_4[2]);
|
||||
if (z0 != 'z' && z1 != 'z')
|
||||
{
|
||||
printf("Unexpected CNAME %s (ver_2)\n", cname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unexpected CNAME %s (ver?)\n", cname);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ver_1)
|
||||
{
|
||||
ccode_A2[0] = tolower(cname[2]);
|
||||
ccode_A2[1] = tolower(cname[3]);
|
||||
ccode_A2[2] = '\0';
|
||||
}
|
||||
else
|
||||
ccode_A2[0] = '\0';
|
||||
|
||||
cnumber = ip & 0xFFFF;
|
||||
|
||||
TRACE(("Found country-code `%s', number %d\n",
|
||||
ver_1 ? ccode_A2 : "<n/a>", cnumber));
|
||||
|
||||
country = list_lookup(cnumber, country_list,
|
||||
sizeof(country_list) / sizeof(country_list[0]));
|
||||
if (!country)
|
||||
printf("Name for country-number %d not found.\n", cnumber);
|
||||
else
|
||||
{
|
||||
if (ver_1 && *(unsigned short*)&country->short_name != *(unsigned*)&ccode_A2)
|
||||
printf("short-name mismatch; %s vs %s\n", country->short_name, ccode_A2);
|
||||
|
||||
printf("%s (%s), number %d.\n",
|
||||
country->long_name, country->short_name, cnumber);
|
||||
}
|
||||
free(ccopy);
|
||||
}
|
||||
|
44
ares/adig.c
44
ares/adig.c
@@ -27,11 +27,17 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -110,6 +116,7 @@ static const struct nv types[] = {
|
||||
{ "AXFR", T_AXFR },
|
||||
{ "MAILB", T_MAILB },
|
||||
{ "MAILA", T_MAILA },
|
||||
{ "NAPTR", T_NAPTR },
|
||||
{ "ANY", T_ANY }
|
||||
};
|
||||
static const int ntypes = sizeof(types) / sizeof(types[0]);
|
||||
@@ -303,6 +310,8 @@ static void callback(void *arg, int status, int timeouts,
|
||||
unsigned int qdcount, ancount, nscount, arcount, i;
|
||||
const unsigned char *aptr;
|
||||
|
||||
(void) timeouts;
|
||||
|
||||
/* Display the query name if given. */
|
||||
if (name)
|
||||
printf("Answer for query %s:\n", name);
|
||||
@@ -603,6 +612,41 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
ares_free_string(name);
|
||||
break;
|
||||
|
||||
case T_NAPTR:
|
||||
|
||||
printf("\t%d", DNS__16BIT(aptr)); /* order */
|
||||
printf(" %d\n", DNS__16BIT(aptr + 2)); /* preference */
|
||||
|
||||
p = aptr + 4;
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s", name);
|
||||
ares_free_string(name);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
printf("\t[Unknown RR; cannot parse]");
|
||||
break;
|
||||
|
12
ares/ahost.c
12
ares/ahost.c
@@ -29,6 +29,9 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -40,13 +43,6 @@
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_getopt.h"
|
||||
|
||||
#ifndef HAVE_STRUCT_IN6_ADDR
|
||||
struct in6_addr
|
||||
{
|
||||
unsigned char s6_addr[16];
|
||||
};
|
||||
#endif
|
||||
|
||||
static void callback(void *arg, int status, int timeouts, struct hostent *host);
|
||||
static void usage(void);
|
||||
|
||||
@@ -146,6 +142,8 @@ static void callback(void *arg, int status, int timeouts, struct hostent *host)
|
||||
{
|
||||
char **p;
|
||||
|
||||
(void)timeouts;
|
||||
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status));
|
||||
|
52
ares/ares.h
52
ares/ares.h
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -18,6 +19,14 @@
|
||||
#ifndef ARES__H
|
||||
#define ARES__H
|
||||
|
||||
/*
|
||||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(_AIX) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||
@@ -35,8 +44,12 @@
|
||||
#include <sys/socket.h>
|
||||
#include <tcp.h>
|
||||
#elif defined(WIN32)
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -100,6 +113,7 @@ extern "C" {
|
||||
#define ARES_OPT_SORTLIST (1 << 10)
|
||||
#define ARES_OPT_SOCK_SNDBUF (1 << 11)
|
||||
#define ARES_OPT_SOCK_RCVBUF (1 << 12)
|
||||
#define ARES_OPT_TIMEOUTMS (1 << 13)
|
||||
|
||||
/* Nameinfo flag values */
|
||||
#define ARES_NI_NOFQDN (1 << 0)
|
||||
@@ -167,7 +181,7 @@ struct apattern;
|
||||
|
||||
struct ares_options {
|
||||
int flags;
|
||||
int timeout;
|
||||
int timeout; /* in seconds or milliseconds, depending on options */
|
||||
int tries;
|
||||
int ndots;
|
||||
unsigned short udp_port;
|
||||
@@ -232,10 +246,38 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
|
||||
int alen, char **s, long *enclen);
|
||||
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 {
|
||||
union {
|
||||
unsigned char _S6_u8[16];
|
||||
} _S6_un;
|
||||
};
|
||||
#define s6_addr _S6_un._S6_u8
|
||||
#endif
|
||||
|
||||
struct addrttl {
|
||||
struct in_addr ipaddr;
|
||||
int ttl;
|
||||
};
|
||||
struct addr6ttl {
|
||||
struct in6_addr ip6addr;
|
||||
int ttl;
|
||||
};
|
||||
|
||||
/*
|
||||
** Parse the buffer, starting at *abuf and of length alen bytes, previously
|
||||
** obtained from an ares_search call. Put the results in *host, if nonnull.
|
||||
** Also, if addrttls is nonnull, put up to *naddrttls IPv4 addresses along with
|
||||
** their TTLs in that array, and set *naddrttls to the number of addresses
|
||||
** so written.
|
||||
*/
|
||||
int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host);
|
||||
struct hostent **host,
|
||||
struct addrttl *addrttls, int *naddrttls);
|
||||
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host);
|
||||
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,
|
||||
|
112
ares/ares__timeval.c
Normal file
112
ares/ares__timeval.c
Normal file
@@ -0,0 +1,112 @@
|
||||
/* $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.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#if defined(WIN32) && !defined(MSDOS)
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** GetTickCount() is available on _all_ Windows versions from W95 up
|
||||
** to nowadays. Returns milliseconds elapsed since last system boot,
|
||||
** increases monotonically and wraps once 49.7 days have elapsed.
|
||||
*/
|
||||
struct timeval now;
|
||||
DWORD milliseconds = GetTickCount();
|
||||
now.tv_sec = milliseconds / 1000;
|
||||
now.tv_usec = (milliseconds % 1000) * 1000;
|
||||
return now;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** clock_gettime() is granted to be increased monotonically when the
|
||||
** monotonic clock is queried. Time starting point is unspecified, it
|
||||
** could be the system start-up time, the Epoch, or something else,
|
||||
** in any case the time starting point does not change once that the
|
||||
** system has started up.
|
||||
*/
|
||||
struct timeval now;
|
||||
struct timespec tsnow;
|
||||
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;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_GETTIMEOFDAY)
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** gettimeofday() is not granted to be increased monotonically, due to
|
||||
** clock drifting and external source time synchronization it can jump
|
||||
** forward or backward in time.
|
||||
*/
|
||||
struct timeval now;
|
||||
(void)gettimeofday(&now, NULL);
|
||||
return now;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** time() returns the value of time in seconds since the Epoch.
|
||||
*/
|
||||
struct timeval now;
|
||||
now.tv_sec = (long)time(NULL);
|
||||
now.tv_usec = 0;
|
||||
return now;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if 0 /* Not used */
|
||||
/*
|
||||
* Make sure that the first argument is the more recent time, as otherwise
|
||||
* we'll get a weird negative time-diff back...
|
||||
*
|
||||
* Returns: the time difference in number of milliseconds.
|
||||
*/
|
||||
long ares__tvdiff(struct timeval newer, struct timeval older)
|
||||
{
|
||||
return (newer.tv_sec-older.tv_sec)*1000+
|
||||
(newer.tv_usec-older.tv_usec)/1000;
|
||||
}
|
||||
#endif
|
||||
|
@@ -58,6 +58,7 @@ static void addr_callback(void *arg, int status, int timeouts,
|
||||
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);
|
||||
|
||||
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
|
||||
int family, ares_host_callback callback, void *arg)
|
||||
@@ -101,48 +102,26 @@ static void next_lookup(struct addr_query *aquery)
|
||||
{
|
||||
const char *p;
|
||||
char name[128];
|
||||
int a1, a2, a3, a4, status;
|
||||
int status;
|
||||
struct hostent *host;
|
||||
unsigned long addr;
|
||||
|
||||
for (p = aquery->remaining_lookups; *p; p++)
|
||||
{
|
||||
switch (*p)
|
||||
{
|
||||
case 'b':
|
||||
if (aquery->family == AF_INET)
|
||||
{
|
||||
addr = ntohl(aquery->addr.addr4.s_addr);
|
||||
a1 = (int)((addr >> 24) & 0xff);
|
||||
a2 = (int)((addr >> 16) & 0xff);
|
||||
a3 = (int)((addr >> 8) & 0xff);
|
||||
a4 = (int)(addr & 0xff);
|
||||
sprintf(name, "%d.%d.%d.%d.in-addr.arpa", a4, a3, a2, a1);
|
||||
aquery->remaining_lookups = p + 1;
|
||||
ares_query(aquery->channel, name, C_IN, T_PTR, addr_callback,
|
||||
aquery);
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned char *bytes;
|
||||
bytes = (unsigned char *)&aquery->addr.addr6.s6_addr;
|
||||
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",
|
||||
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[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,
|
||||
bytes[1]&0xf, bytes[1] >> 4, bytes[0]&0xf, bytes[0] >> 4);
|
||||
aquery->remaining_lookups = p + 1;
|
||||
ares_query(aquery->channel, name, C_IN, T_PTR, addr_callback,
|
||||
aquery);
|
||||
}
|
||||
ptr_rr_name(name, aquery->family, &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);
|
||||
if (status != ARES_ENOTFOUND)
|
||||
|
||||
/* this status check below previously checked for !ARES_ENOTFOUND,
|
||||
but we should not assume that this single error code is the one
|
||||
that can occur, as that is in fact no longer the case */
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
end_aquery(aquery, status, host);
|
||||
return;
|
||||
@@ -264,3 +243,31 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host)
|
||||
*host = NULL;
|
||||
return status;
|
||||
}
|
||||
|
||||
static void ptr_rr_name(char *name, int family, union ares_addr *addr)
|
||||
{
|
||||
if (family == AF_INET)
|
||||
{
|
||||
unsigned long laddr = ntohl(addr->addr4.s_addr);
|
||||
int a1 = (int)((laddr >> 24) & 0xff);
|
||||
int a2 = (int)((laddr >> 16) & 0xff);
|
||||
int a3 = (int)((laddr >> 8) & 0xff);
|
||||
int a4 = (int)(laddr & 0xff);
|
||||
sprintf(name, "%d.%d.%d.%d.in-addr.arpa", a4, a3, a2, a1);
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned char *bytes = (unsigned char *)&addr->addr6.s6_addr;
|
||||
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",
|
||||
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[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,
|
||||
bytes[1]&0xf, bytes[1] >> 4, bytes[0]&0xf, bytes[0] >> 4);
|
||||
}
|
||||
}
|
||||
|
@@ -36,6 +36,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
@@ -57,7 +60,7 @@ struct host_query {
|
||||
int timeouts;
|
||||
};
|
||||
|
||||
static void next_lookup(struct host_query *hquery, int status);
|
||||
static void next_lookup(struct host_query *hquery, int status_code);
|
||||
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,
|
||||
@@ -111,13 +114,14 @@ void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
||||
hquery->timeouts = 0;
|
||||
|
||||
/* Start performing lookups according to channel->lookups. */
|
||||
next_lookup(hquery, ARES_SUCCESS);
|
||||
next_lookup(hquery, ARES_ECONNREFUSED /* initial error code */);
|
||||
}
|
||||
|
||||
static void next_lookup(struct host_query *hquery, int status)
|
||||
static void next_lookup(struct host_query *hquery, int status_code)
|
||||
{
|
||||
const char *p;
|
||||
struct hostent *host;
|
||||
int status = status_code;
|
||||
|
||||
for (p = hquery->remaining_lookups; *p; p++)
|
||||
{
|
||||
@@ -137,11 +141,16 @@ static void next_lookup(struct host_query *hquery, int status)
|
||||
case 'f':
|
||||
/* Host file lookup */
|
||||
status = file_lookup(hquery->name, hquery->family, &host);
|
||||
if (status != ARES_ENOTFOUND)
|
||||
|
||||
/* this status check below previously checked for !ARES_ENOTFOUND,
|
||||
but we should not assume that this single error code is the one
|
||||
that can occur, as that is in fact no longer the case */
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
end_hquery(hquery, status, host);
|
||||
return;
|
||||
}
|
||||
status = status_code; /* Use original status code */
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -153,20 +162,29 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
{
|
||||
struct host_query *hquery = (struct host_query *) arg;
|
||||
ares_channel channel = hquery->channel;
|
||||
struct hostent *host;
|
||||
struct hostent *host = NULL;
|
||||
|
||||
hquery->timeouts += timeouts;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
if (hquery->family == AF_INET)
|
||||
{
|
||||
status = ares_parse_a_reply(abuf, alen, &host);
|
||||
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)
|
||||
{
|
||||
status = ares_parse_aaaa_reply(abuf, alen, &host);
|
||||
status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
|
||||
if (status == ARES_ENODATA)
|
||||
{
|
||||
/* The query returned something (e.g. CNAME) but there were no
|
||||
AAAA records. Try looking up A instead. */
|
||||
hquery->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);
|
||||
}
|
||||
|
@@ -82,7 +82,7 @@ ares_getopt(int nargc, char * const nargv[], const char *ostr)
|
||||
}
|
||||
} /* option letter okay? */
|
||||
if ((optopt = (int)*place++) == (int)':' ||
|
||||
!(oli = strchr(ostr, optopt))) {
|
||||
(oli = strchr(ostr, optopt)) == NULL) {
|
||||
/*
|
||||
* if the user didn't specify '-' as an option,
|
||||
* assume it means EOF.
|
||||
|
@@ -1,6 +1,7 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.\" Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this
|
||||
.\" software and its documentation for any purpose and without
|
||||
@@ -14,7 +15,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_INIT 3 "7 December 2004"
|
||||
.TH ARES_INIT 3 "13 May 2008"
|
||||
.SH NAME
|
||||
ares_init, ares_init_options \- Initialize a resolver channel
|
||||
.SH SYNOPSIS
|
||||
@@ -49,10 +50,22 @@ description of possible flag values.
|
||||
.B ARES_OPT_TIMEOUT
|
||||
.B int \fItimeout\fP;
|
||||
.br
|
||||
The number of seconds each name server is given to respond to a query
|
||||
on the first try. (After the first try, the timeout algorithm becomes
|
||||
more complicated, but scales linearly with the value of
|
||||
\fItimeout\fP.) The default is five seconds.
|
||||
The number of seconds each name server is given to respond to a query on the
|
||||
first try. (After the first try, the timeout algorithm becomes more
|
||||
complicated, but scales linearly with the value of \fItimeout\fP.) The
|
||||
default is five seconds. This option is being deprecated by
|
||||
\fIARES_OPT_TIMEOUTMS\fP starting in c-ares 1.5.2.
|
||||
.TP 18
|
||||
.B ARES_OPT_TIMEOUTMS
|
||||
.B int \fItimeout\fP;
|
||||
.br
|
||||
The number of milliseconds each name server is given to respond to a query on
|
||||
the first try. (After the first try, the timeout algorithm becomes more
|
||||
complicated, but scales linearly with the value of \fItimeout\fP.) The
|
||||
default is five seconds. Note that this option is specified with the same
|
||||
struct field as the former \fIARES_OPT_TIMEOUT\fP, it is but the option bits
|
||||
that tell c-ares how to interpret the number. This option was added in c-ares
|
||||
1.5.2.
|
||||
.TP 18
|
||||
.B ARES_OPT_TRIES
|
||||
.B int \fItries\fP;
|
||||
|
219
ares/ares_init.c
219
ares/ares_init.c
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -107,6 +108,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
int i;
|
||||
int status = ARES_SUCCESS;
|
||||
struct server_state *server;
|
||||
struct timeval now;
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
const char *env = getenv("CARES_MEMDEBUG");
|
||||
@@ -124,6 +126,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
|
||||
now = ares__tvnow();
|
||||
|
||||
/* Set everything to distinguished values so we know they haven't
|
||||
* been set yet.
|
||||
*/
|
||||
@@ -146,7 +150,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
channel->sock_state_cb = NULL;
|
||||
channel->sock_state_cb_data = NULL;
|
||||
|
||||
channel->last_timeout_processed = (long)time(NULL);
|
||||
channel->last_timeout_processed = (time_t)now.tv_sec;
|
||||
|
||||
/* Initialize our lists of queries */
|
||||
ares__init_list_head(&(channel->all_queries));
|
||||
@@ -254,13 +258,16 @@ int ares_save_options(ares_channel channel, struct ares_options *options,
|
||||
if (!ARES_CONFIG_CHECK(channel))
|
||||
return ARES_ENODATA;
|
||||
|
||||
(*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TIMEOUT|ARES_OPT_TRIES|ARES_OPT_NDOTS|
|
||||
(*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_SORTLIST|ARES_OPT_TIMEOUTMS);
|
||||
|
||||
/* Copy easy stuff */
|
||||
options->flags = channel->flags;
|
||||
|
||||
/* We return full millisecond resolution but that's only because we don't
|
||||
set the ARES_OPT_TIMEOUT anymore, only the new ARES_OPT_TIMEOUTMS */
|
||||
options->timeout = channel->timeout;
|
||||
options->tries = channel->tries;
|
||||
options->ndots = channel->ndots;
|
||||
@@ -328,8 +335,10 @@ static int init_by_options(ares_channel channel,
|
||||
/* Easy stuff. */
|
||||
if ((optmask & ARES_OPT_FLAGS) && channel->flags == -1)
|
||||
channel->flags = options->flags;
|
||||
if ((optmask & ARES_OPT_TIMEOUT) && channel->timeout == -1)
|
||||
if ((optmask & ARES_OPT_TIMEOUTMS) && channel->timeout == -1)
|
||||
channel->timeout = options->timeout;
|
||||
else if ((optmask & ARES_OPT_TIMEOUT) && channel->timeout == -1)
|
||||
channel->timeout = options->timeout * 1000;
|
||||
if ((optmask & ARES_OPT_TRIES) && channel->tries == -1)
|
||||
channel->tries = options->tries;
|
||||
if ((optmask & ARES_OPT_NDOTS) && channel->ndots == -1)
|
||||
@@ -903,7 +912,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;
|
||||
@@ -918,53 +928,103 @@ static int init_by_defaults(ares_channel channel)
|
||||
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;
|
||||
|
||||
hostname = (char *)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;
|
||||
}
|
||||
channel->ndomains = 0; /* default to none */
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
@@ -1245,16 +1305,61 @@ static int set_options(ares_channel channel, const char *str)
|
||||
static char *try_config(char *s, const char *opt)
|
||||
{
|
||||
size_t len;
|
||||
ssize_t i;
|
||||
ssize_t j;
|
||||
char *p;
|
||||
|
||||
len = strlen(opt);
|
||||
if (strncmp(s, opt, len) != 0 || !ISSPACE(s[len]))
|
||||
if (!s || !opt)
|
||||
/* no line or no option */
|
||||
return NULL;
|
||||
s += len;
|
||||
while (ISSPACE(*s))
|
||||
s++;
|
||||
return s;
|
||||
}
|
||||
|
||||
/* trim line comment */
|
||||
for (i = 0; s[i] && s[i] != '#'; ++i);
|
||||
s[i] = '\0';
|
||||
|
||||
/* trim trailing whitespace */
|
||||
for (j = i-1; j >= 0 && ISSPACE(s[j]); --j);
|
||||
s[++j] = '\0';
|
||||
|
||||
/* skip leading whitespace */
|
||||
for (i = 0; s[i] && ISSPACE(s[i]); ++i);
|
||||
p = &s[i];
|
||||
|
||||
if (!*p)
|
||||
/* empty line */
|
||||
return NULL;
|
||||
|
||||
if ((len = strlen(opt)) == 0)
|
||||
/* empty option */
|
||||
return NULL;
|
||||
|
||||
if (strncmp(p, opt, len) != 0)
|
||||
/* line and option do not match */
|
||||
return NULL;
|
||||
|
||||
/* skip over given option name */
|
||||
p += len;
|
||||
|
||||
if (!*p)
|
||||
/* no option value */
|
||||
return NULL;
|
||||
|
||||
if ((opt[len-1] != ':') && (opt[len-1] != '=') && !ISSPACE(*p))
|
||||
/* whitespace between option name and value is mandatory
|
||||
for given option names which do not end with ':' or '=' */
|
||||
return NULL;
|
||||
|
||||
/* skip over whitespace */
|
||||
while (*p && ISSPACE(*p))
|
||||
p++;
|
||||
|
||||
if (!*p)
|
||||
/* no option value */
|
||||
return NULL;
|
||||
|
||||
/* return pointer to option value */
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *try_option(const char *p, const char *q, const char *opt)
|
||||
@@ -1333,13 +1438,9 @@ static void randomize_key(unsigned char* key,int key_data_len)
|
||||
}
|
||||
#else /* !WIN32 */
|
||||
#ifdef RANDOM_FILE
|
||||
char buffer[256];
|
||||
FILE *f = fopen(RANDOM_FILE, "rb");
|
||||
if(f) {
|
||||
size_t i;
|
||||
size_t rc = fread(buffer, key_data_len, 1, f);
|
||||
for(i=0; i<rc && counter < key_data_len; i++)
|
||||
key[counter++]=buffer[i];
|
||||
counter = fread(key, 1, key_data_len, f);
|
||||
fclose(f);
|
||||
}
|
||||
#endif
|
||||
@@ -1363,11 +1464,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;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
/* Copyright (C) 2005 by Dominick Meglio
|
||||
*
|
||||
* 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
|
||||
@@ -21,11 +22,13 @@
|
||||
#define PF_INET6 AF_INET6
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_IN6_ADDR
|
||||
struct in6_addr
|
||||
{
|
||||
unsigned char s6_addr[16];
|
||||
#if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr)
|
||||
struct in6_addr {
|
||||
union {
|
||||
unsigned char _S6_u8[16];
|
||||
} _S6_un;
|
||||
};
|
||||
#define s6_addr _S6_un._S6_u8
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_SOCKADDR_IN6
|
||||
|
@@ -22,24 +22,39 @@ ares_parse_a_reply \- Parse a reply to a DNS query of type A into a hostent
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B int ares_parse_a_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
|
||||
.B struct hostent **\fIhost\fP);
|
||||
.B struct hostent **\fIhost\fP,
|
||||
.B struct addrttl *\fIaddrttls\fB, int *\fInaddrttls\fB);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B ares_parse_a_reply
|
||||
function parses the response to a query of type A into a
|
||||
.BR "struct hostent" .
|
||||
.BR "struct hostent"
|
||||
and/or an array of
|
||||
.BR "struct addrttls" .
|
||||
The parameters
|
||||
.I abuf
|
||||
and
|
||||
.I alen
|
||||
give the contents of the response. The result is stored in allocated
|
||||
memory and a pointer to it stored into the variable pointed to by
|
||||
.IR host .
|
||||
.IR host ,
|
||||
if host is nonnull.
|
||||
It is the caller's responsibility to free the resulting host structure
|
||||
using
|
||||
.BR ares_free_hostent (3)
|
||||
when it is no longer needed.
|
||||
.PP
|
||||
If
|
||||
.IR addrttls
|
||||
and
|
||||
.IR naddrttls
|
||||
are both nonnull,
|
||||
then up to *naddrttls
|
||||
.BR "struct addrttl"
|
||||
records are stored in the array pointed to by addrttls,
|
||||
and then *naddrttls is set to the number of records so stored.
|
||||
Note that the memory for these records is supplied by the caller.
|
||||
.SH RETURN VALUES
|
||||
.B ares_parse_a_reply
|
||||
can return any of the following values:
|
||||
|
@@ -29,27 +29,38 @@
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host)
|
||||
struct hostent **host,
|
||||
struct addrttl *addrttls, int *naddrttls)
|
||||
{
|
||||
unsigned int qdcount, ancount;
|
||||
int status, i, rr_type, rr_class, rr_len, naddrs;
|
||||
int status, i, rr_type, rr_class, rr_len, rr_ttl, naddrs;
|
||||
int cname_ttl = INT_MAX; /* the TTL imposed by the CNAME chain */
|
||||
int naliases;
|
||||
long len;
|
||||
const unsigned char *aptr;
|
||||
char *hostname, *rr_name, *rr_data, **aliases;
|
||||
struct in_addr *addrs;
|
||||
struct hostent *hostent;
|
||||
const int max_addr_ttls = (addrttls && naddrttls) ? *naddrttls : 0;
|
||||
|
||||
/* Set *host to NULL for all failure cases. */
|
||||
*host = NULL;
|
||||
if (host)
|
||||
*host = NULL;
|
||||
/* Same with *naddrttls. */
|
||||
if (naddrttls)
|
||||
*naddrttls = 0;
|
||||
|
||||
/* Give up if abuf doesn't have room for a header. */
|
||||
if (alen < HFIXEDSZ)
|
||||
@@ -73,20 +84,29 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
}
|
||||
aptr += len + QFIXEDSZ;
|
||||
|
||||
/* Allocate addresses and aliases; ancount gives an upper bound for both. */
|
||||
addrs = malloc(ancount * sizeof(struct in_addr));
|
||||
if (!addrs)
|
||||
if (host)
|
||||
{
|
||||
free(hostname);
|
||||
return ARES_ENOMEM;
|
||||
/* Allocate addresses and aliases; ancount gives an upper bound for both. */
|
||||
addrs = malloc(ancount * sizeof(struct in_addr));
|
||||
if (!addrs)
|
||||
{
|
||||
free(hostname);
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
aliases = malloc((ancount + 1) * sizeof(char *));
|
||||
if (!aliases)
|
||||
{
|
||||
free(hostname);
|
||||
free(addrs);
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
}
|
||||
aliases = malloc((ancount + 1) * sizeof(char *));
|
||||
if (!aliases)
|
||||
else
|
||||
{
|
||||
free(hostname);
|
||||
free(addrs);
|
||||
return ARES_ENOMEM;
|
||||
addrs = NULL;
|
||||
aliases = NULL;
|
||||
}
|
||||
|
||||
naddrs = 0;
|
||||
naliases = 0;
|
||||
|
||||
@@ -106,13 +126,33 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
rr_type = DNS_RR_TYPE(aptr);
|
||||
rr_class = DNS_RR_CLASS(aptr);
|
||||
rr_len = DNS_RR_LEN(aptr);
|
||||
rr_ttl = DNS_RR_TTL(aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_A
|
||||
&& rr_len == sizeof(struct in_addr)
|
||||
&& strcasecmp(rr_name, hostname) == 0)
|
||||
{
|
||||
memcpy(&addrs[naddrs], aptr, sizeof(struct in_addr));
|
||||
if (addrs)
|
||||
{
|
||||
if (aptr + sizeof(struct in_addr) > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
memcpy(&addrs[naddrs], aptr, sizeof(struct in_addr));
|
||||
}
|
||||
if (naddrs < max_addr_ttls)
|
||||
{
|
||||
struct addrttl * const at = &addrttls[naddrs];
|
||||
if (aptr + sizeof(struct in_addr) > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
memcpy(&at->ipaddr, aptr, sizeof(struct in_addr));
|
||||
at->ttl = rr_ttl;
|
||||
}
|
||||
naddrs++;
|
||||
status = ARES_SUCCESS;
|
||||
}
|
||||
@@ -120,7 +160,10 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
if (rr_class == C_IN && rr_type == T_CNAME)
|
||||
{
|
||||
/* Record the RR name as an alias. */
|
||||
aliases[naliases] = rr_name;
|
||||
if (aliases)
|
||||
aliases[naliases] = rr_name;
|
||||
else
|
||||
free(rr_name);
|
||||
naliases++;
|
||||
|
||||
/* Decode the RR data and replace the hostname with it. */
|
||||
@@ -129,6 +172,10 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
break;
|
||||
free(hostname);
|
||||
hostname = rr_data;
|
||||
|
||||
/* Take the min of the TTLs we see in the CNAME chain. */
|
||||
if (cname_ttl > rr_ttl)
|
||||
cname_ttl = rr_ttl;
|
||||
}
|
||||
else
|
||||
free(rr_name);
|
||||
@@ -145,32 +192,51 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
status = ARES_ENODATA;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
/* We got our answer. Allocate memory to build the host entry. */
|
||||
aliases[naliases] = NULL;
|
||||
hostent = malloc(sizeof(struct hostent));
|
||||
if (hostent)
|
||||
/* We got our answer. */
|
||||
if (naddrttls)
|
||||
{
|
||||
hostent->h_addr_list = malloc((naddrs + 1) * sizeof(char *));
|
||||
if (hostent->h_addr_list)
|
||||
const int n = naddrs < max_addr_ttls ? naddrs : max_addr_ttls;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
/* Fill in the hostent and return successfully. */
|
||||
hostent->h_name = hostname;
|
||||
hostent->h_aliases = aliases;
|
||||
hostent->h_addrtype = AF_INET;
|
||||
hostent->h_length = sizeof(struct in_addr);
|
||||
for (i = 0; i < naddrs; i++)
|
||||
hostent->h_addr_list[i] = (char *) &addrs[i];
|
||||
hostent->h_addr_list[naddrs] = NULL;
|
||||
*host = hostent;
|
||||
return ARES_SUCCESS;
|
||||
/* Ensure that each A TTL is no larger than the CNAME TTL. */
|
||||
if (addrttls[i].ttl > cname_ttl)
|
||||
addrttls[i].ttl = cname_ttl;
|
||||
}
|
||||
free(hostent);
|
||||
*naddrttls = n;
|
||||
}
|
||||
status = ARES_ENOMEM;
|
||||
if (aliases)
|
||||
aliases[naliases] = NULL;
|
||||
if (host)
|
||||
{
|
||||
/* Allocate memory to build the host entry. */
|
||||
hostent = malloc(sizeof(struct hostent));
|
||||
if (hostent)
|
||||
{
|
||||
hostent->h_addr_list = malloc((naddrs + 1) * sizeof(char *));
|
||||
if (hostent->h_addr_list)
|
||||
{
|
||||
/* Fill in the hostent and return successfully. */
|
||||
hostent->h_name = hostname;
|
||||
hostent->h_aliases = aliases;
|
||||
hostent->h_addrtype = AF_INET;
|
||||
hostent->h_length = sizeof(struct in_addr);
|
||||
for (i = 0; i < naddrs; i++)
|
||||
hostent->h_addr_list[i] = (char *) &addrs[i];
|
||||
hostent->h_addr_list[naddrs] = NULL;
|
||||
*host = hostent;
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
free(hostent);
|
||||
}
|
||||
status = ARES_ENOMEM;
|
||||
}
|
||||
}
|
||||
if (aliases)
|
||||
{
|
||||
for (i = 0; i < naliases; i++)
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
}
|
||||
for (i = 0; i < naliases; i++)
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
free(addrs);
|
||||
free(hostname);
|
||||
return status;
|
||||
|
@@ -22,24 +22,39 @@ ares_parse_aaaa_reply \- Parse a reply to a DNS query of type AAAA into a hosten
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B int ares_parse_aaaa_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
|
||||
.B struct hostent **\fIhost\fP);
|
||||
.B struct hostent **\fIhost\fP,
|
||||
.B struct addrttl *\fIaddrttls\fB, int *\fInaddrttls\fB);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B ares_parse_aaaa_reply
|
||||
function parses the response to a query of type AAAA into a
|
||||
.BR "struct hostent" .
|
||||
.BR "struct hostent"
|
||||
and/or an array of
|
||||
.BR "struct addrttls" .
|
||||
The parameters
|
||||
.I abuf
|
||||
and
|
||||
.I alen
|
||||
give the contents of the response. The result is stored in allocated
|
||||
memory and a pointer to it stored into the variable pointed to by
|
||||
.IR host .
|
||||
.IR host ,
|
||||
if host is nonnull.
|
||||
It is the caller's responsibility to free the resulting host structure
|
||||
using
|
||||
.BR ares_free_hostent (3)
|
||||
when it is no longer needed.
|
||||
.PP
|
||||
If
|
||||
.IR addrttls
|
||||
and
|
||||
.IR naddrttls
|
||||
are both nonnull,
|
||||
then up to *naddrttls
|
||||
.BR "struct addr6ttl"
|
||||
records are stored in the array pointed to by addrttls,
|
||||
and then *naddrttls is set to the number of records so stored.
|
||||
Note that the memory for these records is supplied by the caller.
|
||||
.SH RETURN VALUES
|
||||
.B ares_parse_aaaa_reply
|
||||
can return any of the following values:
|
||||
|
@@ -31,28 +31,39 @@
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
struct hostent **host)
|
||||
struct hostent **host, struct addr6ttl *addrttls,
|
||||
int *naddrttls)
|
||||
{
|
||||
unsigned int qdcount, ancount;
|
||||
int status, i, rr_type, rr_class, rr_len, naddrs;
|
||||
int status, i, rr_type, rr_class, rr_len, rr_ttl, naddrs;
|
||||
int cname_ttl = INT_MAX; /* the TTL imposed by the CNAME chain */
|
||||
int naliases;
|
||||
long len;
|
||||
const unsigned char *aptr;
|
||||
char *hostname, *rr_name, *rr_data, **aliases;
|
||||
struct in6_addr *addrs;
|
||||
struct hostent *hostent;
|
||||
const int max_addr_ttls = (addrttls && naddrttls) ? *naddrttls : 0;
|
||||
|
||||
/* Set *host to NULL for all failure cases. */
|
||||
*host = NULL;
|
||||
if (host)
|
||||
*host = NULL;
|
||||
/* Same with *naddrttls. */
|
||||
if (naddrttls)
|
||||
*naddrttls = 0;
|
||||
|
||||
/* Give up if abuf doesn't have room for a header. */
|
||||
if (alen < HFIXEDSZ)
|
||||
@@ -77,18 +88,26 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
aptr += len + QFIXEDSZ;
|
||||
|
||||
/* Allocate addresses and aliases; ancount gives an upper bound for both. */
|
||||
addrs = malloc(ancount * sizeof(struct in6_addr));
|
||||
if (!addrs)
|
||||
if (host)
|
||||
{
|
||||
free(hostname);
|
||||
return ARES_ENOMEM;
|
||||
addrs = malloc(ancount * sizeof(struct in6_addr));
|
||||
if (!addrs)
|
||||
{
|
||||
free(hostname);
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
aliases = malloc((ancount + 1) * sizeof(char *));
|
||||
if (!aliases)
|
||||
{
|
||||
free(hostname);
|
||||
free(addrs);
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
}
|
||||
aliases = malloc((ancount + 1) * sizeof(char *));
|
||||
if (!aliases)
|
||||
else
|
||||
{
|
||||
free(hostname);
|
||||
free(addrs);
|
||||
return ARES_ENOMEM;
|
||||
addrs = NULL;
|
||||
aliases = NULL;
|
||||
}
|
||||
naddrs = 0;
|
||||
naliases = 0;
|
||||
@@ -109,13 +128,33 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
rr_type = DNS_RR_TYPE(aptr);
|
||||
rr_class = DNS_RR_CLASS(aptr);
|
||||
rr_len = DNS_RR_LEN(aptr);
|
||||
rr_ttl = DNS_RR_TTL(aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_AAAA
|
||||
&& rr_len == sizeof(struct in6_addr)
|
||||
&& strcasecmp(rr_name, hostname) == 0)
|
||||
{
|
||||
memcpy(&addrs[naddrs], aptr, sizeof(struct in6_addr));
|
||||
if (addrs)
|
||||
{
|
||||
if (aptr + sizeof(struct in6_addr) > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
memcpy(&addrs[naddrs], aptr, sizeof(struct in6_addr));
|
||||
}
|
||||
if (naddrs < max_addr_ttls)
|
||||
{
|
||||
struct addr6ttl * const at = &addrttls[naddrs];
|
||||
if (aptr + sizeof(struct in6_addr) > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
memcpy(&at->ip6addr, aptr, sizeof(struct in6_addr));
|
||||
at->ttl = rr_ttl;
|
||||
}
|
||||
naddrs++;
|
||||
status = ARES_SUCCESS;
|
||||
}
|
||||
@@ -123,7 +162,10 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
if (rr_class == C_IN && rr_type == T_CNAME)
|
||||
{
|
||||
/* Record the RR name as an alias. */
|
||||
aliases[naliases] = rr_name;
|
||||
if (aliases)
|
||||
aliases[naliases] = rr_name;
|
||||
else
|
||||
free(rr_name);
|
||||
naliases++;
|
||||
|
||||
/* Decode the RR data and replace the hostname with it. */
|
||||
@@ -132,6 +174,10 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
break;
|
||||
free(hostname);
|
||||
hostname = rr_data;
|
||||
|
||||
/* Take the min of the TTLs we see in the CNAME chain. */
|
||||
if (cname_ttl > rr_ttl)
|
||||
cname_ttl = rr_ttl;
|
||||
}
|
||||
else
|
||||
free(rr_name);
|
||||
@@ -148,32 +194,51 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
status = ARES_ENODATA;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
/* We got our answer. Allocate memory to build the host entry. */
|
||||
aliases[naliases] = NULL;
|
||||
hostent = malloc(sizeof(struct hostent));
|
||||
if (hostent)
|
||||
/* We got our answer. */
|
||||
if (naddrttls)
|
||||
{
|
||||
hostent->h_addr_list = malloc((naddrs + 1) * sizeof(char *));
|
||||
if (hostent->h_addr_list)
|
||||
const int n = naddrs < max_addr_ttls ? naddrs : max_addr_ttls;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
/* Fill in the hostent and return successfully. */
|
||||
hostent->h_name = hostname;
|
||||
hostent->h_aliases = aliases;
|
||||
hostent->h_addrtype = AF_INET6;
|
||||
hostent->h_length = sizeof(struct in6_addr);
|
||||
for (i = 0; i < naddrs; i++)
|
||||
hostent->h_addr_list[i] = (char *) &addrs[i];
|
||||
hostent->h_addr_list[naddrs] = NULL;
|
||||
*host = hostent;
|
||||
return ARES_SUCCESS;
|
||||
/* Ensure that each A TTL is no larger than the CNAME TTL. */
|
||||
if (addrttls[i].ttl > cname_ttl)
|
||||
addrttls[i].ttl = cname_ttl;
|
||||
}
|
||||
free(hostent);
|
||||
*naddrttls = n;
|
||||
}
|
||||
if (aliases)
|
||||
aliases[naliases] = NULL;
|
||||
if (host)
|
||||
{
|
||||
/* Allocate memory to build the host entry. */
|
||||
hostent = malloc(sizeof(struct hostent));
|
||||
if (hostent)
|
||||
{
|
||||
hostent->h_addr_list = malloc((naddrs + 1) * sizeof(char *));
|
||||
if (hostent->h_addr_list)
|
||||
{
|
||||
/* Fill in the hostent and return successfully. */
|
||||
hostent->h_name = hostname;
|
||||
hostent->h_aliases = aliases;
|
||||
hostent->h_addrtype = AF_INET6;
|
||||
hostent->h_length = sizeof(struct in6_addr);
|
||||
for (i = 0; i < naddrs; i++)
|
||||
hostent->h_addr_list[i] = (char *) &addrs[i];
|
||||
hostent->h_addr_list[naddrs] = NULL;
|
||||
*host = hostent;
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
free(hostent);
|
||||
}
|
||||
status = ARES_ENOMEM;
|
||||
}
|
||||
status = ARES_ENOMEM;
|
||||
}
|
||||
for (i = 0; i < naliases; i++)
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
if (aliases)
|
||||
{
|
||||
for (i = 0; i < naliases; i++)
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
}
|
||||
free(addrs);
|
||||
free(hostname);
|
||||
return status;
|
||||
|
@@ -28,6 +28,9 @@
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -44,6 +47,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
const unsigned char *aptr;
|
||||
char *ptrname, *hostname, *rr_name, *rr_data;
|
||||
struct hostent *hostent;
|
||||
int aliascnt = 0;
|
||||
char ** aliases;
|
||||
|
||||
/* Set *host to NULL for all failure cases. */
|
||||
*host = NULL;
|
||||
@@ -72,6 +77,12 @@ 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 *));
|
||||
if (!aliases)
|
||||
{
|
||||
free(ptrname);
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
for (i = 0; i < (int)ancount; i++)
|
||||
{
|
||||
/* Decode the RR up to the data field. */
|
||||
@@ -99,6 +110,16 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
if (hostname)
|
||||
free(hostname);
|
||||
hostname = rr_data;
|
||||
aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char *));
|
||||
if (!aliases[aliascnt])
|
||||
{
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
strncpy(aliases[aliascnt], rr_data, strlen(rr_data)+1);
|
||||
aliascnt++;
|
||||
if ((aliascnt%8)==0)
|
||||
aliases = (char **) realloc(aliases, (aliascnt/16+1) * sizeof(char *));
|
||||
}
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_CNAME)
|
||||
@@ -134,17 +155,20 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
hostent->h_addr_list[0] = malloc(addrlen);
|
||||
if (hostent->h_addr_list[0])
|
||||
{
|
||||
hostent->h_aliases = malloc(sizeof (char *));
|
||||
hostent->h_aliases = malloc((aliascnt+1) * sizeof (char *));
|
||||
if (hostent->h_aliases)
|
||||
{
|
||||
/* Fill in the hostent and return successfully. */
|
||||
hostent->h_name = hostname;
|
||||
hostent->h_aliases[0] = NULL;
|
||||
for (i=0 ; i<aliascnt ; i++)
|
||||
hostent->h_aliases[i] = aliases[i];
|
||||
hostent->h_aliases[aliascnt] = NULL;
|
||||
hostent->h_addrtype = family;
|
||||
hostent->h_length = addrlen;
|
||||
memcpy(hostent->h_addr_list[0], addr, addrlen);
|
||||
hostent->h_addr_list[1] = NULL;
|
||||
*host = hostent;
|
||||
free(aliases);
|
||||
free(ptrname);
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
@@ -156,6 +180,10 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
}
|
||||
status = ARES_ENOMEM;
|
||||
}
|
||||
for (i=0 ; i<aliascnt ; i++)
|
||||
if (aliases[i])
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
if (hostname)
|
||||
free(hostname);
|
||||
free(ptrname);
|
||||
|
@@ -4,6 +4,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2008 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -18,6 +19,14 @@
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -40,7 +49,7 @@
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_TIMEOUT 5
|
||||
#define DEFAULT_TIMEOUT 5000 /* milliseconds */
|
||||
#define DEFAULT_TRIES 4
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
@@ -141,7 +150,7 @@ struct server_state {
|
||||
struct query {
|
||||
/* Query ID from qbuf, for faster lookup, and current timeout */
|
||||
unsigned short qid;
|
||||
time_t timeout;
|
||||
struct timeval timeout;
|
||||
|
||||
/*
|
||||
* Links for the doubly-linked lists in which we insert a query.
|
||||
@@ -209,7 +218,7 @@ typedef struct rc4_key
|
||||
struct ares_channeldata {
|
||||
/* Configuration data */
|
||||
int flags;
|
||||
int timeout;
|
||||
int timeout; /* in milliseconds */
|
||||
int tries;
|
||||
int ndots;
|
||||
int udp_port;
|
||||
@@ -234,7 +243,8 @@ struct ares_channeldata {
|
||||
/* Generation number to use for the next TCP socket open/close */
|
||||
int tcp_connection_generation;
|
||||
|
||||
/* The time at which we last called process_timeouts() */
|
||||
/* The time at which we last called process_timeouts(). Uses integer seconds
|
||||
just to draw the line somewhere. */
|
||||
time_t last_timeout_processed;
|
||||
|
||||
/* Circular, doubly-linked list of queries, bucketed various ways.... */
|
||||
@@ -251,13 +261,27 @@ struct ares_channeldata {
|
||||
void *sock_state_cb_data;
|
||||
};
|
||||
|
||||
/* return true if now is exactly check time or later */
|
||||
int ares__timedout(struct timeval *now,
|
||||
struct timeval *check);
|
||||
/* add the specific number of milliseconds to the time in the first argument */
|
||||
int ares__timeadd(struct timeval *now,
|
||||
int millisecs);
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
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, time_t now);
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
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);
|
||||
struct timeval ares__tvnow(void);
|
||||
#if 0 /* Not used */
|
||||
long ares__tvdiff(struct timeval t1, struct timeval t2);
|
||||
#endif
|
||||
|
||||
#define ARES_SWAP_BYTE(a,b) \
|
||||
{ unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2008 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -42,8 +43,14 @@
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#endif /* WIN32 && !WATT32 */
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -68,21 +75,25 @@
|
||||
|
||||
static int try_again(int errnum);
|
||||
static void write_tcp_data(ares_channel channel, fd_set *write_fds,
|
||||
ares_socket_t write_fd, time_t now);
|
||||
ares_socket_t write_fd, struct timeval *now);
|
||||
static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now);
|
||||
ares_socket_t read_fd, struct timeval *now);
|
||||
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now);
|
||||
ares_socket_t read_fd, struct timeval *now);
|
||||
static void advance_tcp_send_queue(ares_channel channel, int whichserver,
|
||||
ssize_t num_bytes);
|
||||
static void process_timeouts(ares_channel channel, time_t now);
|
||||
static void process_broken_connections(ares_channel channel, time_t now);
|
||||
static void process_timeouts(ares_channel channel, struct timeval *now);
|
||||
static void process_broken_connections(ares_channel channel,
|
||||
struct timeval *now);
|
||||
static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
int alen, int whichserver, int tcp, time_t now);
|
||||
static void handle_error(ares_channel channel, int whichserver, time_t now);
|
||||
int alen, int whichserver, int tcp,
|
||||
struct timeval *now);
|
||||
static void handle_error(ares_channel channel, int whichserver,
|
||||
struct timeval *now);
|
||||
static void skip_server(ares_channel channel, struct query *query,
|
||||
int whichserver);
|
||||
static void next_server(ares_channel channel, struct query *query, time_t now);
|
||||
static void next_server(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
static int configure_socket(int s, ares_channel channel);
|
||||
static int open_tcp_socket(ares_channel channel, struct server_state *server);
|
||||
static int open_udp_socket(ares_channel channel, struct server_state *server);
|
||||
@@ -91,19 +102,57 @@ static int same_questions(const unsigned char *qbuf, int qlen,
|
||||
static void end_query(ares_channel channel, struct query *query, int status,
|
||||
unsigned char *abuf, int alen);
|
||||
|
||||
/* return true if now is exactly check time or later */
|
||||
int ares__timedout(struct timeval *now,
|
||||
struct timeval *check)
|
||||
{
|
||||
int secs = (now->tv_sec - check->tv_sec);
|
||||
|
||||
if(secs > 0)
|
||||
return 1; /* yes, timed out */
|
||||
if(secs < 0)
|
||||
return 0; /* nope, not timed out */
|
||||
|
||||
/* if the full seconds were identical, check the sub second parts */
|
||||
return (now->tv_usec - check->tv_usec >= 0);
|
||||
}
|
||||
|
||||
/* add the specific number of milliseconds to the time in the first argument */
|
||||
int ares__timeadd(struct timeval *now,
|
||||
int millisecs)
|
||||
{
|
||||
now->tv_sec += millisecs/1000;
|
||||
now->tv_usec += (millisecs%1000)*1000;
|
||||
|
||||
if(now->tv_usec >= 1000000) {
|
||||
++(now->tv_sec);
|
||||
now->tv_usec -= 1000000;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check)
|
||||
{
|
||||
return (check->tv_sec - now->tv_sec)*1000 +
|
||||
(check->tv_usec - now->tv_usec)/1000;
|
||||
}
|
||||
|
||||
|
||||
/* Something interesting happened on the wire, or there was a timeout.
|
||||
* See what's up and respond accordingly.
|
||||
*/
|
||||
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
|
||||
{
|
||||
time_t now;
|
||||
struct timeval now = ares__tvnow();
|
||||
|
||||
time(&now);
|
||||
write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, now);
|
||||
read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, now);
|
||||
read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, now);
|
||||
process_timeouts(channel, now);
|
||||
process_broken_connections(channel, now);
|
||||
write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, &now);
|
||||
read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, &now);
|
||||
read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, &now);
|
||||
process_timeouts(channel, &now);
|
||||
process_broken_connections(channel, &now);
|
||||
}
|
||||
|
||||
/* Something interesting happened on the wire, or there was a timeout.
|
||||
@@ -114,13 +163,12 @@ void ares_process_fd(ares_channel channel,
|
||||
file descriptors */
|
||||
ares_socket_t write_fd)
|
||||
{
|
||||
time_t now;
|
||||
struct timeval now = ares__tvnow();
|
||||
|
||||
time(&now);
|
||||
write_tcp_data(channel, NULL, write_fd, now);
|
||||
read_tcp_data(channel, NULL, read_fd, now);
|
||||
read_udp_packets(channel, NULL, read_fd, now);
|
||||
process_timeouts(channel, now);
|
||||
write_tcp_data(channel, NULL, write_fd, &now);
|
||||
read_tcp_data(channel, NULL, read_fd, &now);
|
||||
read_udp_packets(channel, NULL, read_fd, &now);
|
||||
process_timeouts(channel, &now);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +203,7 @@ static int try_again(int errnum)
|
||||
static void write_tcp_data(ares_channel channel,
|
||||
fd_set *write_fds,
|
||||
ares_socket_t write_fd,
|
||||
time_t now)
|
||||
struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
struct send_request *sendreq;
|
||||
@@ -174,7 +222,8 @@ static void write_tcp_data(ares_channel channel,
|
||||
/* Make sure server has data to send and is selected in write_fds or
|
||||
write_fd. */
|
||||
server = &channel->servers[i];
|
||||
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD || server->is_broken)
|
||||
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD ||
|
||||
server->is_broken)
|
||||
continue;
|
||||
|
||||
if(write_fds) {
|
||||
@@ -278,7 +327,7 @@ static void advance_tcp_send_queue(ares_channel channel, int whichserver,
|
||||
* a packet if we finish reading one.
|
||||
*/
|
||||
static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now)
|
||||
ares_socket_t read_fd, struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
int i;
|
||||
@@ -374,12 +423,16 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
|
||||
/* If any UDP sockets select true for reading, process them. */
|
||||
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now)
|
||||
ares_socket_t read_fd, struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
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 */
|
||||
@@ -413,11 +466,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);
|
||||
@@ -425,7 +491,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
}
|
||||
|
||||
/* If any queries have timed out, note the timeout and move them on. */
|
||||
static void process_timeouts(ares_channel channel, time_t now)
|
||||
static void process_timeouts(ares_channel channel, struct timeval *now)
|
||||
{
|
||||
time_t t; /* the time of the timeouts we're processing */
|
||||
struct query *query;
|
||||
@@ -438,14 +504,14 @@ static void process_timeouts(ares_channel channel, time_t now)
|
||||
* only a handful of requests that fall into the "now" bucket, so
|
||||
* this should be quite quick.
|
||||
*/
|
||||
for (t = channel->last_timeout_processed; t <= now; t++)
|
||||
for (t = channel->last_timeout_processed; t <= now->tv_sec; t++)
|
||||
{
|
||||
list_head = &(channel->queries_by_timeout[t % ARES_TIMEOUT_TABLE_SIZE]);
|
||||
for (list_node = list_head->next; list_node != list_head; )
|
||||
{
|
||||
query = list_node->data;
|
||||
list_node = list_node->next; /* in case the query gets deleted */
|
||||
if (query->timeout != 0 && now >= query->timeout)
|
||||
if (query->timeout.tv_sec && ares__timedout(now, &query->timeout))
|
||||
{
|
||||
query->error_status = ARES_ETIMEOUT;
|
||||
++query->timeouts;
|
||||
@@ -453,12 +519,13 @@ static void process_timeouts(ares_channel channel, time_t now)
|
||||
}
|
||||
}
|
||||
}
|
||||
channel->last_timeout_processed = now;
|
||||
channel->last_timeout_processed = now->tv_sec;
|
||||
}
|
||||
|
||||
/* Handle an answer from a server. */
|
||||
static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
int alen, int whichserver, int tcp, time_t now)
|
||||
int alen, int whichserver, int tcp,
|
||||
struct timeval *now)
|
||||
{
|
||||
int tc, rcode;
|
||||
unsigned short id;
|
||||
@@ -536,7 +603,8 @@ static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
}
|
||||
|
||||
/* Close all the connections that are no longer usable. */
|
||||
static void process_broken_connections(ares_channel channel, time_t now)
|
||||
static void process_broken_connections(ares_channel channel,
|
||||
struct timeval *now)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < channel->nservers; i++)
|
||||
@@ -549,7 +617,8 @@ static void process_broken_connections(ares_channel channel, time_t now)
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_error(ares_channel channel, int whichserver, time_t now)
|
||||
static void handle_error(ares_channel channel, int whichserver,
|
||||
struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
struct query *query;
|
||||
@@ -600,7 +669,8 @@ static void skip_server(ares_channel channel, struct query *query,
|
||||
}
|
||||
}
|
||||
|
||||
static void next_server(ares_channel channel, struct query *query, time_t now)
|
||||
static void next_server(ares_channel channel, struct query *query,
|
||||
struct timeval *now)
|
||||
{
|
||||
/* Advance to the next server or try. */
|
||||
query->server++;
|
||||
@@ -637,7 +707,8 @@ static void next_server(ares_channel channel, struct query *query, time_t now)
|
||||
end_query(channel, query, query->error_status, NULL, 0);
|
||||
}
|
||||
|
||||
void ares__send_query(ares_channel channel, struct query *query, time_t now)
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now)
|
||||
{
|
||||
struct send_request *sendreq;
|
||||
struct server_state *server;
|
||||
@@ -704,16 +775,17 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now)
|
||||
return;
|
||||
}
|
||||
}
|
||||
query->timeout = now
|
||||
+ ((query->try == 0) ? channel->timeout
|
||||
: channel->timeout << query->try / channel->nservers);
|
||||
query->timeout = *now;
|
||||
ares__timeadd(&query->timeout,
|
||||
(query->try == 0) ? channel->timeout
|
||||
: channel->timeout << query->try / channel->nservers);
|
||||
/* Keep track of queries bucketed by timeout, so we can process
|
||||
* timeout events quickly.
|
||||
*/
|
||||
ares__remove_from_list(&(query->queries_by_timeout));
|
||||
ares__insert_in_list(
|
||||
&(query->queries_by_timeout),
|
||||
&(channel->queries_by_timeout[query->timeout %
|
||||
&(channel->queries_by_timeout[query->timeout.tv_sec %
|
||||
ARES_TIMEOUT_TABLE_SIZE]));
|
||||
|
||||
/* Keep track of queries bucketed by server, so we can process server
|
||||
|
@@ -39,7 +39,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
{
|
||||
struct query *query;
|
||||
int i;
|
||||
time_t now;
|
||||
struct timeval now;
|
||||
|
||||
/* Verify that the query is at least long enough to hold the header. */
|
||||
if (qlen < HFIXEDSZ || qlen >= (1 << 16))
|
||||
@@ -74,7 +74,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 = 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.
|
||||
@@ -114,10 +115,10 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
* responses quickly.
|
||||
*/
|
||||
ares__insert_in_list(
|
||||
&(query->queries_by_qid),
|
||||
&(channel->queries_by_qid[query->qid % ARES_QID_TABLE_SIZE]));
|
||||
&(query->queries_by_qid),
|
||||
&(channel->queries_by_qid[query->qid % ARES_QID_TABLE_SIZE]));
|
||||
|
||||
/* Perform the first query action. */
|
||||
time(&now);
|
||||
ares__send_query(channel, query, now);
|
||||
now = ares__tvnow();
|
||||
ares__send_query(channel, query, &now);
|
||||
}
|
||||
|
@@ -37,16 +37,16 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||
struct query *query;
|
||||
struct list_node* list_head;
|
||||
struct list_node* list_node;
|
||||
time_t now;
|
||||
time_t offset, min_offset; /* these use time_t since some 32 bit systems
|
||||
still use 64 bit time_t! (like VS2005) */
|
||||
struct timeval now;
|
||||
struct timeval nextstop;
|
||||
long offset, min_offset;
|
||||
|
||||
/* No queries, no timeout (and no fetch of the current time). */
|
||||
if (ares__is_list_empty(&(channel->all_queries)))
|
||||
return maxtv;
|
||||
|
||||
/* Find the minimum timeout for the current set of queries. */
|
||||
time(&now);
|
||||
now = ares__tvnow();
|
||||
min_offset = -1;
|
||||
|
||||
list_head = &(channel->all_queries);
|
||||
@@ -54,23 +54,26 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||
list_node = list_node->next)
|
||||
{
|
||||
query = list_node->data;
|
||||
if (query->timeout == 0)
|
||||
if (query->timeout.tv_sec == 0)
|
||||
continue;
|
||||
offset = query->timeout - now;
|
||||
offset = ares__timeoffset(&now, &query->timeout);
|
||||
if (offset < 0)
|
||||
offset = 0;
|
||||
if (min_offset == -1 || offset < min_offset)
|
||||
min_offset = offset;
|
||||
}
|
||||
|
||||
/* If we found a minimum timeout and it's sooner than the one
|
||||
* specified in maxtv (if any), return it. Otherwise go with
|
||||
* maxtv.
|
||||
if(min_offset != -1) {
|
||||
nextstop.tv_sec = min_offset/1000;
|
||||
nextstop.tv_usec = (min_offset%1000)*1000;
|
||||
}
|
||||
|
||||
/* If we found a minimum timeout and it's sooner than the one specified in
|
||||
* maxtv (if any), return it. Otherwise go with maxtv.
|
||||
*/
|
||||
if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec))
|
||||
if (min_offset != -1 && (!maxtv || ares__timedout(maxtv, &nextstop)))
|
||||
{
|
||||
tvbuf->tv_sec = (long)min_offset;
|
||||
tvbuf->tv_usec = 0;
|
||||
*tvbuf = nextstop;
|
||||
return tvbuf;
|
||||
}
|
||||
else
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
#define ARES_VERSION_MAJOR 1
|
||||
#define ARES_VERSION_MINOR 5
|
||||
#define ARES_VERSION_PATCH 0
|
||||
#define ARES_VERSION_PATCH 4
|
||||
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
||||
(ARES_VERSION_MINOR<<8)|\
|
||||
(ARES_VERSION_PATCH))
|
||||
#define ARES_VERSION_STR "1.5.0-CVS"
|
||||
#define ARES_VERSION_STR "1.5.4-CVS"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -3,7 +3,8 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
/* Copyright (C) 2005 by Dominick Meglio
|
||||
*
|
||||
* 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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
${LIBTOOLIZE:-libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS
|
||||
${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
|
||||
@@ -97,6 +97,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
|
||||
|
||||
@@ -159,24 +183,58 @@
|
||||
/* Define this if you have struct timeval */
|
||||
#define HAVE_STRUCT_TIMEVAL 1
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* COMPILER SPECIFIC */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
/* Define to avoid VS2005 complaining about portable C functions */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#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. */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0501
|
||||
# endif
|
||||
# ifndef WINVER
|
||||
# define WINVER 0x0501
|
||||
# endif
|
||||
# if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
|
||||
# error VS2008 does not support Windows build targets prior to WinXP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* IPV6 COMPATIBILITY */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
/* Define this if you have address family AF_INET6 */
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#define HAVE_AF_INET6 1
|
||||
#endif
|
||||
|
||||
/* Define this if you have protocol family PF_INET6 */
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#define HAVE_PF_INET6 1
|
||||
#endif
|
||||
|
||||
/* Define this if you have struct in6_addr */
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
#endif
|
||||
|
||||
/* Define this if you have struct sockaddr_in6 */
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
#endif
|
||||
|
||||
/* Define this if you have sockaddr_in6 with scopeid */
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __ARES_CONFIG_WIN32_H */
|
||||
|
@@ -1,11 +1,60 @@
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(ares_init.c)
|
||||
|
||||
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])
|
||||
|
||||
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
AM_INIT_AUTOMAKE(c-ares, CVS)
|
||||
|
||||
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
|
||||
@@ -15,14 +64,23 @@ AC_CANONICAL_HOST
|
||||
dnl Get system canonical name
|
||||
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
|
||||
|
||||
AC_AIX
|
||||
AC_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])
|
||||
;;
|
||||
solaris*)
|
||||
AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl support building of Windows DLLs
|
||||
@@ -46,6 +104,8 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
||||
dnl when doing the debug stuff, use static library only
|
||||
AC_DISABLE_SHARED
|
||||
|
||||
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])
|
||||
@@ -53,15 +113,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
||||
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
|
||||
@@ -70,16 +121,22 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
||||
esac ],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
AM_CONDITIONAL(DEBUGBUILD, test x$debugbuild = xyes)
|
||||
AM_CONDITIONAL(CURLDEBUG, 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],[])
|
||||
|
||||
@@ -100,7 +157,7 @@ AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin | *-*-mingw* | *-*-pw32*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
@@ -154,6 +211,73 @@ case $host in
|
||||
#
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([whether we are using the IBM C compiler])
|
||||
CURL_CHECK_DEF([__IBMC__], [], [silent])
|
||||
if test "$curl_cv_have_def___IBMC__" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl Ensure that compiler optimizations are always thread-safe.
|
||||
CFLAGS="$CFLAGS -qthreaded"
|
||||
dnl Disable type based strict aliasing optimizations, using worst
|
||||
dnl case aliasing assumptions when compiling. Type based aliasing
|
||||
dnl would restrict the lvalues that could be safely used to access
|
||||
dnl a data object.
|
||||
CFLAGS="$CFLAGS -qnoansialias"
|
||||
dnl Force compiler to stop after the compilation phase, without
|
||||
dnl generating an object code file when compilation has errors.
|
||||
CFLAGS="$CFLAGS -qhalt=e"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether we are using the DEC/Compaq C compiler])
|
||||
CURL_CHECK_DEF([__DECC], [], [silent])
|
||||
CURL_CHECK_DEF([__DECC_VER], [], [silent])
|
||||
if test "$curl_cv_have_def___DECC" = "yes" &&
|
||||
test "$curl_cv_have_def___DECC_VER" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl Select strict ANSI C compiler mode
|
||||
CFLAGS="$CFLAGS -std1"
|
||||
dnl Turn off optimizer ANSI C aliasing rules
|
||||
CFLAGS="$CFLAGS -noansi_alias"
|
||||
dnl Select a higher warning level than default level2
|
||||
CFLAGS="$CFLAGS -msg_enable level3"
|
||||
dnl Generate warnings for missing function prototypes
|
||||
CFLAGS="$CFLAGS -warnprotos"
|
||||
dnl Change some warnings into fatal errors
|
||||
CFLAGS="$CFLAGS -msg_fatal toofewargs,toomanyargs"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
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 **********************************************************************
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||
dnl this specific header files. And do them before its results are used.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_HEADER_WINDOWS
|
||||
CURL_CHECK_NATIVE_WINDOWS
|
||||
case X-"$ac_cv_native_windows" in
|
||||
X-yes)
|
||||
CURL_CHECK_HEADER_WINSOCK
|
||||
CURL_CHECK_HEADER_WINSOCK2
|
||||
CURL_CHECK_HEADER_WS2TCPIP
|
||||
;;
|
||||
*)
|
||||
ac_cv_header_winsock_h="no"
|
||||
ac_cv_header_winsock2_h="no"
|
||||
ac_cv_header_ws2tcpip_h="no"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
@@ -184,49 +308,107 @@ then
|
||||
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lnsl -lsocket $LIBS"
|
||||
AC_TRY_LINK( ,
|
||||
[gethostbyname();],
|
||||
[ dnl found it!
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
AC_MSG_RESULT([yes])],
|
||||
[ dnl failed!
|
||||
AC_MSG_RESULT([no])
|
||||
dnl restore LIBS
|
||||
LIBS=$my_ac_save_LIBS]
|
||||
)
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
gethostbyname();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for Msys/Mingw
|
||||
AC_MSG_CHECKING([for gethostbyname in ws2_32])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lws2_32 $LIBS"
|
||||
AC_TRY_LINK([#include <winsock2.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
ws2="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
[ dnl failed, restore LIBS
|
||||
LIBS=$my_ac_save_LIBS
|
||||
AC_MSG_RESULT(no)]
|
||||
)
|
||||
dnl This is for winsock systems
|
||||
if test "$ac_cv_header_windows_h" = "yes"; then
|
||||
if test "$ac_cv_header_winsock_h" = "yes"; then
|
||||
case $host in
|
||||
*-*-mingw32ce*)
|
||||
winsock_LIB="-lwinsock"
|
||||
;;
|
||||
*)
|
||||
winsock_LIB="-lwsock32"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test "$ac_cv_header_winsock2_h" = "yes"; then
|
||||
winsock_LIB="-lws2_32"
|
||||
fi
|
||||
if test ! -z "$winsock_LIB"; then
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="$winsock_LIB $LIBS"
|
||||
AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#ifdef HAVE_WINSOCK_H
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
winsock_LIB=""
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for Minix 3.1
|
||||
AC_MSG_CHECKING([for gethostbyname for Minix 3])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
/* Older Minix versions may need <net/gen/netdb.h> here instead */
|
||||
#include <netdb.h>
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for eCos with a stubbed DNS implementation
|
||||
AC_MSG_CHECKING([for gethostbyname for eCos])
|
||||
AC_TRY_LINK([
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
#include <netdb.h>
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
@@ -258,8 +440,11 @@ fi
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
|
||||
dnl dl lib?
|
||||
AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ])
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
dnl check for additional required libraries.
|
||||
dnl **********************************************************************
|
||||
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
|
||||
|
||||
AC_MSG_CHECKING([whether to use libgcc])
|
||||
AC_ARG_ENABLE(libgcc,
|
||||
@@ -326,23 +511,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"
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
@@ -353,18 +521,6 @@ dnl **********************************************************************
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||
dnl this specific header files. And do them before its results are used.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_HEADER_WINDOWS
|
||||
CURL_CHECK_HEADER_WINSOCK
|
||||
CURL_CHECK_HEADER_WINSOCK2
|
||||
CURL_CHECK_HEADER_WS2TCPIP
|
||||
|
||||
CURL_CHECK_HEADER_MALLOC
|
||||
|
||||
dnl check for a few basic system headers we need
|
||||
@@ -380,7 +536,9 @@ AC_CHECK_HEADERS(
|
||||
netinet/tcp.h \
|
||||
net/if.h \
|
||||
errno.h \
|
||||
strings.h \
|
||||
stdbool.h \
|
||||
time.h \
|
||||
arpa/nameser.h \
|
||||
arpa/nameser_compat.h \
|
||||
arpa/inet.h,
|
||||
@@ -424,7 +582,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"
|
||||
)
|
||||
|
||||
@@ -467,9 +626,8 @@ TYPE_SIG_ATOMIC_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
CURL_CHECK_FUNC_RECV
|
||||
|
||||
CURL_CHECK_FUNC_RECVFROM
|
||||
CURL_CHECK_FUNC_SEND
|
||||
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
dnl check for AF_INET6
|
||||
@@ -638,23 +796,27 @@ 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
|
||||
@@ -831,8 +993,15 @@ AC_HELP_STRING([--with-random=FILE],
|
||||
[read randomness from FILE (default=/dev/urandom)]),
|
||||
[ RANDOM_FILE="$withval" ],
|
||||
[
|
||||
dnl Check for random device
|
||||
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
|
||||
dnl Check for random device. If we're cross compiling, we can't
|
||||
dnl check, and it's better to assume it doesn't exist than it is
|
||||
dnl to fail on AC_CHECK_FILE or later.
|
||||
if test "$cross_compiling" = "no"; then
|
||||
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
|
||||
else
|
||||
AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none])
|
||||
fi
|
||||
|
||||
]
|
||||
)
|
||||
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
|
||||
@@ -841,4 +1010,8 @@ if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
|
||||
[a suitable file/device to read random data from])
|
||||
fi
|
||||
|
||||
AC_OUTPUT(Makefile libcares.pc)
|
||||
CARES_PRIVATE_LIBS="$LIBS"
|
||||
AC_SUBST(CARES_PRIVATE_LIBS)
|
||||
|
||||
AC_CONFIG_FILES([Makefile libcares.pc])
|
||||
AC_OUTPUT
|
||||
|
36
ares/get_ver.awk
Normal file
36
ares/get_ver.awk
Normal file
@@ -0,0 +1,36 @@
|
||||
# ***************************************************************************
|
||||
# * Project: c-ares
|
||||
# *
|
||||
# * $Id$
|
||||
# ***************************************************************************
|
||||
# awk script which fetches c-ares version number and string from input
|
||||
# file and writes them to STDOUT. Here you can get an awk version for Win32:
|
||||
# http://www.gknw.net/development/prgtools/awk-20070501.zip
|
||||
#
|
||||
BEGIN {
|
||||
if (match (ARGV[1], /ares_version.h/)) {
|
||||
while ((getline < ARGV[1]) > 0) {
|
||||
if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) {
|
||||
libcares_copyright_str = substr($0, 25, length($0)-25);
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) {
|
||||
libcares_ver_str = substr($3, 2, length($3)-2);
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) {
|
||||
libcares_ver_major = substr($3, 1, length($3));
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) {
|
||||
libcares_ver_minor = substr($3, 1, length($3));
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) {
|
||||
libcares_ver_patch = substr($3, 1, length($3));
|
||||
}
|
||||
}
|
||||
libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch;
|
||||
print "LIBCARES_VERSION = " libcares_ver "";
|
||||
print "LIBCARES_VERSION_STR = " libcares_ver_str "";
|
||||
print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,8 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
/* Copyright (C) 2005 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
|
||||
|
@@ -3,7 +3,8 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
/* Copyright (C) 2005 by Dominick Meglio
|
||||
*
|
||||
* 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
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# / __|____ / _` | '__/ _ \/ __|
|
||||
# | (_|_____| (_| | | | __/\__ \
|
||||
# \___| \__,_|_| \___||___/
|
||||
# $id: $
|
||||
# $Id$
|
||||
#
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
@@ -12,9 +12,10 @@ includedir=@includedir@
|
||||
|
||||
Name: c-ares
|
||||
URL: http://daniel.haxx.se/projects/c-ares/
|
||||
Description: asyncronous DNS lookup library
|
||||
Description: asynchronous DNS lookup library
|
||||
Version: @VERSION@
|
||||
Requires:
|
||||
Requires.private:
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lcares
|
||||
Libs.private: @CARES_PRIVATE_LIBS@
|
||||
|
442
ares/m4/cares-reentrant.m4
Normal file
442
ares/m4/cares-reentrant.m4
Normal file
@@ -0,0 +1,442 @@
|
||||
#***************************************************************************
|
||||
# $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 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], [
|
||||
#
|
||||
tmp_need_reentrant="no"
|
||||
#
|
||||
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_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_FUNCTIONS_R
|
||||
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
|
||||
#
|
||||
])
|
||||
|
10
ares/maketgz
10
ares/maketgz
@@ -38,11 +38,11 @@ if(!-f "configure") {
|
||||
`./buildconf`;
|
||||
}
|
||||
print "adding $version in the configure.ac file\n";
|
||||
`sed -e 's/AM_INIT_AUTOMAKE(c-ares, CVS)/AM_INIT_AUTOMAKE(c-ares, $version)/' < configure.ac > configure.ac-rel`;
|
||||
`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";
|
||||
`autoconf configure.ac-rel >configure`;
|
||||
`autoconf configure.ac.dist >configure`;
|
||||
|
||||
# now run this new configure to get a fine makefile
|
||||
print "running configure\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-rel`;
|
||||
`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";
|
||||
|
@@ -7,17 +7,12 @@
|
||||
port build */
|
||||
|
||||
#ifndef NETWARE
|
||||
#ifndef __CYGWIN__
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <process.h> /* for the _getpid() proto */
|
||||
#endif /* !NETWARE */
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef NETWARE
|
||||
|
||||
#define MAXHOSTNAMELEN 256
|
||||
|
||||
/* Structure for scatter/gather I/O. */
|
||||
struct iovec
|
||||
{
|
||||
@@ -32,13 +27,6 @@ struct iovec
|
||||
int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
|
||||
#define writev(s,vect,count) ares_writev(s,vect,count)
|
||||
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
struct timezone { int dummy; };
|
||||
#endif
|
||||
|
||||
int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
#define gettimeofday(tv,tz) ares_gettimeofday(tv,tz)
|
||||
|
||||
#endif /* !NETWARE */
|
||||
|
||||
#define NS_CMPRSFLGS 0xc0
|
||||
|
24
ares/setup.h
24
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
|
||||
@@ -16,13 +16,11 @@
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#if !defined(WIN32) && defined(__WIN32__)
|
||||
/* Borland fix */
|
||||
#define WIN32
|
||||
#endif
|
||||
/*
|
||||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
|
||||
#if !defined(WIN32) && defined(_WIN32)
|
||||
/* VS2005 on x64 fix */
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
@@ -41,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,
|
||||
|
@@ -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
|
||||
@@ -100,11 +100,10 @@ struct timeval {
|
||||
* definition is present the other one also is available.
|
||||
*/
|
||||
|
||||
#if defined(WIN32) && !defined(HAVE_SOCKLEN_T)
|
||||
#if defined(WIN32) && !defined(HAVE_CONFIG_H)
|
||||
# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \
|
||||
(!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) )
|
||||
# define socklen_t int
|
||||
# define HAVE_SOCKLEN_T
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -192,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.
|
||||
|
2
ares/vc/.cvsignore
Normal file
2
ares/vc/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
vc.ncb
|
||||
vc.opt
|
3
ares/vc/acountry/.cvsignore
Normal file
3
ares/vc/acountry/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
acountry.dep
|
||||
acountry.mak
|
||||
acountry.plg
|
110
ares/vc/acountry/acountry.dsp
Normal file
110
ares/vc/acountry/acountry.dsp
Normal file
@@ -0,0 +1,110 @@
|
||||
# Microsoft Developer Studio Project File - Name="acountry" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=acountry - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "acountry.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "acountry.mak" CFG="acountry - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "acountry - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "acountry - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "acountry - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "acountry - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "acountry - Win32 Release"
|
||||
# Name "acountry - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\acountry.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_getopt.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_getopt.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
3
ares/vc/adig/.cvsignore
Normal file
3
ares/vc/adig/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
adig.dep
|
||||
adig.mak
|
||||
adig.plg
|
@@ -1,2 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by adig.mak
|
||||
|
@@ -41,16 +41,16 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "adig - Win32 Debug"
|
||||
|
||||
@@ -65,16 +65,16 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
3
ares/vc/ahost/.cvsignore
Normal file
3
ares/vc/ahost/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
ahost.dep
|
||||
ahost.mak
|
||||
ahost.plg
|
@@ -1,2 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by ahost.mak
|
||||
|
@@ -39,17 +39,18 @@ RSC=rc.exe
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ahost - Win32 Debug"
|
||||
|
||||
@@ -62,17 +63,18 @@ LINK32=link.exe
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
3
ares/vc/areslib/.cvsignore
Normal file
3
ares/vc/areslib/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
areslib.dep
|
||||
areslib.mak
|
||||
areslib.plg
|
@@ -1,2 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by areslib.mak
|
||||
|
@@ -40,8 +40,8 @@ RSC=rc.exe
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -63,8 +63,8 @@ LIB32=link.exe -lib
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -97,6 +97,10 @@ SOURCE=..\..\ares__read_line.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares__timeval.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_cancel.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -109,6 +113,10 @@ SOURCE=..\..\ares_expand_name.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_expand_string.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_fds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@@ -3,6 +3,21 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "acountry"=".\acountry\acountry.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name areslib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "adig"=".\adig\adig.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@@ -55,37 +55,6 @@ ares_strcasecmp(const char *a, const char *b)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Number of micro-seconds between the beginning of the Windows epoch
|
||||
* (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970).
|
||||
*/
|
||||
#if defined(_MSC_VER) || defined(__WATCOMC__)
|
||||
#define EPOCH_FILETIME 11644473600000000Ui64
|
||||
#else
|
||||
#define EPOCH_FILETIME 11644473600000000ULL
|
||||
#endif
|
||||
|
||||
int
|
||||
ares_gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
FILETIME ft;
|
||||
LARGE_INTEGER li;
|
||||
__int64 t;
|
||||
|
||||
if (tv)
|
||||
{
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
li.LowPart = ft.dwLowDateTime;
|
||||
li.HighPart = ft.dwHighDateTime;
|
||||
t = li.QuadPart / 10; /* In micro-second intervals */
|
||||
t -= EPOCH_FILETIME; /* Offset to the Epoch time */
|
||||
tv->tv_sec = (long)(t / 1000000);
|
||||
tv->tv_usec = (long)(t % 1000000);
|
||||
}
|
||||
(void) tz;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ares_writev (ares_socket_t s, const struct iovec *vector, size_t count)
|
||||
{
|
||||
|
104
buildconf
104
buildconf
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2008, 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
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
@@ -202,14 +253,46 @@ 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 \
|
||||
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 +300,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"
|
||||
|
||||
|
@@ -3,11 +3,11 @@ REM set up a CVS tree to build when there's no autotools
|
||||
REM $Revision$
|
||||
REM $Date$
|
||||
|
||||
REM create ca-bundle.h
|
||||
echo /* This file is generated automatically */ >lib\ca-bundle.h
|
||||
|
||||
REM create hugehelp.c
|
||||
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
|
||||
|
811
configure.ac
811
configure.ac
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 2001 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 2001 - 2008, 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
|
||||
@@ -83,7 +83,7 @@ while test $# -gt 0; do
|
||||
if test "@USE_SSLEAY@" = "1"; then
|
||||
echo "SSL"
|
||||
NTLM=1 # OpenSSL implies NTLM
|
||||
elif test -n "@USE_GNUTLS@"; then
|
||||
elif test -n "@SSL_ENABLED@"; then
|
||||
echo "SSL"
|
||||
fi
|
||||
if test "@KRB4_ENABLED@" = "1"; then
|
||||
@@ -113,13 +113,13 @@ while test $# -gt 0; do
|
||||
--protocols)
|
||||
if test "@CURL_DISABLE_HTTP@" != "1"; then
|
||||
echo "HTTP"
|
||||
if test "@USE_SSLEAY@" = "1"; then
|
||||
if test "@SSL_ENABLED@" = "1"; then
|
||||
echo "HTTPS"
|
||||
fi
|
||||
fi
|
||||
if test "@CURL_DISABLE_FTP@" != "1"; then
|
||||
echo "FTP"
|
||||
if test "@USE_SSLEAY@" = "1"; then
|
||||
if test "@SSL_ENABLED@" = "1"; then
|
||||
echo "FTPS"
|
||||
fi
|
||||
fi
|
||||
@@ -189,7 +189,7 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--libs)
|
||||
if test "X@libdir@" != "X/usr/lib"; then
|
||||
if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
|
||||
CURLLIBDIR="-L@libdir@ "
|
||||
else
|
||||
CURLLIBDIR=""
|
||||
|
@@ -60,19 +60,27 @@ Euphoria
|
||||
http://rays-web.com/eulibcurl.htm
|
||||
|
||||
Ferite
|
||||
|
||||
Written by Paul Querna
|
||||
http://www.ferite.org/
|
||||
|
||||
Gambas
|
||||
|
||||
http://gambas.sourceforge.net
|
||||
|
||||
glib/GTK+
|
||||
|
||||
Written by Richard Atterer
|
||||
http://atterer.net/glibcurl/
|
||||
|
||||
Haskell
|
||||
|
||||
Written by Galois, Inc
|
||||
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl
|
||||
|
||||
Java
|
||||
|
||||
Maintained by Vic Hanson
|
||||
Maintained by [blank]
|
||||
http://curl.haxx.se/libcurl/java/
|
||||
|
||||
Lisp
|
||||
@@ -143,11 +151,20 @@ Rexx
|
||||
Written Mark Hessling
|
||||
http://rexxcurl.sourceforge.net/
|
||||
|
||||
RPG
|
||||
|
||||
Support for ILE/RPG on OS/400 is included in source distribution
|
||||
http://curl.haxx.se/libcurl/
|
||||
See packages/OS400/README.OS400 and packages/OS400/curl.inc.in
|
||||
|
||||
Ruby
|
||||
|
||||
Written by Ross Bamford
|
||||
curb - written by Ross Bamford
|
||||
http://curb.rubyforge.org/
|
||||
|
||||
ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
|
||||
http://curl-multi.rubyforge.org/
|
||||
|
||||
Scheme
|
||||
|
||||
Bigloo binding by Kirill Lisovsky
|
||||
|
@@ -102,6 +102,8 @@
|
||||
using spaces only (no tabs) and having the opening brace ({) on the same line
|
||||
as the if() or while().
|
||||
|
||||
Also note that we use if() and while() with no space before the parenthesis.
|
||||
|
||||
2.3 Commenting
|
||||
|
||||
Comment your source code extensively using C comments (/* comment */), DO NOT
|
||||
|
44
docs/FAQ
44
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: July 30, 2007 (http://curl.haxx.se/docs/faq.html)
|
||||
Updated: Feb 18, 2008 (http://curl.haxx.se/docs/faq.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -18,6 +18,7 @@ FAQ
|
||||
1.8 I have a problem who do I mail?
|
||||
1.9 Where do I buy commercial support for curl?
|
||||
1.10 How many are using curl?
|
||||
1.11 Why don't you update ca-bundle.crt
|
||||
|
||||
2. Install Related Problems
|
||||
2.1 configure doesn't find OpenSSL even when it is installed
|
||||
@@ -83,6 +84,7 @@ FAQ
|
||||
5.10 How do I prevent libcurl from writing the response to stdout?
|
||||
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?
|
||||
|
||||
6. License Issues
|
||||
6.1 I have a GPL program, can I use the libcurl library?
|
||||
@@ -214,8 +216,7 @@ FAQ
|
||||
improvements and have them inserted in the main sources (of course on the
|
||||
condition that developers agree on that the fixes are good).
|
||||
|
||||
The full list of the more than 530 contributors is found in the docs/THANKS
|
||||
file.
|
||||
The full list of all contributors is found in the docs/THANKS file.
|
||||
|
||||
curl is developed by a community, with Daniel at the wheel.
|
||||
|
||||
@@ -296,7 +297,7 @@ FAQ
|
||||
as used by numerous applications that include libcurl binaries in their
|
||||
distribution packages (like Adobe Acrobat Reader and Google Earth).
|
||||
|
||||
More than 70 known named companies use curl in commercial environments and
|
||||
More than 80 known named companies use curl in commercial environments and
|
||||
products. More than 100 known named open source projects depend on
|
||||
(lib)curl.
|
||||
|
||||
@@ -317,6 +318,29 @@ FAQ
|
||||
http://counter.li.org/estimates.php
|
||||
http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
|
||||
|
||||
1.11 Why don't you update ca-bundle.crt
|
||||
|
||||
The ca-bundle.crt file that used to be bundled with curl was very outdated
|
||||
(it being last modified year 2000 should tell) and must be replaced with a
|
||||
much more modern and up-to-date version by anyone who wants to verify peers
|
||||
anyway. It is no longer provided, the last curl release that shipped it was
|
||||
curl 7.18.0.
|
||||
|
||||
In the cURL project we've decided not to attempt to keep this file updated
|
||||
(or even present anymore) since deciding what to add to a ca cert bundle is
|
||||
an undertaking we've not been ready to accept, and the one we can get from
|
||||
Mozilla is perfectly fine so there's no need to duplicate that work.
|
||||
|
||||
Today, with many services performed over HTTPS, every operating system
|
||||
should come with a default ca cert bundle that can be deemed somewhat
|
||||
trustworthy and that collection (if reasonably updated) should be deemed to
|
||||
be a lot better than a private curl version.
|
||||
|
||||
If you want the most recent collection of ca certs that Mozilla Firefox
|
||||
uses, we recommend that you extract the collection yourself from Mozilla
|
||||
Firefox (by running 'make ca-bundle), or by using our online service setup
|
||||
for this purpose: http://curl.haxx.se/docs/caextract.html
|
||||
|
||||
|
||||
2. Install Related Problems
|
||||
|
||||
@@ -1033,6 +1057,18 @@ FAQ
|
||||
that makes you see and use a different IP address locally than what the
|
||||
remote server will see you coming from.
|
||||
|
||||
5.13 How do I stop an ongoing transfer?
|
||||
|
||||
There are several ways, but none of them are instant. There is no function
|
||||
you can call from another thread or similar that will stop it immediately.
|
||||
Instead you need to make sure that one of the callbacks you use return an
|
||||
appropriate value that will stop the transfer.
|
||||
|
||||
Suitable callbacks that you can do this with include the progress callback,
|
||||
the read callback and the write callback.
|
||||
|
||||
If you're using the multi interface, you also stop a transfer by removing
|
||||
the particular easy handle from the multi stack.
|
||||
|
||||
6. License Issues
|
||||
|
||||
|
131
docs/INSTALL
131
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
|
||||
=====
|
||||
@@ -188,7 +203,7 @@ Win32
|
||||
environment variables, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.3
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8e
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8g
|
||||
set LIBSSH2_PATH=c:\libssh2-0.17
|
||||
|
||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||
@@ -257,7 +272,7 @@ Win32
|
||||
Before running nmake define the OPENSSL_PATH environment variable with
|
||||
the root/base directory of OpenSSL, for example:
|
||||
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8e
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8g
|
||||
|
||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||
@@ -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,10 +374,12 @@ 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
|
||||
@@ -521,7 +565,7 @@ NetWare
|
||||
http://www.gknw.net/development/ossl/netware/
|
||||
for CLIB-based builds OpenSSL needs to be patched to build with BSD
|
||||
sockets (currently only a winsock-based CLIB build is supported):
|
||||
http://www.gknw.net/development/ossl/netware/patches/v_0.9.8e/openssl-0.9.8e.diff
|
||||
http://www.gknw.net/development/ossl/netware/patches/v_0.9.8g/openssl-0.9.8g.diff
|
||||
- optional SSH2 sources (version 0.17 or later);
|
||||
|
||||
Set a search path to your compiler, linker and tools; on Linux make
|
||||
@@ -618,49 +662,51 @@ 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
|
||||
make
|
||||
|
||||
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
|
||||
|
||||
|
||||
Symbian OS
|
||||
==========
|
||||
The Symbian OS port uses the Symbian build system to compile. From the
|
||||
packages/Symbian/group/ directory, run:
|
||||
|
||||
bldmake bldfiles
|
||||
abld build
|
||||
|
||||
to compile and install curl and libcurl. If your Symbian SDK doesn't
|
||||
include support for P.I.P.S., you will need to contact your SDK vendor
|
||||
to obtain that first.
|
||||
|
||||
|
||||
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)
|
||||
|
||||
@@ -709,13 +755,13 @@ REDUCING SIZE
|
||||
size of libcurl for embedded applications where binary size is an
|
||||
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
|
||||
and probably the -march=X option as well, e.g.:
|
||||
size of the binary. For gcc, this would mean at minimum the -Os option,
|
||||
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
|
||||
@@ -774,10 +820,12 @@ PORTS
|
||||
- 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
|
||||
- SuperH4 Linux 2.6.X
|
||||
- SH4 Linux 2.6.X
|
||||
- SH4 OS21
|
||||
- SINIX-Z v5
|
||||
- Sparc Linux
|
||||
- Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10
|
||||
@@ -785,6 +833,8 @@ PORTS
|
||||
- StrongARM (and other ARM) RISC OS 3.1, 4.02
|
||||
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6
|
||||
- StrongARM NetBSD 1.4.1
|
||||
- ARM INTEGRITY
|
||||
- Symbian OS (P.I.P.S.) 9.x
|
||||
- TPF
|
||||
- Ultrix 4.3a
|
||||
- UNICOS 9.0
|
||||
@@ -794,24 +844,27 @@ PORTS
|
||||
- i386 Esix 4.1
|
||||
- i386 FreeBSD
|
||||
- i386 HURD
|
||||
- i386 Haiku OS
|
||||
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
|
||||
- i386 MINIX 3.1
|
||||
- i386 NetBSD
|
||||
- i386 Novell NetWare
|
||||
- i386 OS/2
|
||||
- i386 OpenBSD
|
||||
- i386 QNX 6
|
||||
- i386 SCO unix
|
||||
- i386 Solaris 2.7
|
||||
- i386 Windows 95, 98, ME, NT, 2000, XP, 2003
|
||||
- i386 QNX 6
|
||||
- i486 ncr-sysv4.3.03 (NCR MP-RAS)
|
||||
- ia64 Linux 2.3.99
|
||||
- m68k AmigaOS 3
|
||||
- m68k Linux
|
||||
- m68k uClinux
|
||||
- m68k OpenBSD
|
||||
- m88k dg-dgux5.4R3.00
|
||||
- s390 Linux
|
||||
- XScale/PXA250 Linux 2.4
|
||||
- Nios II uClinux
|
||||
|
||||
Useful URLs
|
||||
===========
|
||||
|
@@ -239,7 +239,7 @@ Linker Links
|
||||
checked.
|
||||
|
||||
3- Include in the white space immediately below the box referred in 2 -lcurl
|
||||
-lws2_32 -lwinmm.
|
||||
-lws2_32.
|
||||
|
||||
SSL Files
|
||||
---------
|
||||
|
134
docs/INTERNALS
134
docs/INTERNALS
@@ -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
|
||||
===============
|
||||
|
||||
@@ -97,7 +147,9 @@ Library
|
||||
|
||||
... analyzes the URL, it separates the different components and connects to
|
||||
the remote host. This may involve using a proxy and/or using SSL. The
|
||||
Curl_gethost() function in lib/hostip.c is used for looking up host names.
|
||||
Curl_resolv() function in lib/hostip.c is used for looking up host names
|
||||
(it does then use the proper underlying method, which may vary between
|
||||
platforms and builds).
|
||||
|
||||
When Curl_connect is done, we are connected to the remote site. Then it is
|
||||
time to tell the server to get a document/file. Curl_do() arranges this.
|
||||
@@ -122,17 +174,20 @@ Library
|
||||
Curl_Transfer() function (in lib/transfer.c) to setup the transfer and
|
||||
returns.
|
||||
|
||||
Starting in 7.9.1, if this DO function fails and the connection is being
|
||||
re-used, libcurl will then close this connection, setup a new connection
|
||||
and re-issue the DO request on that. This is because there is no way to be
|
||||
perfectly sure that we have discovered a dead connection before the DO
|
||||
function and thus we might wrongly be re-using a connection that was closed
|
||||
by the remote peer.
|
||||
If this DO function fails and the connection is being re-used, libcurl will
|
||||
then close this connection, setup a new connection and re-issue the DO
|
||||
request on that. This is because there is no way to be perfectly sure that
|
||||
we have discovered a dead connection before the DO function and thus we
|
||||
might wrongly be re-using a connection that was closed by the remote peer.
|
||||
|
||||
Some time during the DO function, the Curl_setup_transfer() function must
|
||||
be called with some basic info about the upcoming transfer: what socket(s)
|
||||
to read/write and the expected file tranfer sizes (if known).
|
||||
|
||||
o Transfer()
|
||||
|
||||
Curl_perform() then calls Transfer() in lib/transfer.c that performs
|
||||
the entire file transfer.
|
||||
Curl_perform() then calls Transfer() in lib/transfer.c that performs the
|
||||
entire file transfer.
|
||||
|
||||
During transfer, the progress functions in lib/progress.c are called at a
|
||||
frequent interval (or at the user's choice, a specified callback might get
|
||||
@@ -236,9 +291,8 @@ Library
|
||||
URL encoding and decoding, called escaping and unescaping in the source code,
|
||||
is found in lib/escape.c.
|
||||
|
||||
While transfering data in Transfer() a few functions might get
|
||||
used. curl_getdate() in lib/getdate.c is for HTTP date comparisons (and
|
||||
more).
|
||||
While transfering data in Transfer() a few functions might get used.
|
||||
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
|
||||
|
||||
lib/getenv.c offers curl_getenv() which is for reading environment variables
|
||||
in a neat platform independent way. That's used in the client, but also in
|
||||
@@ -254,10 +308,6 @@ Library
|
||||
A function named curl_version() that returns the full curl version string is
|
||||
found in lib/version.c.
|
||||
|
||||
If authentication is requested but no password is given, a getpass_r() clone
|
||||
exists in lib/getpass.c. libcurl offers a custom callback that can be used
|
||||
instead of this, but it doesn't change much to us.
|
||||
|
||||
Persistent Connections
|
||||
======================
|
||||
|
||||
@@ -269,9 +319,11 @@ Persistent Connections
|
||||
all the options etc that the library-user may choose.
|
||||
o The 'SessionHandle' struct holds the "connection cache" (an array of
|
||||
pointers to 'connectdata' structs). There's one connectdata struct
|
||||
allocated for each connection that libcurl knows about.
|
||||
o This also enables the 'curl handle' to be reused on subsequent transfers,
|
||||
something that was illegal before libcurl 7.7.
|
||||
allocated for each connection that libcurl knows about. Note that when you
|
||||
use the multi interface, the multi handle will hold the connection cache
|
||||
and not the particular easy handle. This of course to allow all easy handles
|
||||
in a multi stack to be able to share and re-use connections.
|
||||
o This enables the 'curl handle' to be reused on subsequent transfers.
|
||||
o When we are about to perform a transfer with curl_easy_perform(), we first
|
||||
check for an already existing connection in the cache that we can use,
|
||||
otherwise we create a new one and add to the cache. If the cache is full
|
||||
@@ -281,11 +333,46 @@ Persistent Connections
|
||||
o When the transfer operation is complete, we try to leave the connection
|
||||
open. Particular options may tell us not to, and protocols may signal
|
||||
closure on connections and then we don't keep it open of course.
|
||||
o When curl_easy_cleanup() is called, we close all still opened connections.
|
||||
o When curl_easy_cleanup() is called, we close all still opened connections,
|
||||
unless of course the multi interface "owns" the connections.
|
||||
|
||||
You do realize that the curl handle must be re-used in order for the
|
||||
persistent connections to work.
|
||||
|
||||
multi interface/non-blocking
|
||||
============================
|
||||
|
||||
We make an effort to provide a non-blocking interface to the library, the
|
||||
multi interface. To make that interface work as good as possible, no
|
||||
low-level functions within libcurl must be written to work in a blocking
|
||||
manner.
|
||||
|
||||
One of the primary reasons we introduced c-ares support was to allow the name
|
||||
resolve phase to be perfectly non-blocking as well.
|
||||
|
||||
The ultimate goal is to provide the easy interface simply by wrapping the
|
||||
multi interface functions and thus treat everything internally as the multi
|
||||
interface is the single interface we have.
|
||||
|
||||
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
|
||||
and adjust the code to allow non-blocking operations even on multi-stage
|
||||
protocols. The DICT, TELNET and TFTP are crappy examples and they are subject
|
||||
for rewrite in the future to better fit the libcurl protocol family.
|
||||
|
||||
SSL libraries
|
||||
=============
|
||||
|
||||
Originally libcurl supported SSLeay for SSL/TLS transports, but that was then
|
||||
extended to its successor OpenSSL but has since also been extended to several
|
||||
other SSL/TLS libraries and we expect and hope to further extend the support
|
||||
in future libcurl versions.
|
||||
|
||||
To deal with this internally in the best way possible, we have a generic SSL
|
||||
function API as provided by the sslgen.[ch] system, and they are the only SSL
|
||||
functions we must use from within libcurl. sslgen is then crafted to use the
|
||||
appropriate lower-level function calls to whatever SSL library that is in
|
||||
use.
|
||||
|
||||
Library Symbols
|
||||
===============
|
||||
|
||||
@@ -309,6 +396,13 @@ Return Codes and Informationals
|
||||
them. They are best used when revealing information that isn't otherwise
|
||||
obvious.
|
||||
|
||||
API/ABI
|
||||
=======
|
||||
|
||||
We make an effort to not export or show internals or how internals work, as
|
||||
that makes it easier to keep a solid API/ABI over time. See docs/libcurl/ABI
|
||||
for our promise to users.
|
||||
|
||||
Client
|
||||
======
|
||||
|
||||
|
@@ -3,6 +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!
|
||||
|
||||
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/
|
||||
|
||||
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:
|
||||
http://curl.haxx.se/mail/lib-2008-01/0277.html
|
||||
|
||||
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
||||
-y/-Y) the next attempt doesn't resume the transfer properly from what was
|
||||
downloaded in the previous attempt but will truncate and restart at the
|
||||
original position where it was at before the previous failed attempt. See
|
||||
http://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
|
||||
https://qa.mandriva.com/show_bug.cgi?id=22565
|
||||
|
||||
48. If a CONNECT response-headers are larger than BUFSIZE (16KB) when the
|
||||
connection is meant to be kept alive (like for NTLM proxy auth), the
|
||||
function will return prematurely and will confuse the rest of the HTTP
|
||||
@@ -43,23 +82,9 @@ may have been fixed since this was written!
|
||||
Also see #12. According to bug #1556528, even the SOCKS5 connect code does
|
||||
not do it right: http://curl.haxx.se/bug/view.cgi?id=1556528,
|
||||
|
||||
33. Doing multi-pass HTTP authentication on a non-default port does not work.
|
||||
This happens because the multi-pass code abuses the redirect following code
|
||||
for doing multiple requests, and when we following redirects to an absolute
|
||||
URL we must use the newly specified port and not the one specified in the
|
||||
original URL. A proper fix to this would need to separate the negotiation
|
||||
"redirect" from an actual redirect.
|
||||
|
||||
32. (At least on Windows) If libcurl is built with c-ares and there's no DNS
|
||||
server configured in the system, the ares_init() call fails and thus
|
||||
curl_easy_init() fails as well. This causes weird effects for people who use
|
||||
numerical IP addresses only.
|
||||
|
||||
31. "curl-config --libs" will include details set in LDFLAGS when configure is
|
||||
run that might be needed only for building libcurl. Similarly, it might
|
||||
include options that perhaps aren't suitable both for static and dynamic
|
||||
linking. Further, curl-config --cflags suffers from the same effects with
|
||||
CFLAGS/CPPFLAGS.
|
||||
run that might be needed only for building libcurl. Further, curl-config
|
||||
--cflags suffers from the same effects with CFLAGS/CPPFLAGS.
|
||||
|
||||
30. You need to use -g to the command line tool in order to use RFC2732-style
|
||||
IPv6 numerical addresses in URLs.
|
||||
|
55
docs/MANUAL
55
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
|
||||
@@ -154,9 +164,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 +179,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 +341,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
|
||||
|
||||
@@ -496,7 +506,7 @@ CONFIG FILE
|
||||
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.
|
||||
|
||||
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 +574,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
|
||||
@@ -875,7 +893,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 +905,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,
|
||||
|
@@ -1,21 +1,25 @@
|
||||
Peer SSL Certificate Verification
|
||||
=================================
|
||||
|
||||
libcurl performs peer SSL certificate verification by default. This is done by
|
||||
installing a default CA cert bundle on 'make install' (or similar), that CA
|
||||
bundle package is used by default on operations against SSL servers.
|
||||
libcurl performs peer SSL certificate verification by default. This is done
|
||||
by using CA cert bundle that the SSL library can use to make sure the peer's
|
||||
server certificate is valid.
|
||||
|
||||
If you communicate with HTTPS or FTPS servers using certificates that are
|
||||
signed by CAs present in the bundle, you can be sure that the remote server
|
||||
really is the one it claims to be.
|
||||
|
||||
If the remote server uses a self-signed certificate, if you don't install
|
||||
curl's CA cert bundle, if the server uses a certificate signed by a CA that
|
||||
isn't included in the bundle or if the remote host is an impostor
|
||||
Until 7.18.0, curl bundled a severely outdated ca bundle file that was
|
||||
installed by default. These days, the curl archives include no ca certs at
|
||||
all. You need to get them elsewhere. See below for example.
|
||||
|
||||
If the remote server uses a self-signed certificate, if you don't install a CA
|
||||
cert bundle, if the server uses a certificate signed by a CA that isn't
|
||||
included in the bundle you use or if the remote host is an impostor
|
||||
impersonating your favorite site, and you want to transfer files from this
|
||||
server, do one of the following:
|
||||
|
||||
1. Tell libcurl to *not* verify the peer. With libcurl you disable with with
|
||||
1. Tell libcurl to *not* verify the peer. With libcurl you disable this with
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
|
||||
With the curl command line tool, you disable this with -k/--insecure.
|
||||
@@ -27,10 +31,8 @@ server, do one of the following:
|
||||
With the curl command line tool: --cacert [file]
|
||||
|
||||
3. Add the CA cert for your server to the existing default CA cert bundle.
|
||||
The default path of the CA bundle installed with the curl package is:
|
||||
/usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running
|
||||
configure with the --with-ca-bundle option pointing out the path of your
|
||||
choice.
|
||||
The default path of the CA bundle used can be changed by running configure
|
||||
with the --with-ca-bundle option pointing out the path of your choice.
|
||||
|
||||
To do this, you need to get the CA cert for your server in PEM format and
|
||||
then append that to your CA cert bundle.
|
||||
@@ -48,8 +50,6 @@ server, do one of the following:
|
||||
o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
|
||||
as described below.
|
||||
|
||||
(Thanks to Frankie V for this description)
|
||||
|
||||
If you use the 'openssl' tool, this is one way to get extract the CA cert
|
||||
for a particular server:
|
||||
|
||||
@@ -64,8 +64,6 @@ server, do one of the following:
|
||||
cert_bundle or use it stand-alone as described. Just remember that the
|
||||
security is no better than the way you obtained the certificate.
|
||||
|
||||
(Thanks to Doug Kaufman for this description)
|
||||
|
||||
4. If you're using the curl command line tool, you can specify your own CA
|
||||
cert path by setting the environment variable CURL_CA_BUNDLE to the path
|
||||
of your choice.
|
||||
@@ -80,8 +78,9 @@ server, do one of the following:
|
||||
5. all directories along %PATH%
|
||||
|
||||
5. Get a better/different/newer CA cert bundle! One option is to extract the
|
||||
one a recent Mozilla browser uses, by following the instruction found
|
||||
here:
|
||||
one a recent Mozilla browser uses by running 'make ca-bundle' in the curl
|
||||
build tree root, or possibly download a version that was generated this
|
||||
way for you:
|
||||
|
||||
http://curl.haxx.se/docs/caextract.html
|
||||
|
||||
|
66
docs/THANKS
66
docs/THANKS
@@ -12,6 +12,8 @@ Albert Chin-A-Young
|
||||
Albert Choy
|
||||
Ale Vesely
|
||||
Aleksandar Milivojevic
|
||||
Alessandro Vesely
|
||||
Alex Fishman
|
||||
Alex Neblett
|
||||
Alex Suykov
|
||||
Alex aka WindEagle
|
||||
@@ -19,14 +21,17 @@ Alexander Kourakos
|
||||
Alexander Krasnostavsky
|
||||
Alexander Lazic
|
||||
Alexander Zhuravlev
|
||||
Alexey Pesternikov
|
||||
Alexey Simak
|
||||
Alexis Carvalho
|
||||
Allen Pulsifer
|
||||
Amol Pattekar
|
||||
Anatoli Tubman
|
||||
Anders Gustafsson
|
||||
Andi Jahja
|
||||
Andre Guibert de Bruet
|
||||
Andreas Damm
|
||||
Andreas Faerber
|
||||
Andreas Ntaflos
|
||||
Andreas Olsson
|
||||
Andreas Rieke
|
||||
@@ -36,6 +41,7 @@ Andrew Biggs
|
||||
Andrew Bushnell
|
||||
Andrew Francis
|
||||
Andrew Fuller
|
||||
Andrew Moise
|
||||
Andrew Wansink
|
||||
Andr<EFBFBD>s Garc<72>a
|
||||
Andy Cedilnik
|
||||
@@ -49,8 +55,10 @@ Arve Knudsen
|
||||
Ates Goral
|
||||
Augustus Saunders
|
||||
Avery Fay
|
||||
Bart Whiteley
|
||||
Ben Greear
|
||||
Ben Madsen
|
||||
Ben Van Hof
|
||||
Benjamin Gerard
|
||||
Bernard Leak
|
||||
Bertrand Demiddelaer
|
||||
@@ -65,6 +73,8 @@ Brent Beardsley
|
||||
Brian Akins
|
||||
Brian Dessent
|
||||
Brian R Duffy
|
||||
Brian Ulm
|
||||
Brock Noland
|
||||
Bruce Mitchener
|
||||
Bryan Henderson
|
||||
Bryan Kemp
|
||||
@@ -81,6 +91,7 @@ Christian Robottom Reis
|
||||
Christian Vogt
|
||||
Christophe Demory
|
||||
Christophe Legry
|
||||
Christopher Palow
|
||||
Christopher R. Palmer
|
||||
Ciprian Badescu
|
||||
Clarence Gardner
|
||||
@@ -99,10 +110,13 @@ Dan Becker
|
||||
Dan C
|
||||
Dan Fandrich
|
||||
Dan Nelson
|
||||
Dan Petitt
|
||||
Dan Torop
|
||||
Dan Zitter
|
||||
Daniel Black
|
||||
Daniel Cater
|
||||
Daniel Egger
|
||||
Daniel Fandrich
|
||||
Daniel Johnson
|
||||
Daniel Stenberg
|
||||
Daniel at touchtunes
|
||||
@@ -125,9 +139,11 @@ David LeBlanc
|
||||
David McCreedy
|
||||
David Odin
|
||||
David Phillips
|
||||
David Rosenstrauch
|
||||
David Shaw
|
||||
David Tarendash
|
||||
David Thiel
|
||||
David Wright
|
||||
David Yan
|
||||
Detlef Schmier
|
||||
Diego Casorran
|
||||
@@ -138,6 +154,8 @@ Dirk Eddelbuettel
|
||||
Dirk Manske
|
||||
Dmitriy Sergeyev
|
||||
Dmitry Bartsevich
|
||||
Dmitry Kurochkin
|
||||
Dmitry Popov
|
||||
Dmitry Rechkin
|
||||
Dolbneff A.V
|
||||
Domenico Andreoli
|
||||
@@ -154,11 +172,14 @@ Dylan Ellicott
|
||||
Dylan Salisbury
|
||||
Early Ehlinger
|
||||
Edin Kadribasic
|
||||
Eetu Ojanen
|
||||
Ellis Pritchard
|
||||
Emil Romanus
|
||||
Emiliano Ida
|
||||
Enrico Scholz
|
||||
Enrik Berkhan
|
||||
Eric Cooper
|
||||
Eric Landes
|
||||
Eric Lavigne
|
||||
Eric Melville
|
||||
Eric Rautman
|
||||
@@ -183,11 +204,14 @@ Frank Ticheler
|
||||
Fred New
|
||||
Fred Noz
|
||||
Frederic Lepied
|
||||
Gary Maxwell
|
||||
Gautam Kachroo
|
||||
Gautam Mani
|
||||
Gavrie Philipson
|
||||
Gaz Iqbal
|
||||
Georg Horn
|
||||
Georg Huettenegger
|
||||
Georg Lippitsch
|
||||
Georg Wicherski
|
||||
Gerd v. Egidy
|
||||
Gerhard Herre
|
||||
@@ -196,6 +220,7 @@ Giancarlo Formicuccia
|
||||
Giaslas Georgios
|
||||
Gilad
|
||||
Gilbert Ramirez Jr.
|
||||
Gilles Blanc
|
||||
Gisle Vanem
|
||||
Giuseppe Attardi
|
||||
Giuseppe D'Ambrosio
|
||||
@@ -226,9 +251,11 @@ Ian Gulliver
|
||||
Ian Turner
|
||||
Ian Wilkes
|
||||
Ignacio Vazquez-Abrams
|
||||
Igor Franchuk
|
||||
Igor Polyakov
|
||||
Ilguiz Latypov
|
||||
Ilja van Sprundel
|
||||
Immanuel Gregoire
|
||||
Ingmar Runge
|
||||
Ingo Ralf Blum
|
||||
Ingo Wilken
|
||||
@@ -253,18 +280,24 @@ Jayesh A Shah
|
||||
Jaz Fresh
|
||||
Jean Jacques Drouin
|
||||
Jean-Claude Chauve
|
||||
Jean-Francois Bertrand
|
||||
Jean-Louis Lemaire
|
||||
Jean-Marc Ranger
|
||||
Jean-Philippe Barrette-LaPierre
|
||||
Jeff Johnson
|
||||
Jeff Lawson
|
||||
Jeff Phillips
|
||||
Jeff Pohlmeyer
|
||||
Jeff Weber
|
||||
Jeffrey Pohlmeyer
|
||||
Jeremy Friesner
|
||||
Jerome Muffat-Meridol
|
||||
Jes Badwal
|
||||
Jesper Jensen
|
||||
Jesse Noller
|
||||
Jim Drash
|
||||
Joe Halpin
|
||||
Joe Malicki
|
||||
Joel Chen
|
||||
Jofell Gallardo
|
||||
Johan Anderson
|
||||
@@ -274,6 +307,7 @@ John Janssen
|
||||
John Kelly
|
||||
John Lask
|
||||
John McGowan
|
||||
Johnny Luong
|
||||
Jon Grubbs
|
||||
Jon Travis
|
||||
Jon Turner
|
||||
@@ -285,6 +319,7 @@ Jose Kahan
|
||||
Josh Kapell
|
||||
Juan F. Codagnone
|
||||
Juan Ignacio Herv<72>s
|
||||
Judson Bishop
|
||||
Juergen Wilke
|
||||
Jukka Pihl
|
||||
Julian Noble
|
||||
@@ -298,6 +333,7 @@ Kai-Uwe Rommel
|
||||
Kang-Jin Lee
|
||||
Karl Moerder
|
||||
Karol Pietrzak
|
||||
Kaspar Brand
|
||||
Katie Wang
|
||||
Kees Cook
|
||||
Keith MacDonald
|
||||
@@ -307,7 +343,9 @@ Ken Rastatter
|
||||
Kent Boortz
|
||||
Kevin Fisk
|
||||
Kevin Lussier
|
||||
Kevin Reed
|
||||
Kevin Roth
|
||||
Kim Rinnewitz
|
||||
Kimmo Kinnunen
|
||||
Kjell Ericson
|
||||
Kjetil Jacobsen
|
||||
@@ -324,9 +362,11 @@ Lars Gustafsson
|
||||
Lars J. Aas
|
||||
Lars Nilsson
|
||||
Lars Torben Wilson
|
||||
Lau Hang Kin
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Len Krause
|
||||
Liam Healy
|
||||
Linas Vepstas
|
||||
Ling Thio
|
||||
Linus Nielsen Feltzing
|
||||
@@ -348,6 +388,7 @@ Marco G. Salvagno
|
||||
Marcus Webster
|
||||
Mario Schroeder
|
||||
Mark Butler
|
||||
Mark Davies
|
||||
Mark Eichin
|
||||
Mark Lentczner
|
||||
Markus Koetter
|
||||
@@ -360,6 +401,7 @@ Martin Skinner
|
||||
Marty Kuhrt
|
||||
Maruko
|
||||
Massimiliano Ziccardi
|
||||
Mateusz Loskot
|
||||
Mathias Axelsson
|
||||
Mats Lidell
|
||||
Matt Kraai
|
||||
@@ -368,9 +410,12 @@ Matt Witherspoon
|
||||
Matthew Blain
|
||||
Matthew Clarke
|
||||
Maurice Barnum
|
||||
Max Katsev
|
||||
Maxim Perenesenko
|
||||
Mekonikum
|
||||
Mettgut Jamalla
|
||||
Michael Benedict
|
||||
Michael Calmer
|
||||
Michael Curtis
|
||||
Michael Jahn
|
||||
Michael Jerris
|
||||
@@ -383,12 +428,14 @@ Mihai Ionescu
|
||||
Mikael Sennerholm
|
||||
Mike Bytnar
|
||||
Mike Dobbs
|
||||
Mike Hommey
|
||||
Mike Protts
|
||||
Miklos Nemeth
|
||||
Mitz Wark
|
||||
Mohamed Lrhazi
|
||||
Mohun Biswas
|
||||
Moonesamy
|
||||
Nathan Coulter
|
||||
Nathan O'Sullivan
|
||||
Nathanael Nerode
|
||||
Naveen Noel
|
||||
@@ -404,9 +451,13 @@ Nicolas Croiset
|
||||
Nicolas Fran<61>ois
|
||||
Niels van Tongeren
|
||||
Nikita Schmidt
|
||||
Nikitinskit Dmitriy
|
||||
Niklas Angebrand
|
||||
Nikolai Kondrashov
|
||||
Nir Soffer
|
||||
Nis Jorgensen
|
||||
Nodak Sodak
|
||||
Norbert Frese
|
||||
Norbert Novotny
|
||||
Ofer
|
||||
Olaf Stueben
|
||||
@@ -440,12 +491,15 @@ Peter Wullinger
|
||||
Peteris Krumins
|
||||
Phil Karn
|
||||
Philip Gladstone
|
||||
Philip Langdale
|
||||
Philippe Hameau
|
||||
Philippe Raoult
|
||||
Philippe Vaucher
|
||||
Pierre
|
||||
Pooyan McSporran
|
||||
Puneet Pawaia
|
||||
Quagmire
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Ralf S. Engelschall
|
||||
Ralph Beckmann
|
||||
@@ -453,6 +507,7 @@ Ralph Mitchell
|
||||
Ramana Mokkapati
|
||||
Randy McMurchy
|
||||
Ravi Pratap
|
||||
Ray Pekowski
|
||||
Reinout van Schouwen
|
||||
Renaud Chaillat
|
||||
Renaud Duhaut
|
||||
@@ -479,6 +534,7 @@ Robert Foreman
|
||||
Robert Iakobashvili
|
||||
Robert Olson
|
||||
Robert Weaver
|
||||
Robin Johnson
|
||||
Robin Kay
|
||||
Robson Braga Araujo
|
||||
Rodney Simmons
|
||||
@@ -494,13 +550,17 @@ Ryan Nelson
|
||||
S. Moonesamy
|
||||
Salvador D<>vila
|
||||
Salvatore Sorrentino
|
||||
Sam Listopad
|
||||
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
|
||||
@@ -514,12 +574,14 @@ Simon Josefsson
|
||||
Simon Liu
|
||||
Song Ma
|
||||
Sonia Subramanian
|
||||
Spacen Jasset
|
||||
Spiridonoff A.V
|
||||
Stadler Stephan
|
||||
Stefan Esser
|
||||
Stefan Krause
|
||||
Stefan Ulrich
|
||||
Stephan Bergmann
|
||||
Stephen Collyer
|
||||
Stephen Kick
|
||||
Stephen More
|
||||
Sterling Hughes
|
||||
@@ -571,10 +633,12 @@ Ulf H
|
||||
Ulrich Zadow
|
||||
Venkat Akella
|
||||
Victor Snezhko
|
||||
Vikram Saxena
|
||||
Vilmos Nebehaj
|
||||
Vincent Bronner
|
||||
Vincent Penquerc'h
|
||||
Vincent Sanders
|
||||
Vladimir Lazarenko
|
||||
Vojtech Janota
|
||||
Vojtech Minarik
|
||||
Walter J. Mack
|
||||
@@ -587,7 +651,9 @@ Wojciech Zwiefka
|
||||
Xavier Bouchoux
|
||||
Yang Tse
|
||||
Yarram Sunil
|
||||
Yuriy Sosov
|
||||
Yves Lejeune
|
||||
Zmey Petroff
|
||||
Zvi Har'El
|
||||
nk
|
||||
swalkaus at yahoo.com
|
||||
|
742
docs/TODO
742
docs/TODO
@@ -4,346 +4,598 @@
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
TODO
|
||||
Things that could be nice to do in the future
|
||||
|
||||
Things to do in project cURL. Please tell us what you think, contribute and
|
||||
send us patches that improve things! Also check the http://curl.haxx.se/dev
|
||||
web section for various technical development notes.
|
||||
send us patches that improve things!
|
||||
|
||||
All bugs documented in the KNOWN_BUGS document are subject for fixing!
|
||||
|
||||
LIBCURL
|
||||
1. libcurl
|
||||
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
|
||||
|
||||
* Introduce another callback interface for upload/download that makes one
|
||||
less copy of data and thus a faster operation.
|
||||
[http://curl.haxx.se/dev/no_copy_callbacks.txt]
|
||||
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
|
||||
|
||||
* More data sharing. curl_share_* functions already exist and work, and they
|
||||
can be extended to share more. For example, enable sharing of the ares
|
||||
channel and the connection cache.
|
||||
3. Documentation
|
||||
3.1 More and better
|
||||
|
||||
* Introduce a new error code indicating authentication problems (for proxy
|
||||
CONNECT error 407 for example). This cannot be an error code, we must not
|
||||
return informational stuff as errors, consider a new info returned by
|
||||
curl_easy_getinfo() http://curl.haxx.se/bug/view.cgi?id=845941
|
||||
4. FTP
|
||||
4.1 PRET
|
||||
4.2 Alter passive/active on failure and retry
|
||||
4.3 Earlier bad letter detection
|
||||
4.4 REST for large files
|
||||
4.5 FTP proxy support
|
||||
4.6 PORT port range
|
||||
4.7 ASCII support
|
||||
|
||||
* Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
|
||||
SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
|
||||
To support ipv6 interface addresses properly.
|
||||
5. HTTP
|
||||
5.1 Other HTTP versions with CONNECT
|
||||
5.2 Better persistency for HTTP 1.0
|
||||
5.3 support FF3 sqlite cookie files
|
||||
|
||||
* 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. Suggested by Alan.
|
||||
6. TELNET
|
||||
6.1 ditch stdin
|
||||
6.2 ditch telnet-specific select
|
||||
6.3 feature negotiation debug data
|
||||
6.4 send data in chunks
|
||||
|
||||
* Add option that changes the interval in which the progress callback is
|
||||
called at most.
|
||||
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
|
||||
|
||||
* 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).
|
||||
8. GnuTLS
|
||||
8.1 Make NTLM work without OpenSSL functions
|
||||
8.2 SSL engine stuff
|
||||
8.3 SRP
|
||||
8.4 non-blocking
|
||||
8.5 check connection
|
||||
|
||||
* Make the curl/*.h 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).
|
||||
9. Other protocols
|
||||
9.1 ditch ldap-specific select
|
||||
|
||||
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
|
||||
10. New protocols
|
||||
10.1 RTSP
|
||||
10.2 RSYNC
|
||||
10.3 RTMP
|
||||
|
||||
LIBCURL - multi interface
|
||||
11. Client
|
||||
11.1 Content-Disposition
|
||||
11.2 sync
|
||||
11.3 glob posts
|
||||
11.4 prevent file overwriting
|
||||
11.5 ftp wildcard download
|
||||
11.6 simultaneous parallel transfers
|
||||
11.7 provide formpost headers
|
||||
11.8 url-specific options
|
||||
11.9 metalink support
|
||||
11.10 warning when setting an option
|
||||
|
||||
* Make sure we don't ever loop because of non-blocking sockets return
|
||||
EWOULDBLOCK or similar. The GnuTLS connection etc.
|
||||
12. Build
|
||||
12.1 roffit
|
||||
|
||||
* 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.
|
||||
13. Test suite
|
||||
13.1 SSL tunnel
|
||||
13.2 nicer lacking perl message
|
||||
13.3 more protocols supported
|
||||
13.4 more platforms supported
|
||||
|
||||
* 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
|
||||
transfer is done, then detach the easy handle, destroy the multi handle and
|
||||
return the easy handle's return code. This will thus make everything
|
||||
internally use and assume the multi interface. The select()-loop should use
|
||||
curl_multi_socket().
|
||||
14. Next SONAME bump
|
||||
14.1 http-style HEAD output for ftp
|
||||
14.2 combine error codes
|
||||
14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
|
||||
* curl_multi_handle_control() - this can control the easy handle (while)
|
||||
added to a multi handle in various ways:
|
||||
o RESTART, unconditionally restart this easy handle's transfer from the
|
||||
start, re-init the state
|
||||
o RESTART_COMPLETED, restart this easy handle's transfer but only if the
|
||||
existing transfer has already completed and it is in a "finished state".
|
||||
o STOP, just stop this transfer and consider it completed
|
||||
o PAUSE?
|
||||
o RESUME?
|
||||
15. Next major release
|
||||
15.1 cleanup return codes
|
||||
15.2 remove obsolete defines
|
||||
15.3 size_t
|
||||
15.4 remove several functions
|
||||
15.5 remove CURLOPT_FAILONERROR
|
||||
15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
|
||||
DOCUMENTATION
|
||||
==============================================================================
|
||||
|
||||
* More and better
|
||||
1. libcurl
|
||||
|
||||
FTP
|
||||
1.1 Zero-copy interface
|
||||
|
||||
* PRET is a command that primarily "drftpd" supports, which could be useful
|
||||
when using libcurl against such a server. It is a non-standard and a rather
|
||||
oddly designed command, but...
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1729967
|
||||
Introduce another callback interface for upload/download that makes one less
|
||||
copy of data and thus a faster operation.
|
||||
[http://curl.haxx.se/dev/no_copy_callbacks.txt]
|
||||
|
||||
* When trying to connect passively to a server which only supports active
|
||||
connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
|
||||
connection. There could be a way to fallback to an active connection (and
|
||||
vice versa). http://curl.haxx.se/bug/feature.cgi?id=1754793
|
||||
1.2 More data sharing
|
||||
|
||||
* Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in
|
||||
the process to avoid doing a resolve and connect in vain.
|
||||
curl_share_* functions already exist and work, and they can be extended to
|
||||
share more. For example, enable sharing of the ares channel and the
|
||||
connection cache.
|
||||
|
||||
* REST fix for servers not behaving well on >2GB requests. This should fail
|
||||
if the server doesn't set the pointer to the requested index. The tricky
|
||||
(impossible?) part is to figure out if the server did the right thing or
|
||||
not.
|
||||
1.3 struct lifreq
|
||||
|
||||
* Support the most common FTP proxies, Philip Newton provided a list
|
||||
allegedly from ncftp:
|
||||
http://curl.haxx.se/mail/archive-2003-04/0126.html
|
||||
Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
|
||||
SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
|
||||
To support ipv6 interface addresses for network interfaces properly.
|
||||
|
||||
* Make CURLOPT_FTPPORT support an additional port number on the IP/if/name,
|
||||
like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]".
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1505166
|
||||
1.4 Get IP address
|
||||
|
||||
* FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||
accordingly.
|
||||
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.
|
||||
|
||||
* Since USERPWD always override the user and password specified in URLs, we
|
||||
might need another way to specify user+password for anonymous ftp logins.
|
||||
1.5 c-ares ipv6
|
||||
|
||||
* The FTP code should get a way of returning errors that is known to still
|
||||
have the control connection alive and sound. Currently, a returned error
|
||||
from within ftp-functions does not tell if the control connection is still
|
||||
OK to use or not. This causes libcurl to fail to re-use connections
|
||||
slightly too often.
|
||||
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).
|
||||
|
||||
HTTP
|
||||
1.6 configure-based info in public headers
|
||||
|
||||
* 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.
|
||||
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).
|
||||
|
||||
* "Better" support for persistent connections over HTTP 1.0
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1089001
|
||||
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
|
||||
|
||||
TELNET
|
||||
The remaining problems to solve involve the platforms that can't run
|
||||
configure.
|
||||
|
||||
* Reading input (to send to the remote server) on stdin is a crappy solution
|
||||
for library purposes. We need to invent a good way for the application to
|
||||
be able to provide the data to send.
|
||||
2. libcurl - multi interface
|
||||
|
||||
* Move the telnet support's network select() loop go away and merge the code
|
||||
into the main transfer loop. Until this is done, the multi interface won't
|
||||
work for telnet.
|
||||
2.1 More non-blocking
|
||||
|
||||
SSL
|
||||
Make sure we don't ever loop because of non-blocking sockets return
|
||||
EWOULDBLOCK or similar. The GnuTLS connection etc.
|
||||
|
||||
* Provide an option that allows for disabling specific SSL versions, such as
|
||||
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
|
||||
2.2 Pause transfers
|
||||
|
||||
* 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.
|
||||
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.
|
||||
|
||||
* Anton Fedorov's "dumpcert" patch:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0088.html
|
||||
2.3 Remove easy interface internally
|
||||
|
||||
* Evaluate/apply Gertjan van Wingerde's SSL patches:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||
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
|
||||
transfer is done, then detach the easy handle, destroy the multi handle and
|
||||
return the easy handle's return code. This will thus make everything
|
||||
internally use and assume the multi interface. The select()-loop should use
|
||||
curl_multi_socket().
|
||||
|
||||
* "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 once per handle)". The major improvement we can rather easily do is to
|
||||
make sure we don't create and kill a new SSL "context" for every request,
|
||||
but instead make one for every connection and re-use that SSL context in
|
||||
the same 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.
|
||||
2.4 Avoid having to remove/readd handles
|
||||
|
||||
* Add an interface to libcurl that enables "session IDs" to get
|
||||
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
|
||||
serialise the current SSL state to a buffer of your choice, and
|
||||
recover/reset 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".
|
||||
curl_multi_handle_control() - this can control the easy handle (while) added
|
||||
to a multi handle in various ways:
|
||||
|
||||
* 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! (brought by Chris
|
||||
Clark)
|
||||
o RESTART, unconditionally restart this easy handle's transfer from the
|
||||
start, re-init the state
|
||||
|
||||
* Make curl's SSL layer capable of using other free SSL libraries. Such as
|
||||
MatrixSSL (http://www.matrixssl.org/).
|
||||
o RESTART_COMPLETED, restart this easy handle's transfer but only if the
|
||||
existing transfer has already completed and it is in a "finished state".
|
||||
|
||||
* 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.
|
||||
o STOP, just stop this transfer and consider it completed
|
||||
|
||||
* make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||
then NSS...
|
||||
o PAUSE?
|
||||
|
||||
GnuTLS
|
||||
o RESUME?
|
||||
|
||||
* 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++.
|
||||
3. Documentation
|
||||
|
||||
* SSL engine stuff?
|
||||
3.1 More and better
|
||||
|
||||
* Work out a common method with Peter Sylvester's OpenSSL-patch for SRP
|
||||
on the TLS to provide name and password
|
||||
Exactly
|
||||
|
||||
* Fix the connection phase to be non-blocking when multi interface is used
|
||||
4. FTP
|
||||
|
||||
* Add a way to check if the connection seems to be alive, to correspond to
|
||||
the SSL_peak() way we use with OpenSSL.
|
||||
4.1 PRET
|
||||
|
||||
LDAP
|
||||
PRET is a command that primarily "drftpd" supports, which could be useful
|
||||
when using libcurl against such a server. It is a non-standard and a rather
|
||||
oddly designed command, but...
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1729967
|
||||
|
||||
4.2 Alter passive/active on failure and retry
|
||||
|
||||
When trying to connect passively to a server which only supports active
|
||||
connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
|
||||
connection. There could be a way to fallback to an active connection (and
|
||||
vice versa). http://curl.haxx.se/bug/feature.cgi?id=1754793
|
||||
|
||||
4.3 Earlier bad letter detection
|
||||
|
||||
Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in the
|
||||
process to avoid doing a resolve and connect in vain.
|
||||
|
||||
4.4 REST for large files
|
||||
|
||||
REST fix for servers not behaving well on >2GB requests. This should fail if
|
||||
the server doesn't set the pointer to the requested index. The tricky
|
||||
(impossible?) part is to figure out if the server did the right thing or not.
|
||||
|
||||
4.5 FTP proxy support
|
||||
|
||||
Support the most common FTP proxies, Philip Newton provided a list allegedly
|
||||
from ncftp. This is not a subject without debate, and is probably not really
|
||||
suitable for libcurl. http://curl.haxx.se/mail/archive-2003-04/0126.html
|
||||
|
||||
4.6 PORT port range
|
||||
|
||||
Make CURLOPT_FTPPORT support an additional port number on the IP/if/name,
|
||||
like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]".
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1505166
|
||||
|
||||
4.7 ASCII support
|
||||
|
||||
FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||
accordingly.
|
||||
|
||||
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
|
||||
|
||||
"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
|
||||
|
||||
Firefox 3 is changing from its former format to a a sqlite database instead.
|
||||
We should consider how (lib)curl can/should support this.
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1871388
|
||||
|
||||
6. TELNET
|
||||
|
||||
6.1 ditch stdin
|
||||
|
||||
Reading input (to send to the remote server) on stdin is a crappy solution for
|
||||
library purposes. We need to invent a good way for the application to be able
|
||||
to provide the data to send.
|
||||
|
||||
6.2 ditch telnet-specific select
|
||||
|
||||
Move the telnet support's network select() loop go away and merge the code
|
||||
into the main transfer loop. Until this is done, the multi interface won't
|
||||
work for telnet.
|
||||
|
||||
6.3 feature negotiation debug data
|
||||
|
||||
Add telnet feature negotiation data to the debug callback as header data.
|
||||
|
||||
6.4 send data in chunks
|
||||
|
||||
Currently, telnet sends data one byte at a time. This is fine for interactive
|
||||
use, but inefficient for any other. Sent data should be sent in larger
|
||||
chunks.
|
||||
|
||||
7. SSL
|
||||
|
||||
7.1 Disable specific versions
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Evaluate/apply Gertjan van Wingerde's SSL patches:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||
|
||||
7.5 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
|
||||
once per handle)". The major improvement we can rather easily do is to make
|
||||
sure we don't create and kill a new SSL "context" for every request, but
|
||||
instead make one for every connection and re-use that SSL context in the same
|
||||
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
|
||||
|
||||
Add an interface to libcurl that enables "session IDs" to get
|
||||
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
|
||||
serialise the current SSL state to a buffer of your choice, and recover/reset
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||
then NSS...
|
||||
|
||||
8. GnuTLS
|
||||
|
||||
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++.
|
||||
|
||||
8.2 SSL engine stuff
|
||||
|
||||
Is this even possible?
|
||||
|
||||
8.3 SRP
|
||||
|
||||
Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
|
||||
TLS to provide name and password. GnuTLS already supports it...
|
||||
|
||||
8.4 non-blocking
|
||||
|
||||
Fix the connection phase to be non-blocking when multi interface is used
|
||||
|
||||
8.5 check connection
|
||||
|
||||
Add a way to check if the connection seems to be alive, to correspond to the
|
||||
SSL_peak() way we use with OpenSSL.
|
||||
|
||||
9. Other protocols
|
||||
|
||||
9.1 ditch ldap-specific select
|
||||
|
||||
* Look over the implementation. The looping will have to "go away" from the
|
||||
lib/ldap.c source file and get moved to the main network code so that the
|
||||
multi interface and friends will work for LDAP as well.
|
||||
|
||||
NEW PROTOCOLS
|
||||
9.2 stop TFTP blocking
|
||||
|
||||
* RTSP - RFC2326 (protocol - very HTTP-like, also contains URL description)
|
||||
Stop TFTP from being blocking and doing its own read loop in tftp_do.
|
||||
|
||||
* RSYNC (no RFCs for protocol nor URI/URL format). An implementation should
|
||||
most probably use an existing rsync library, such as librsync.
|
||||
10. New protocols
|
||||
|
||||
CLIENT
|
||||
10.1 RTSP
|
||||
|
||||
* Add option that is similar to -O but that takes the output file name from
|
||||
the Content-Disposition: header, and/or uses the local file name used in
|
||||
redirections for the cases the server bounces the request further to a
|
||||
different file (name): http://curl.haxx.se/bug/feature.cgi?id=1364676
|
||||
RFC2326 (protocol - very HTTP-like, also contains URL description)
|
||||
|
||||
* "curl --sync http://example.com/feed[1-100].rss" or
|
||||
"curl --sync http://example.net/{index,calendar,history}.html"
|
||||
10.2 RSYNC
|
||||
|
||||
Downloads a range or set of URLs using the remote name, but only if the
|
||||
remote file is newer than the local file. A Last-Modified HTTP date header
|
||||
should also be used to set the mod date on the downloaded file.
|
||||
(idea from "Brianiac")
|
||||
There's no RFC for protocol nor URI/URL format. An implementation should
|
||||
most probably use an existing rsync library, such as librsync.
|
||||
|
||||
* Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
||||
Requested by Dane Jensen and others. This is easily scripted though.
|
||||
10.3 RTMP
|
||||
|
||||
* Add an option that prevents cURL from overwriting existing local files. When
|
||||
used, and there already is an existing file with the target file name
|
||||
(either -O or -o), a number should be appended (and increased if already
|
||||
existing). So that index.html becomes first index.html.1 and then
|
||||
index.html.2 etc. Jeff Pohlmeyer suggested.
|
||||
There exists a patch that claims to introduce this protocol:
|
||||
http://osdir.com/ml/gnu.gnash.devel2/2006-11/msg00278.html, further details
|
||||
in the feature-request: http://curl.haxx.se/bug/feature.cgi?id=1843469
|
||||
|
||||
* "curl ftp://site.com/*.txt"
|
||||
11. Client
|
||||
|
||||
* The client could be told to use maximum N simultaneous parallel transfers
|
||||
and then just make sure that happens. It should of course not make more
|
||||
than one connection to the same remote host. This would require the client
|
||||
to use the multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||
11.1 Content-Disposition
|
||||
|
||||
* Extending the capabilities of the multipart formposting. How about leaving
|
||||
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
||||
works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where
|
||||
fil1.hdr contains extra headers like
|
||||
Add option that is similar to -O but that takes the output file name from the
|
||||
Content-Disposition: header, and/or uses the local file name used in
|
||||
redirections for the cases the server bounces the request further to a
|
||||
different file (name): http://curl.haxx.se/bug/feature.cgi?id=1364676
|
||||
|
||||
Content-Type: text/plain; charset=KOI8-R"
|
||||
Content-Transfer-Encoding: base64
|
||||
X-User-Comment: Please don't use browser specific HTML code
|
||||
11.2 sync
|
||||
|
||||
which should overwrite the program reasonable defaults (plain/text,
|
||||
8bit...) (Idea brough to us by kromJx)
|
||||
"curl --sync http://example.com/feed[1-100].rss" or
|
||||
"curl --sync http://example.net/{index,calendar,history}.html"
|
||||
|
||||
* ability to specify the classic computing suffixes on the range
|
||||
specifications. For example, to download the first 500 Kilobytes of a file,
|
||||
be able to specify the following for the -r option: "-r 0-500K" or for the
|
||||
first 2 Megabytes of a file: "-r 0-2M". (Mark Smith suggested)
|
||||
Downloads a range or set of URLs using the remote name, but only if the
|
||||
remote file is newer than the local file. A Last-Modified HTTP date header
|
||||
should also be used to set the mod date on the downloaded file.
|
||||
|
||||
* --data-encode that URL encodes the data before posting
|
||||
http://curl.haxx.se/mail/archive-2003-11/0091.html (Kevin Roth suggested)
|
||||
11.3 glob posts
|
||||
|
||||
* Provide a way to make options bound to a specific URL among several on the
|
||||
command line. Possibly by letting ':' separate options between URLs,
|
||||
similar to this:
|
||||
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
||||
This is easily scripted though.
|
||||
|
||||
curl --data foo --url url.com : \
|
||||
--url url2.com : \
|
||||
--url url3.com --data foo3
|
||||
11.4 prevent file overwriting
|
||||
|
||||
(More details: http://curl.haxx.se/mail/archive-2004-07/0133.html)
|
||||
Add an option that prevents cURL from overwriting existing local files. When
|
||||
used, and there already is an existing file with the target file name
|
||||
(either -O or -o), a number should be appended (and increased if already
|
||||
existing). So that index.html becomes first index.html.1 and then
|
||||
index.html.2 etc.
|
||||
|
||||
The example would do a POST-GET-POST combination on a single command line.
|
||||
11.5 ftp wildcard download
|
||||
|
||||
BUILD
|
||||
"curl ftp://site.com/*.txt"
|
||||
|
||||
* Consider extending 'roffit' to produce decent ASCII output, and use that
|
||||
instead of (g)nroff when building src/hugehelp.c
|
||||
11.6 simultaneous parallel transfers
|
||||
|
||||
TEST SUITE
|
||||
The client could be told to use maximum N simultaneous parallel transfers and
|
||||
then just make sure that happens. It should of course not make more than one
|
||||
connection to the same remote host. This would require the client to use the
|
||||
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||
|
||||
* Make our own version of stunnel for simple port forwarding to enable HTTPS
|
||||
and FTP-SSL tests without the stunnel dependency, and it could allow us to
|
||||
provide test tools built with either OpenSSL or GnuTLS
|
||||
11.7 provide formpost headers
|
||||
|
||||
* If perl wasn't found by the configure script, don't attempt to run the
|
||||
tests but explain something nice why it doesn't.
|
||||
Extending the capabilities of the multipart formposting. How about leaving
|
||||
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
||||
works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where
|
||||
fil1.hdr contains extra headers like
|
||||
|
||||
* Extend the test suite to include more protocols. The telnet could just do
|
||||
ftp or http operations (for which we have test servers).
|
||||
Content-Type: text/plain; charset=KOI8-R"
|
||||
Content-Transfer-Encoding: base64
|
||||
X-User-Comment: Please don't use browser specific HTML code
|
||||
|
||||
* Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
|
||||
fork()s and it should become even more portable.
|
||||
which should overwrite the program reasonable defaults (plain/text,
|
||||
8bit...)
|
||||
|
||||
NEXT soname bump
|
||||
11.8 url-specific options
|
||||
|
||||
* #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
|
||||
from being output in NOBODY requests over ftp
|
||||
Provide a way to make options bound to a specific URL among several on the
|
||||
command line. Possibly by letting ':' separate options between URLs,
|
||||
similar to this:
|
||||
|
||||
* Combine some of the error codes to remove duplicates. The original
|
||||
numbering should not be changed, and the old identifiers would be
|
||||
macroed to the new ones in an CURL_NO_OLDIES section to help with
|
||||
backward compatibility.
|
||||
curl --data foo --url url.com : \
|
||||
--url url2.com : \
|
||||
--url url3.com --data foo3
|
||||
|
||||
Candidates for removal and their replacements:
|
||||
(More details: http://curl.haxx.se/mail/archive-2004-07/0133.html)
|
||||
|
||||
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
|
||||
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
|
||||
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
|
||||
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
|
||||
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
|
||||
The example would do a POST-GET-POST combination on a single command line.
|
||||
|
||||
NEXT MAJOR RELEASE
|
||||
11.9 metalink support
|
||||
|
||||
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
||||
CURLMcode. These should be changed to be the same.
|
||||
Add metalink support to curl (http://www.metalinker.org/). This is most useful
|
||||
with simultaneous parallel transfers (11.6) but not necessary.
|
||||
|
||||
* remove obsolete defines from curl/curl.h
|
||||
11.10 warning when setting an option
|
||||
|
||||
* make several functions use size_t instead of int in their APIs
|
||||
Display a warning when libcurl returns an error when setting an option.
|
||||
This can be useful to tell when support for a particular feature hasn't been
|
||||
compiled into the library.
|
||||
|
||||
* remove the following functions from the public API:
|
||||
curl_getenv
|
||||
curl_mprintf (and variations)
|
||||
curl_strequal
|
||||
curl_strnequal
|
||||
12. Build
|
||||
|
||||
They will instead become curlx_ - alternatives. That makes the curl app
|
||||
still capable of building with them from source.
|
||||
12.1 roffit
|
||||
|
||||
* Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
|
||||
internally. Let the app judge success or not for itself.
|
||||
Consider extending 'roffit' to produce decent ASCII output, and use that
|
||||
instead of (g)nroff when building src/hugehelp.c
|
||||
|
||||
13. Test suite
|
||||
|
||||
13.1 SSL tunnel
|
||||
|
||||
Make our own version of stunnel for simple port forwarding to enable HTTPS
|
||||
and FTP-SSL tests without the stunnel dependency, and it could allow us to
|
||||
provide test tools built with either OpenSSL or GnuTLS
|
||||
|
||||
13.2 nicer lacking perl message
|
||||
|
||||
If perl wasn't found by the configure script, don't attempt to run the tests
|
||||
but explain something nice why it doesn't.
|
||||
|
||||
13.3 more protocols supported
|
||||
|
||||
Extend the test suite to include more protocols. The telnet could just do ftp
|
||||
or http operations (for which we have test servers).
|
||||
|
||||
13.4 more platforms supported
|
||||
|
||||
Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
|
||||
fork()s and it should become even more portable.
|
||||
|
||||
14. Next SONAME bump
|
||||
|
||||
14.1 http-style HEAD output for ftp
|
||||
|
||||
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
|
||||
from being output in NOBODY requests over ftp
|
||||
|
||||
14.2 combine error codes
|
||||
|
||||
Combine some of the error codes to remove duplicates. The original
|
||||
numbering should not be changed, and the old identifiers would be
|
||||
macroed to the new ones in an CURL_NO_OLDIES section to help with
|
||||
backward compatibility.
|
||||
|
||||
Candidates for removal and their replacements:
|
||||
|
||||
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
|
||||
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
|
||||
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
|
||||
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
|
||||
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
|
||||
|
||||
14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
|
||||
The current prototype only provides 'purpose' that tells what the
|
||||
connection/socket is for, but not any protocol or similar. It makes it hard
|
||||
for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
|
||||
similar.
|
||||
|
||||
15. Next major release
|
||||
|
||||
15.1 cleanup return codes
|
||||
|
||||
curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
||||
CURLMcode. These should be changed to be the same.
|
||||
|
||||
15.2 remove obsolete defines
|
||||
|
||||
remove obsolete defines from curl/curl.h
|
||||
|
||||
15.3 size_t
|
||||
|
||||
make several functions use size_t instead of int in their APIs
|
||||
|
||||
15.4 remove several functions
|
||||
|
||||
remove the following functions from the public API:
|
||||
|
||||
curl_getenv
|
||||
|
||||
curl_mprintf (and variations)
|
||||
|
||||
curl_strequal
|
||||
|
||||
curl_strnequal
|
||||
|
||||
They will instead become curlx_ - alternatives. That makes the curl app
|
||||
still capable of building with them from source.
|
||||
|
||||
15.5 remove CURLOPT_FAILONERROR
|
||||
|
||||
Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
|
||||
internally. Let the app judge success or not for itself.
|
||||
|
||||
15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
|
||||
Remove support for a global DNS cache. Anything global is silly, and we
|
||||
already offer the share interface for the same functionality but done
|
||||
"right".
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Online: http://curl.haxx.se/docs/httpscripting.html
|
||||
Date: December 9, 2004
|
||||
Date: May 28, 2008
|
||||
|
||||
The Art Of Scripting HTTP Requests Using Curl
|
||||
=============================================
|
||||
@@ -137,6 +137,10 @@ Date: December 9, 2004
|
||||
you need to replace that space with %20 etc. Failing to comply with this
|
||||
will most likely cause your data to be received wrongly and messed up.
|
||||
|
||||
Recent curl versions can in fact url-encode POST data for you, like this:
|
||||
|
||||
curl --data-urlencode "name=I am Daniel" www.example.com
|
||||
|
||||
4.3 File Upload POST
|
||||
|
||||
Back in late 1995 they defined an additional way to post data over HTTP. It
|
||||
@@ -202,14 +206,14 @@ Date: December 9, 2004
|
||||
|
||||
curl -T uploadfile www.uploadhttp.com/receive.cgi
|
||||
|
||||
6. Authentication
|
||||
6. HTTP Authentication
|
||||
|
||||
Authentication is the ability to tell the server your username and password
|
||||
so that it can verify that you're allowed to do the request you're doing. The
|
||||
Basic authentication used in HTTP (which is the type curl uses by default) is
|
||||
*plain* *text* based, which means it sends username and password only
|
||||
slightly obfuscated, but still fully readable by anyone that sniffs on the
|
||||
network between you and the remote server.
|
||||
HTTP Authentication is the ability to tell the server your username and
|
||||
password so that it can verify that you're allowed to do the request you're
|
||||
doing. The Basic authentication used in HTTP (which is the type curl uses by
|
||||
default) is *plain* *text* based, which means it sends username and password
|
||||
only slightly obfuscated, but still fully readable by anyone that sniffs on
|
||||
the network between you and the remote server.
|
||||
|
||||
To tell curl to use a user and password for authentication:
|
||||
|
||||
@@ -237,6 +241,10 @@ Date: December 9, 2004
|
||||
able to watch your passwords if you pass them as plain command line
|
||||
options. There are ways to circumvent this.
|
||||
|
||||
It is worth noting that while this is how HTTP Authentication works, very
|
||||
many web sites will not use this concept when they provide logins etc. See
|
||||
the Web Login chapter further below for more details on that.
|
||||
|
||||
7. Referer
|
||||
|
||||
A HTTP request may include a 'referer' field (yes it is misspelled), which
|
||||
@@ -367,12 +375,11 @@ Date: December 9, 2004
|
||||
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
|
||||
|
||||
@@ -407,7 +414,37 @@ Date: December 9, 2004
|
||||
|
||||
curl -H "Destination: http://moo.com/nowhere" http://url.com
|
||||
|
||||
13. Debug
|
||||
13. Web Login
|
||||
|
||||
While not strictly just HTTP related, it still cause a lot of people problems
|
||||
so here's the executive run-down of how the vast majority of all login forms
|
||||
work and how to login to them using curl.
|
||||
|
||||
It can also be noted that to do this properly in an automated fashion, you
|
||||
will most certainly need to script things and do multiple curl invokes etc.
|
||||
|
||||
First, servers mostly use cookies to track the logged-in status of the
|
||||
client, so you will need to capture the cookies you receive in the
|
||||
responses. Then, many sites also set a special cookie on the login page (to
|
||||
make sure you got there through their login page) so you should make a habit
|
||||
of first getting the login-form page to capture the cookies set there.
|
||||
|
||||
Some web-based login systems features various amounts of javascript, and
|
||||
sometimes they use such code to set or modify cookie contents. Possibly they
|
||||
do that to prevent programmed logins, like this manual describes how to...
|
||||
Anyway, if reading the code isn't enough to let you repeat the behavior
|
||||
manually, capturing the HTTP requests done by your browers and analyzing the
|
||||
sent cookies is usually a working method to work out how to shortcut the
|
||||
javascript need.
|
||||
|
||||
In the actual <form> tag for the login, lots of sites fill-in random/session
|
||||
or otherwise secretly generated hidden tags and you may need to first capture
|
||||
the HTML code for the login form and extract all the hidden fields to be able
|
||||
to do a proper login POST. Remember that the contents need to be URL encoded
|
||||
when sent in a normal POST.
|
||||
|
||||
|
||||
14. Debug
|
||||
|
||||
Many times when you run curl on a site, you'll notice that the site doesn't
|
||||
seem to respond the same way to your curl requests as it does to your
|
||||
@@ -437,7 +474,7 @@ Date: December 9, 2004
|
||||
such as ethereal or tcpdump and check what headers that were sent and
|
||||
received by the browser. (HTTPS makes this technique inefficient.)
|
||||
|
||||
14. References
|
||||
15. References
|
||||
|
||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||
protocol.
|
||||
|
355
docs/curl.1
355
docs/curl.1
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2008, 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
|
||||
@@ -21,7 +21,7 @@
|
||||
.\" * $Id$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl 1 "21 Sep 2007" "Curl 7.17.1" "Curl Manual"
|
||||
.TH curl 1 "10 July 2008" "Curl 7.19.0" "Curl Manual"
|
||||
.SH NAME
|
||||
curl \- transfer a URL
|
||||
.SH SYNOPSIS
|
||||
@@ -82,7 +82,7 @@ specified on a single command line and cannot be used between separate curl
|
||||
invokes.
|
||||
.SH "PROGRESS METER"
|
||||
curl normally displays a progress meter during operations, indicating amount
|
||||
of transfered data, transfer speeds and estimated time left etc.
|
||||
of transferred data, transfer speeds and estimated time left etc.
|
||||
|
||||
However, since curl displays data to the terminal by default, if you invoke
|
||||
curl to do an operation and it is about to write data to the terminal, it
|
||||
@@ -99,11 +99,16 @@ any response data to the terminal.
|
||||
If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
|
||||
friend.
|
||||
.SH OPTIONS
|
||||
In general, all boolean options are enabled with --option and yet again
|
||||
disabled with --\fBno-\fPoption. That is, you use the exact same option name
|
||||
but prefix it with "no-". However, in this list we mostly only list and show
|
||||
the --option version of them. (This concept with --no options was added in
|
||||
7.19.0. Previously most options were toggled on/off on repeated use of the
|
||||
same command line option.)
|
||||
.IP "-a/--append"
|
||||
(FTP) When used in an FTP upload, this will tell curl to append to the target
|
||||
(FTP/SFTP) When used in an upload, this will tell curl to append to the target
|
||||
file instead of overwriting it. If the file doesn't exist, it will be created.
|
||||
|
||||
If this option is used twice, the second one will disable append mode again.
|
||||
Note that this flag is ignored by some SSH servers (including OpenSSH).
|
||||
.IP "-A/--user-agent <agent string>"
|
||||
(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
|
||||
done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
|
||||
@@ -115,18 +120,15 @@ used.
|
||||
.IP "--anyauth"
|
||||
(HTTP) Tells curl to figure out authentication method by itself, and use the
|
||||
most secure one the remote site claims it supports. This is done by first
|
||||
doing a request and checking the response-headers, thus inducing an extra
|
||||
network round-trip. This is used instead of setting a specific authentication
|
||||
method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and
|
||||
\fI--negotiate\fP.
|
||||
doing a request and checking the response-headers, thus possibly inducing an
|
||||
extra network round-trip. This is used instead of setting a specific
|
||||
authentication method, which you can do with \fI--basic\fP, \fI--digest\fP,
|
||||
\fI--ntlm\fP, and \fI--negotiate\fP.
|
||||
|
||||
Note that using --anyauth is not recommended if you do uploads from stdin,
|
||||
since it may require data to be sent twice and then the client must be able to
|
||||
rewind. If the need should arise when uploading from stdin, the upload
|
||||
operation will fail.
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
.IP "-b/--cookie <name=data>"
|
||||
(HTTP)
|
||||
Pass the data to the HTTP server as a cookie. It is supposedly the
|
||||
@@ -152,16 +154,11 @@ used.
|
||||
Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
|
||||
enforced by using an URL that ends with ";type=A". This option causes data
|
||||
sent to stdout to be in text mode for win32 systems.
|
||||
|
||||
If this option is used twice, the second one will disable ASCII usage.
|
||||
.IP "--basic"
|
||||
(HTTP) Tells curl to use HTTP Basic authentication. This is the default and
|
||||
this option is usually pointless, unless you use it to override a previously
|
||||
set option that sets a different authentication method (such as \fI--ntlm\fP,
|
||||
\fI--digest\fP and \fI--negotiate\fP).
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
.IP "--ciphers <list of ciphers>"
|
||||
(SSL) Specifies which ciphers to use in the connection. The list of ciphers
|
||||
must be using valid ciphers. Read up on SSL cipher list details on this URL:
|
||||
@@ -175,9 +172,7 @@ If this option is used several times, the last one will override the others.
|
||||
.IP "--compressed"
|
||||
(HTTP) Request a compressed response using one of the algorithms libcurl
|
||||
supports, and return the uncompressed document. If this option is used and
|
||||
the server sends an unsupported encoding, Curl will report an error.
|
||||
|
||||
If this option is used several times, each occurrence will toggle it on/off.
|
||||
the server sends an unsupported encoding, curl will report an error.
|
||||
.IP "--connect-timeout <seconds>"
|
||||
Maximum time in seconds that you allow the connection to the server to take.
|
||||
This only limits the connection phase, once curl has connected this option is
|
||||
@@ -220,47 +215,64 @@ To create remote directories when using FTP or SFTP, try
|
||||
\fI--ftp-create-dirs\fP.
|
||||
.IP "--crlf"
|
||||
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
.IP "-d/--data <data>"
|
||||
(HTTP) Sends the specified data in a POST request to the HTTP server, in a way
|
||||
that can emulate as if a user has filled in a HTML form and pressed the submit
|
||||
button. Note that the data is sent exactly as specified with no extra
|
||||
processing (with all newlines cut off). The data is expected to be
|
||||
\&"url-encoded". This will cause curl to pass the data to the server using the
|
||||
content-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. If
|
||||
this option is used more than once on the same command line, the data pieces
|
||||
specified will be merged together with a separating &-letter. Thus, using '-d
|
||||
name=daniel -d skill=lousy' would generate a post chunk that looks like
|
||||
\&'name=daniel&skill=lousy'.
|
||||
(HTTP) Sends the specified data in a POST request to the HTTP server, in the
|
||||
same way that a browser does when a user has filled in an HTML form and
|
||||
presses the submit button. This will cause curl to pass the data to the server
|
||||
using the content-type application/x-www-form-urlencoded. Compare to
|
||||
\fI-F/--form\fP.
|
||||
|
||||
\fI-d/--data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
|
||||
you should instead use the \fI--data-binary\fP option. To URL encode the value
|
||||
of a form field you may use \fI--data-urlencode\fP.
|
||||
|
||||
If any of these options is used more than once on the same command line, the
|
||||
data pieces specified will be merged together with a separating
|
||||
&-letter. Thus, using '-d name=daniel -d skill=lousy' would generate a post
|
||||
chunk that looks like \&'name=daniel&skill=lousy'.
|
||||
|
||||
If you start the data with the letter @, the rest should be a file name to
|
||||
read the data from, or - if you want curl to read the data from stdin. The
|
||||
contents of the file must already be url-encoded. Multiple files can also be
|
||||
specified. Posting data from a file named 'foobar' would thus be done with
|
||||
\fI--data\fP @foobar".
|
||||
|
||||
To post data purely binary, you should instead use the \fI--data-binary\fP
|
||||
option.
|
||||
|
||||
\fI-d/--data\fP is the same as \fI--data-ascii\fP.
|
||||
|
||||
If this option is used several times, the ones following the first will
|
||||
append data.
|
||||
.IP "--data-ascii <data>"
|
||||
(HTTP) This is an alias for the \fI-d/--data\fP option.
|
||||
|
||||
If this option is used several times, the ones following the first will
|
||||
append data.
|
||||
\fI--data @foobar\fP.
|
||||
.IP "--data-binary <data>"
|
||||
(HTTP) This posts data in a similar manner as \fI--data-ascii\fP does,
|
||||
although when using this option the entire context of the posted data is kept
|
||||
as-is. If you want to post a binary file without the strip-newlines feature of
|
||||
the \fI--data-ascii\fP option, this is for you.
|
||||
(HTTP) This posts data exactly as specified with no extra processing
|
||||
whatsoever.
|
||||
|
||||
If this option is used several times, the ones following the first will
|
||||
append data.
|
||||
If you start the data with the letter @, the rest should be a filename. Data
|
||||
is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
|
||||
are preserved and conversions are never done.
|
||||
|
||||
If this option is used several times, the ones following the first will append
|
||||
data. As described in \fI-d/--data\fP.
|
||||
.IP "--data-urlencode <data>"
|
||||
(HTTP) This posts data, similar to the other --data options with the exception
|
||||
that this performs URL encoding. (Added in 7.18.0)
|
||||
|
||||
To be CGI compliant, the <data> part should begin with a \fIname\fP followed
|
||||
by a separator and a content specification. The <data> part can be passed to
|
||||
curl using one of the following syntaxes:
|
||||
.RS
|
||||
.IP "content"
|
||||
This will make curl URL encode the content and pass that on. Just be careful
|
||||
so that the content doesn't contain any = or @ letters, as that will then make
|
||||
the syntax match one of the other cases below!
|
||||
.IP "=content"
|
||||
This will make curl URL encode the content and pass that on. The preceding =
|
||||
letter is not included in the data.
|
||||
.IP "name=content"
|
||||
This will make curl URL encode the content part and pass that on. Note that
|
||||
the name part is expected to be URL encoded already.
|
||||
.IP "@filename"
|
||||
This will make curl load data from the given file (including any newlines),
|
||||
URL encode that data and pass it on in the POST.
|
||||
.IP "name@filename"
|
||||
This will make curl load data from the given file (including any newlines),
|
||||
URL encode that data and pass it on in the POST. The name part gets an equal
|
||||
sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
|
||||
name is expected to be URL encoded already.
|
||||
.RE
|
||||
.IP "--digest"
|
||||
(HTTP) Enables HTTP Digest authentication. This is a authentication that
|
||||
prevents the password from being sent over the wire in clear text. Use this in
|
||||
@@ -278,13 +290,15 @@ away. EPRT and LPRT are extensions to the original FTP protocol, may not work
|
||||
on all servers but enable more functionality in a better way than the
|
||||
traditional PORT command.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
Since curl 7.19.0, \fB--eprt\fP can be used to explicitly enable EPRT again
|
||||
and \fB--no-eprt\fP is an alias for \fB--disable-eprt\fP.
|
||||
.IP "--disable-epsv"
|
||||
(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
|
||||
transfers. Curl will normally always first attempt to use EPSV before PASV,
|
||||
but with this option, it will not try using EPSV.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
Since curl 7.19.0, \fB--epsv\fP can be used to explicitly enable EPRT again
|
||||
and \fB--no-epsv\fP is an alias for \fB--disable-epsv\fP.
|
||||
.IP "-D/--dump-header <file>"
|
||||
Write the protocol headers to the specified file.
|
||||
|
||||
@@ -314,8 +328,6 @@ run-time.
|
||||
(RISC OS ONLY) Sets a range of environment variables, using the names the -w
|
||||
option supports, to easier allow extraction of useful information after having
|
||||
run curl.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
.IP "--egd-file <file>"
|
||||
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
|
||||
is used to seed the random engine for SSL connections. See also the
|
||||
@@ -341,9 +353,10 @@ DER and ENG are recognized types. If not specified, PEM is assumed.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--cacert <CA certificate>"
|
||||
(SSL) Tells curl to use the specified certificate file to verify the
|
||||
peer. The file may contain multiple CA certificates. The certificate(s) must
|
||||
be in PEM format.
|
||||
(SSL) Tells curl to use the specified certificate file to verify the peer. The
|
||||
file may contain multiple CA certificates. The certificate(s) must be in PEM
|
||||
format. Normally curl is built to use a default file for this, so this option
|
||||
is typically used to alter that default file.
|
||||
|
||||
curl recognizes the environment variable named 'CURL_CA_BUNDLE' if that is
|
||||
set, and uses the given path as a path to a CA cert bundle. This option
|
||||
@@ -379,8 +392,6 @@ will prevent curl from outputting that and return error 22.
|
||||
This method is not fail-safe and there are occasions where non-successful
|
||||
response codes will slip through, especially when authentication is involved
|
||||
(response codes 401 and 407).
|
||||
|
||||
If this option is used twice, the second will again disable silent failure.
|
||||
.IP "--ftp-account [data]"
|
||||
(FTP) When an FTP server asks for "account data" after user name and password
|
||||
has been provided, this data is sent off using the ACCT command. (Added in
|
||||
@@ -388,11 +399,10 @@ has been provided, this data is sent off using the ACCT command. (Added in
|
||||
|
||||
If this option is used twice, the second will override the previous use.
|
||||
.IP "--ftp-create-dirs"
|
||||
(FTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on
|
||||
the server, the standard behavior of curl is to fail. Using this option, curl
|
||||
will instead attempt to create missing directories.
|
||||
|
||||
If this option is used twice, the second will again disable directory creation.
|
||||
(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
|
||||
currently exist on the server, the standard behavior of curl is to
|
||||
fail. Using this option, curl will instead attempt to create missing
|
||||
directories.
|
||||
.IP "--ftp-method [method]"
|
||||
(FTP) Control what method curl should use to reach a file on a FTP(S)
|
||||
server. The method argument should be one of the following alternatives:
|
||||
@@ -415,7 +425,8 @@ using this option can be used to override a previous --ftp-port option. (Added
|
||||
in 7.11.0)
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
difference. Undoing an enforced PASV really isn't doable but you must then
|
||||
instead enforce the correct EPRT again.
|
||||
.IP "--ftp-alternative-to-user <command>"
|
||||
(FTP) If authenticating with the USER and PASS commands fails, send this
|
||||
command. When connecting to Tumbleweed's Secure Transport server over FTPS
|
||||
@@ -428,28 +439,19 @@ will re-use the same IP address it already uses for the control
|
||||
connection. (Added in 7.14.2)
|
||||
|
||||
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
|
||||
|
||||
If this option is used twice, the second will again use the server's suggested
|
||||
address.
|
||||
.IP "--ftp-ssl"
|
||||
(FTP) Try to use SSL/TLS for the FTP connection. Reverts to a non-secure
|
||||
connection if the server doesn't support SSL/TLS. See also
|
||||
\fI--ftp-ssl-control\fP and \fI--ftp-ssl-reqd\fP for different levels of
|
||||
encryption required. (Added in 7.11.0)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-control"
|
||||
(FTP) Require SSL/TLS for the ftp login, clear for transfer. Allows secure
|
||||
authentication, but non-encrypted data transfers for efficiency. Fails the
|
||||
transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-reqd"
|
||||
(FTP) Require SSL/TLS for the FTP connection.
|
||||
Terminates the connection if the server doesn't support SSL/TLS.
|
||||
(Added in 7.15.5)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-ccc"
|
||||
(FTP) Use CCC (Clear Command Channel)
|
||||
Shuts down the SSL/TLS layer after authenticating. The rest of the
|
||||
@@ -457,8 +459,6 @@ control channel communication will be unencrypted. This allows
|
||||
NAT routers to follow the FTP transaction. The default mode is
|
||||
passive. See --ftp-ssl-ccc-mode for other modes.
|
||||
(Added in 7.16.1)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-ccc-mode [active/passive]"
|
||||
(FTP) Use CCC (Clear Command Channel)
|
||||
Sets the CCC mode. The passive mode will not initiate the shutdown, but
|
||||
@@ -523,7 +523,8 @@ If used in combination with -I, the POST data will instead be appended to the
|
||||
URL with a HEAD request.
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
difference. This is because undoing a GET doesn't make sense, but you should
|
||||
then instead enforce the alternative method you prefer.
|
||||
.IP "-h/--help"
|
||||
Usage help.
|
||||
.IP "-H/--header <header>"
|
||||
@@ -544,9 +545,9 @@ for you.
|
||||
See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
|
||||
|
||||
This option can be used multiple times to add/replace/remove multiple headers.
|
||||
.IP "--hostpubmd5"
|
||||
.IP "--hostpubmd5 <md5>"
|
||||
Pass a string containing 32 hexadecimal digits. The string should be the 128
|
||||
bit MD5 cheksum of the remote host's public key, curl will refuse the
|
||||
bit MD5 checksum of the remote host's public key, curl will refuse the
|
||||
connection with the host unless the md5sums match. This option is only for SCP
|
||||
and SFTP transfers. (Added in 7.17.1)
|
||||
.IP "--ignore-content-length"
|
||||
@@ -555,11 +556,8 @@ Ignore the Content-Length header. This is particularly useful for servers
|
||||
running Apache 1.x, which will report incorrect Content-Length for files
|
||||
larger than 2 gigabytes.
|
||||
.IP "-i/--include"
|
||||
(HTTP)
|
||||
Include the HTTP-header in the output. The HTTP-header includes things
|
||||
(HTTP) Include the HTTP-header in the output. The HTTP-header includes things
|
||||
like server-name, date of the document, HTTP-version and more...
|
||||
|
||||
If this option is used twice, the second will again disable header include.
|
||||
.IP "--interface <name>"
|
||||
Perform an operation using a specified interface. You can enter interface
|
||||
name, IP address or host name. An example could look like:
|
||||
@@ -573,15 +571,11 @@ Fetch the HTTP-header only! HTTP-servers feature the command HEAD
|
||||
which this uses to get nothing but the header of a document. When used
|
||||
on a FTP or FILE file, curl displays the file size and last modification
|
||||
time only.
|
||||
|
||||
If this option is used twice, the second will again disable header only.
|
||||
.IP "-j/--junk-session-cookies"
|
||||
(HTTP) When curl is told to read cookies from a given file, this option will
|
||||
make it discard all "session cookies". This will basically have the same effect
|
||||
as if a new session is started. Typical browsers always discard session
|
||||
cookies when they're closed down.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
.IP "-k/--insecure"
|
||||
(SSL) This option explicitly allows curl to perform "insecure" SSL connections
|
||||
and transfers. All SSL connections are attempted to be made secure by using
|
||||
@@ -590,8 +584,14 @@ considered "insecure" to fail unless \fI-k/--insecure\fP is used.
|
||||
|
||||
See this online resource for further details:
|
||||
\fBhttp://curl.haxx.se/docs/sslcerts.html\fP
|
||||
.IP "--keepalive-time <seconds>"
|
||||
This option sets the time a connection needs to remain idle before sending
|
||||
keepalive probes and the time between individual keepalive probes. It is
|
||||
currently effective on operating systems offering the TCP_KEEPIDLE and
|
||||
TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
|
||||
option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
|
||||
|
||||
If this option is used twice, the second time will again disable it.
|
||||
If this option is used multiple times, the last occurrence sets the amount.
|
||||
.IP "--key <key>"
|
||||
(SSL/SSH) Private key file name. Allows you to provide your private key in this
|
||||
separate file.
|
||||
@@ -617,8 +617,12 @@ If this option is used several times, the last one will be used.
|
||||
Specify which config file to read curl arguments from. The config file is a
|
||||
text file in which command line arguments can be written which then will be
|
||||
used as if they were written on the actual command line. Options and their
|
||||
parameters must be specified on the same config file line. If the parameter is
|
||||
to contain white spaces, the parameter must be enclosed within quotes. If the
|
||||
parameters must be specified on the same config file line, separated by
|
||||
white space, colon, the equals sign or any combination thereof (however,
|
||||
the preferred separator is the equals sign). If the parameter is to contain
|
||||
white spaces, the parameter must be enclosed within quotes. Within double
|
||||
quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
|
||||
\\r and \\v. A backlash preceding any other letter is ignored. If the
|
||||
first column of a config line is a '#' character, the rest of the line will be
|
||||
treated as a comment. Only write one option per physical line in the config
|
||||
file.
|
||||
@@ -673,7 +677,8 @@ NOTE: this does not properly support -F and the sending of multipart
|
||||
formposts, so in those cases the output program will be missing necessary
|
||||
calls to \fIcurl_formadd(3)\fP, and possibly more.
|
||||
|
||||
If this option is used several times, the last given file name will be used.
|
||||
If this option is used several times, the last given file name will be
|
||||
used. (Added in 7.16.1)
|
||||
.IP "--limit-rate <speed>"
|
||||
Specify the maximum transfer rate you want curl to use. This feature is useful
|
||||
if you have a limited pipe and you'd like your transfer not use your entire
|
||||
@@ -703,7 +708,6 @@ This option causes an FTP NLST command to be sent. Some FTP servers
|
||||
list only files in their response to NLST; they do not include
|
||||
subdirectories and symbolic links.
|
||||
|
||||
If this option is used twice, the second will again disable list only.
|
||||
.IP "--local-port <num>[-num]"
|
||||
Set a preferred number or range of local port numbers to use for the
|
||||
connection(s). Note that port numbers by nature is a scarce resource that
|
||||
@@ -724,8 +728,6 @@ When curl follows a redirect and the request is not a plain GET (for example
|
||||
POST or PUT), it will do the following request with a GET if the HTTP response
|
||||
was 301, 302, or 303. If the response code was any other 3xx code, curl will
|
||||
re-send the following request using the same unmodified method.
|
||||
|
||||
If this option is used twice, the second will again disable location following.
|
||||
.IP "--location-trusted"
|
||||
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
|
||||
password to all hosts that the site may redirect to. This may or may not
|
||||
@@ -733,7 +735,6 @@ introduce a security breach if the site redirects you do a site to which
|
||||
you'll send your authentication info (which is plaintext in the case of HTTP
|
||||
Basic authentication).
|
||||
|
||||
If this option is used twice, the second will again disable location following.
|
||||
.IP "--max-filesize <bytes>"
|
||||
Specify the maximum size (in bytes) of a file to download. If the file
|
||||
requested is larger than this value, the transfer will not start and curl will
|
||||
@@ -751,9 +752,9 @@ If this option is used several times, the last one will be used.
|
||||
.IP "-M/--manual"
|
||||
Manual. Display the huge help text.
|
||||
.IP "-n/--netrc"
|
||||
Makes curl scan the \fI.netrc\fP file in the user's home directory for login
|
||||
name and password. This is typically used for ftp on unix. If used with http,
|
||||
curl will enable user authentication. See
|
||||
Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
|
||||
home directory for login name and password. This is typically used for ftp on
|
||||
unix. If used with http, curl will enable user authentication. See
|
||||
.BR netrc(4)
|
||||
or
|
||||
.BR ftp(1)
|
||||
@@ -767,8 +768,6 @@ to ftp to the machine host.domain.com with user name \&'myself' and password
|
||||
\&'secret' should look similar to:
|
||||
|
||||
.B "machine host.domain.com login myself password secret"
|
||||
|
||||
If this option is used twice, the second will again disable netrc usage.
|
||||
.IP "--netrc-optional"
|
||||
Very similar to \fI--netrc\fP, but this option makes the .netrc usage
|
||||
\fBoptional\fP and not mandatory as the \fI--netrc\fP does.
|
||||
@@ -798,7 +797,14 @@ will use a standard buffered output stream that will have the effect that it
|
||||
will output the data in chunks, not necessarily exactly when the data arrives.
|
||||
Using this option will disable that buffering.
|
||||
|
||||
If this option is used twice, the second will again switch on buffering.
|
||||
Note that this is the negated option name documented. You can thus use
|
||||
\fI--buffer\fP to enforce the buffering.
|
||||
.IP "--no-keepalive"
|
||||
Disables the use of keepalive messages on the TCP connection, as by default
|
||||
curl enables them.
|
||||
|
||||
Note that this is the negated option name documented. You can thus use
|
||||
\fI--keepalive\fP to enforce keepalive.
|
||||
.IP "--no-sessionid"
|
||||
(SSL) Disable curl's use of SSL session-ID caching. By default all transfers
|
||||
are done using the cache. Note that while nothing ever should get hurt by
|
||||
@@ -806,8 +812,8 @@ attempting to reuse SSL session-IDs, there seem to be broken SSL
|
||||
implementations in the wild that may require you to disable this in order for
|
||||
you to succeed. (Added in 7.16.0)
|
||||
|
||||
If this option is used twice, the second will again switch on use of the
|
||||
session cache.
|
||||
Note that this is the negated option name documented. You can thus use
|
||||
\fI--sessionid\fP to enforce session-ID caching.
|
||||
.IP "--ntlm"
|
||||
(HTTP) Enables NTLM authentication. The NTLM authentication method was
|
||||
designed by Microsoft and is used by IIS web servers. It is a proprietary
|
||||
@@ -848,6 +854,11 @@ The remote file name to use for saving is extracted from the given URL,
|
||||
nothing else.
|
||||
|
||||
You may use this option as many times as you have number of URLs.
|
||||
.IP "--remote-name-all"
|
||||
This option changes the default action for all given URLs to be dealt with as
|
||||
if \fI-O/--remote-name\fP were used for each one. So if you want to disable
|
||||
that for a specific URL after \fI--remote-name-all\fP has been used, you must
|
||||
use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
|
||||
.IP "--pass <phrase>"
|
||||
(SSL/SSH) Pass phrase for the private key
|
||||
|
||||
@@ -861,43 +872,28 @@ a redirection. This option is meaningful only when using \fI-L/--location\fP
|
||||
(Added in 7.17.1)
|
||||
.IP "--proxy-anyauth"
|
||||
Tells curl to pick a suitable authentication method when communicating with
|
||||
the given proxy. This will cause an extra request/response round-trip. (Added
|
||||
the given proxy. This might cause an extra request/response round-trip. (Added
|
||||
in 7.13.2)
|
||||
|
||||
If this option is used twice, the second will again disable the proxy use-any
|
||||
authentication.
|
||||
.IP "--proxy-basic"
|
||||
Tells curl to use HTTP Basic authentication when communicating with the given
|
||||
proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
|
||||
the default authentication method curl uses with proxies.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP Basic
|
||||
authentication.
|
||||
.IP "--proxy-digest"
|
||||
Tells curl to use HTTP Digest authentication when communicating with the given
|
||||
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP Digest.
|
||||
.IP "--proxy-negotiate"
|
||||
Tells curl to use HTTP Negotiate authentication when communicating
|
||||
with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
|
||||
with a remote host.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP
|
||||
Negotiate. (Added in 7.17.1)
|
||||
with a remote host. (Added in 7.17.1)
|
||||
.IP "--proxy-ntlm"
|
||||
Tells curl to use HTTP NTLM authentication when communicating with the given
|
||||
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP NTLM.
|
||||
.IP "-p/--proxytunnel"
|
||||
When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
|
||||
protocols to attempt to tunnel through the proxy instead of merely using it to
|
||||
do HTTP-like operations. The tunnel approach is made with the HTTP proxy
|
||||
CONNECT request and requires that the proxy allows direct connect to the
|
||||
remote port number curl wants to tunnel through to.
|
||||
|
||||
If this option is used twice, the second will again disable proxy tunnel.
|
||||
.IP "--pubkey <key>"
|
||||
(SSH) Public key file name. Allows you to provide your public key in this
|
||||
separate file.
|
||||
@@ -938,19 +934,50 @@ just before the transfer command(s), prefix the command with '+' (this
|
||||
is only supported for FTP). You may specify any number of commands. If
|
||||
the server returns failure for one of the commands, the entire operation
|
||||
will be aborted. You must send syntactically correct FTP commands as
|
||||
RFC959 defines to FTP servers, or one of the following commands (with
|
||||
appropriate arguments) to SFTP servers: chgrp, chmod, chown, ln, mkdir,
|
||||
pwd, rename, rm, rmdir, symlink.
|
||||
RFC959 defines to FTP servers, or one of the commands listed below to
|
||||
SFTP servers. This option can be used multiple times.
|
||||
|
||||
This option can be used multiple times.
|
||||
SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
|
||||
commands before sending them to the server. Following is the list of
|
||||
all supported SFTP quote commands:
|
||||
.RS
|
||||
.IP "chgrp group file"
|
||||
The chgrp command sets the group ID of the file named by the file operand to the
|
||||
group ID specified by the group operand. The group operand is a decimal
|
||||
integer group ID.
|
||||
.IP "chmod mode file"
|
||||
The chmod command modifies the file mode bits of the specified file. The
|
||||
mode operand is an octal integer mode number.
|
||||
.IP "chown user file"
|
||||
The chown command sets the owner of the file named by the file operand to the
|
||||
user ID specified by the user operand. The user operand is a decimal
|
||||
integer user ID.
|
||||
.IP "ln source_file target_file"
|
||||
The ln and symlink commands create a symbolic link at the target_file location
|
||||
pointing to the source_file location.
|
||||
.IP "mkdir directory_name"
|
||||
The mkdir command creates the directory named by the directory_name operand.
|
||||
.IP "pwd"
|
||||
The pwd command returns the absolute pathname of the current working directory.
|
||||
.IP "rename source target"
|
||||
The rename command renames the file or directory named by the source
|
||||
operand to the destination path named by the target operand.
|
||||
.IP "rm file"
|
||||
The rm command removes the file specified by the file operand.
|
||||
.IP "rmdir directory"
|
||||
The rmdir command removes the directory entry specified by the directory
|
||||
operand, provided it is empty.
|
||||
.IP "symlink source_file target_file"
|
||||
See ln.
|
||||
.RE
|
||||
.IP "--random-file <file>"
|
||||
(SSL) Specify the path name to file containing what will be considered as
|
||||
random data. The data is used to seed the random engine for SSL connections.
|
||||
See also the \fI--egd-file\fP option.
|
||||
.IP "-r/--range <range>"
|
||||
(HTTP/FTP)
|
||||
Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP
|
||||
server. Ranges can be specified in a number of ways.
|
||||
(HTTP/FTP/FILE) Retrieve a byte range (i.e a partial document) from a
|
||||
HTTP/1.1, FTP server or a local FILE. Ranges can be specified in a number of
|
||||
ways.
|
||||
.RS
|
||||
.TP 10
|
||||
.B 0-499
|
||||
@@ -993,14 +1020,10 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--raw"
|
||||
When used, it disables all internal HTTP decoding of content or transfer
|
||||
encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
|
||||
|
||||
If this option is used several times, each occurrence toggles this on/off.
|
||||
.IP "-R/--remote-time"
|
||||
When used, this will make libcurl attempt to figure out the timestamp of the
|
||||
remote file, and if that is available make the local file get that same
|
||||
timestamp.
|
||||
|
||||
If this option is used twice, the second time disables this again.
|
||||
.IP "--retry <num>"
|
||||
If a transient error is returned when curl tries to perform a transfer, it
|
||||
will retry this number of times before giving up. Setting the number to 0
|
||||
@@ -1035,12 +1058,8 @@ If this option is used multiple times, the last occurrence decide the amount.
|
||||
.IP "-s/--silent"
|
||||
Silent mode. Don't show progress meter or error messages. Makes
|
||||
Curl mute.
|
||||
|
||||
If this option is used twice, the second will again disable silent mode.
|
||||
.IP "-S/--show-error"
|
||||
When used with -s it makes curl show error message if it fails.
|
||||
|
||||
If this option is used twice, the second will again disable show error.
|
||||
.IP "--socks4 <host[:port]>"
|
||||
Use the specified SOCKS4 proxy. If the port number is not specified, it is
|
||||
assumed at port 1080. (Added in 7.15.2)
|
||||
@@ -1049,9 +1068,28 @@ This option overrides any previous use of \fI-x/--proxy\fP, as they are
|
||||
mutually exclusive.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--socks4a <host[:port]>"
|
||||
Use the specified SOCKS4a proxy. If the port number is not specified, it is
|
||||
assumed at port 1080. (Added in 7.18.0)
|
||||
|
||||
This option overrides any previous use of \fI-x/--proxy\fP, as they are
|
||||
mutually exclusive.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--socks5-hostname <host[:port]>"
|
||||
Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
|
||||
the port number is not specified, it is assumed at port 1080. (Added in
|
||||
7.18.0)
|
||||
|
||||
This option overrides any previous use of \fI-x/--proxy\fP, as they are
|
||||
mutually exclusive.
|
||||
|
||||
If this option is used several times, the last one will be used. (This option
|
||||
was previously wrongly documented and used as --socks without the number
|
||||
appended.)
|
||||
.IP "--socks5 <host[:port]>"
|
||||
Use the specified SOCKS5 proxy. If the port number is not specified, it is
|
||||
assumed at port 1080. (Added in 7.11.1)
|
||||
Use the specified SOCKS5 proxy - but resolve the host name locally. If the
|
||||
port number is not specified, it is assumed at port 1080.
|
||||
|
||||
This option overrides any previous use of \fI-x/--proxy\fP, as they are
|
||||
mutually exclusive.
|
||||
@@ -1068,8 +1106,6 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--tcp-nodelay"
|
||||
Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
|
||||
details about this option. (Added in 7.11.2)
|
||||
|
||||
If this option is used several times, each occurrence toggles this on/off.
|
||||
.IP "-t/--telnet-option <OPT=val>"
|
||||
Pass options to the telnet protocol. Supported options are:
|
||||
|
||||
@@ -1122,12 +1158,13 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--trace-time"
|
||||
Prepends a time stamp to each trace or verbose line that curl displays.
|
||||
(Added in 7.14.0)
|
||||
|
||||
If this option is used several times, each occurrence will toggle it on/off.
|
||||
.IP "-u/--user <user:password>"
|
||||
Specify user and password to use for server authentication. Overrides
|
||||
\fI-n/--netrc\fP and \fI--netrc-optional\fP.
|
||||
|
||||
If you just give the user name (without entering a colon) curl will prompt for
|
||||
a password.
|
||||
|
||||
If you use an SSPI-enabled curl binary and do NTLM authentication, you can
|
||||
force curl to pick up the user name and password from your environment by
|
||||
simply specifying a single colon with this option: "-u :".
|
||||
@@ -1160,8 +1197,6 @@ If you think this option still doesn't give you enough details, consider using
|
||||
\fI--trace\fP or \fI--trace-ascii\fP instead.
|
||||
|
||||
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
|
||||
|
||||
If this option is used twice, the second will do nothing extra.
|
||||
.IP "-V/--version"
|
||||
Displays information about curl and the libcurl version it uses.
|
||||
|
||||
@@ -1226,7 +1261,9 @@ The URL that was fetched last. This is mostly meaningful if you've told curl
|
||||
to follow location: headers.
|
||||
.TP
|
||||
.B http_code
|
||||
The numerical code that was found in the last retrieved HTTP(S) page.
|
||||
The numerical response code that was found in the last retrieved HTTP(S) or
|
||||
FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
|
||||
same info.
|
||||
.TP
|
||||
.B http_connect
|
||||
The numerical code that was found in the last response (from a proxy) to a
|
||||
@@ -1241,8 +1278,12 @@ The time, in seconds, it took from the start until the name resolving was
|
||||
completed.
|
||||
.TP
|
||||
.B time_connect
|
||||
The time, in seconds, it took from the start until the connect to the remote
|
||||
host (or proxy) was completed.
|
||||
The time, in seconds, it took from the start until the TCP connect to the
|
||||
remote host (or proxy) was completed.
|
||||
.TP
|
||||
.B time_appconnect
|
||||
The time, in seconds, it took from the start until the SSL/SSH/etc
|
||||
connect/handshake to the remote host was completed. (Added in 7.19.0)
|
||||
.TP
|
||||
.B time_pretransfer
|
||||
The time, in seconds, it took from the start until the file transfer is just
|
||||
@@ -1287,9 +1328,17 @@ Number of new connects made in the recent transfer. (Added in 7.12.3)
|
||||
.B num_redirects
|
||||
Number of redirects that were followed in the request. (Added in 7.12.3)
|
||||
.TP
|
||||
.B redirect_url
|
||||
When a HTTP request was made without -L to follow redirects, this variable
|
||||
will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
|
||||
.TP
|
||||
.B ftp_entry_path
|
||||
The initial path libcurl ended up in when logging on to the remote FTP
|
||||
server. (Added in 7.15.4)
|
||||
.TP
|
||||
.B ssl_verify_result
|
||||
The result of the SSL peer certificate verification that was requested. 0
|
||||
means the verification was successful. (Added in 7.19.0)
|
||||
.RE
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
@@ -1379,8 +1428,6 @@ IPv6 addresses only.
|
||||
.IP "-#/--progress-bar"
|
||||
Make curl display progress information as a progress bar instead of the
|
||||
default statistics.
|
||||
|
||||
If this option is used twice, the second will again disable the progress bar.
|
||||
.SH FILES
|
||||
.I ~/.curlrc
|
||||
.RS
|
||||
@@ -1545,6 +1592,10 @@ The resource referenced in the URL does not exist
|
||||
An unspecified error occurred during the SSH session
|
||||
.IP 80
|
||||
Failed to shut down the SSL connection
|
||||
.IP 82
|
||||
Could not load CRL file, missing or wrong format (added in 7.19.0)
|
||||
.IP 83
|
||||
Issuer check failed (added in 7.19.0)
|
||||
.IP XX
|
||||
There will appear more error codes here in future releases. The existing ones
|
||||
are meant to never change.
|
||||
|
@@ -16,7 +16,9 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#ifndef WIN32
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <curl/multi.h>
|
||||
|
||||
static const char *urls[] = {
|
||||
@@ -74,7 +76,7 @@ static const char *urls[] = {
|
||||
#define MAX 10 /* number of simultaneous transfers */
|
||||
#define CNT sizeof(urls)/sizeof(char*) /* total number of transfers to do */
|
||||
|
||||
static int cb(char *d, size_t n, size_t l, void *p)
|
||||
static size_t cb(char *d, size_t n, size_t l, void *p)
|
||||
{
|
||||
/* take care of the data here, ignored in this example */
|
||||
(void)d;
|
||||
@@ -87,10 +89,10 @@ static void init(CURLM *cm, int i)
|
||||
CURL *eh = curl_easy_init();
|
||||
|
||||
curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, cb);
|
||||
curl_easy_setopt(eh, CURLOPT_HEADER, 0);
|
||||
curl_easy_setopt(eh, CURLOPT_HEADER, 0L);
|
||||
curl_easy_setopt(eh, CURLOPT_URL, urls[i]);
|
||||
curl_easy_setopt(eh, CURLOPT_PRIVATE, urls[i]);
|
||||
curl_easy_setopt(eh, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(eh, CURLOPT_VERBOSE, 0L);
|
||||
|
||||
curl_multi_add_handle(cm, eh);
|
||||
}
|
||||
@@ -138,7 +140,11 @@ int main(void)
|
||||
L = 100;
|
||||
|
||||
if (M == -1) {
|
||||
#ifdef WIN32
|
||||
Sleep(L);
|
||||
#else
|
||||
sleep(L / 1000);
|
||||
#endif
|
||||
} else {
|
||||
T.tv_sec = L/1000;
|
||||
T.tv_usec = (L%1000)*1000;
|
||||
|
@@ -4,28 +4,33 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
EXTRA_DIST = README Makefile.example makefile.dj $(COMPLICATED_EXAMPLES)
|
||||
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
|
||||
CPPFLAGS = -DCURL_NO_OLDIES
|
||||
|
||||
if STATICLIB
|
||||
# we need this define when building with a static lib on Windows
|
||||
STATICCPPFLAGS = -DCURL_STATICLIB
|
||||
endif
|
||||
|
||||
CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
|
||||
|
||||
# Dependencies
|
||||
LDADD = $(LIBDIR)/libcurl.la
|
||||
|
||||
# These are all libcurl example programs to be test compiled
|
||||
noinst_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
||||
debug fileupload fopen ftpget ftpgetresp ftpupload \
|
||||
getinfo getinmemory http-post httpput \
|
||||
https multi-app multi-debugcallback multi-double \
|
||||
multi-post multi-single persistant post-callback \
|
||||
postit2 sepheaders simple simplepost simplessl
|
||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
include Makefile.inc
|
||||
|
||||
# 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
|
||||
|
||||
|
17
docs/examples/Makefile.inc
Normal file
17
docs/examples/Makefile.inc
Normal file
@@ -0,0 +1,17 @@
|
||||
# These are all libcurl example programs to be test compiled
|
||||
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
||||
debug fileupload fopen ftpget ftpgetresp ftpupload \
|
||||
getinfo getinmemory http-post httpput \
|
||||
https multi-app multi-debugcallback multi-double \
|
||||
multi-post multi-single persistant post-callback \
|
||||
postit2 sepheaders simple simplepost simplessl \
|
||||
sendrecv httpcustomheader
|
||||
|
||||
# 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
|
||||
|
||||
|
134
docs/examples/Makefile.m32
Normal file
134
docs/examples/Makefile.m32
Normal file
@@ -0,0 +1,134 @@
|
||||
#########################################################################
|
||||
# $Id$
|
||||
#
|
||||
## Makefile for building curl examples with MingW32
|
||||
## and optionally OpenSSL (0.9.8), libssh2 (0.18), zlib (1.2.3)
|
||||
##
|
||||
## Usage:
|
||||
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [SSPI=1] [IPV6=1] [DYN=1]
|
||||
##
|
||||
## Hint: you can also set environment vars to control the build, f.e.:
|
||||
## set ZLIB_PATH=c:/zlib-1.2.3
|
||||
## set ZLIB=1
|
||||
##
|
||||
#########################################################################
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
ifndef ZLIB_PATH
|
||||
ZLIB_PATH = ../../zlib-1.2.3
|
||||
endif
|
||||
# Edit the path below to point to the base of your OpenSSL package.
|
||||
ifndef OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../openssl-0.9.8g
|
||||
endif
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
ifndef LIBSSH2_PATH
|
||||
LIBSSH2_PATH = ../../libssh2-0.18
|
||||
endif
|
||||
# Edit the path below to point to the base of your Novell LDAP NDK.
|
||||
ifndef LDAP_SDK
|
||||
LDAP_SDK = c:/novell/ndk/cldapsdk/win32
|
||||
endif
|
||||
|
||||
PROOT = ../..
|
||||
ARES_LIB = $(PROOT)/ares
|
||||
|
||||
SSL = 1
|
||||
ZLIB = 1
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -g -O2 -Wall
|
||||
# comment LDFLAGS below to keep debug info
|
||||
LDFLAGS = -s
|
||||
RC = windres
|
||||
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
|
||||
RM = del /q /f > NUL 2>&1
|
||||
CP = copy
|
||||
|
||||
########################################################
|
||||
## Nothing more to do below this line!
|
||||
|
||||
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
|
||||
LINK = $(CC) $(LDFLAGS) -o $@
|
||||
|
||||
ifdef DYN
|
||||
curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
|
||||
curl_LDADD = -L$(PROOT)/lib -lcurldll
|
||||
else
|
||||
curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
|
||||
curl_LDADD = -L$(PROOT)/lib -lcurl
|
||||
CFLAGS += -DCURL_STATICLIB
|
||||
endif
|
||||
ifdef ARES
|
||||
ifndef DYN
|
||||
curl_DEPENDENCIES += $(ARES_LIB)/libcares.a
|
||||
endif
|
||||
CFLAGS += -DUSE_ARES
|
||||
curl_LDADD += -L$(ARES_LIB) -lcares
|
||||
endif
|
||||
ifdef SSH2
|
||||
CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
|
||||
curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
|
||||
endif
|
||||
ifdef SSL
|
||||
INCLUDES += -I"$(OPENSSL_PATH)/outinc"
|
||||
CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
|
||||
ifdef DYN
|
||||
curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
|
||||
else
|
||||
curl_LDADD += -L$(OPENSSL_PATH)/out -lssl -lcrypto -lgdi32
|
||||
endif
|
||||
endif
|
||||
ifdef ZLIB
|
||||
INCLUDES += -I"$(ZLIB_PATH)"
|
||||
CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
|
||||
curl_LDADD += -L$(ZLIB_PATH) -lz
|
||||
endif
|
||||
ifdef SSPI
|
||||
CFLAGS += -DUSE_WINDOWS_SSPI
|
||||
endif
|
||||
ifdef IPV6
|
||||
CFLAGS += -DENABLE_IPV6
|
||||
endif
|
||||
ifdef LDAPS
|
||||
CFLAGS += -DHAVE_LDAP_SSL
|
||||
endif
|
||||
ifdef USE_LDAP_NOVELL
|
||||
CFLAGS += -DCURL_HAS_NOVELL_LDAPSDK
|
||||
curl_LDADD += -L"$(LDAP_SDK)/lib/mscvc" -lldapsdk -lldapssl -lldapx
|
||||
endif
|
||||
ifdef USE_LDAP_OPENLDAP
|
||||
CFLAGS += -DCURL_HAS_OPENLDAP_LDAPSDK
|
||||
curl_LDADD += -L"$(LDAP_SDK)/lib" -lldap -llber
|
||||
endif
|
||||
ifndef USE_LDAP_NOVELL
|
||||
ifndef USE_LDAP_OPENLDAP
|
||||
curl_LDADD += -lwldap32
|
||||
endif
|
||||
endif
|
||||
curl_LDADD += -lws2_32
|
||||
COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
|
||||
|
||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
include Makefile.inc
|
||||
|
||||
example_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
|
||||
|
||||
.SUFFIXES: .rc .res .o .exe
|
||||
|
||||
|
||||
all: $(example_PROGRAMS)
|
||||
|
||||
.o.exe: $(curl_DEPENDENCIES)
|
||||
$(LINK) $< $(curl_LDADD)
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.rc.res:
|
||||
$(RC) $(RCFLAGS) $< -o $@
|
||||
|
||||
clean:
|
||||
$(RM) $(example_PROGRAMS)
|
||||
|
||||
|
@@ -10,8 +10,22 @@
|
||||
|
||||
#include <stdio.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>
|
||||
|
||||
@@ -37,7 +51,7 @@
|
||||
/* ioctl callback function */
|
||||
static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
|
||||
{
|
||||
int fd = (int)userp;
|
||||
intptr_t fd = (intptr_t)userp;
|
||||
|
||||
(void)handle; /* not used in here */
|
||||
|
||||
@@ -61,7 +75,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
size_t retcode;
|
||||
|
||||
int fd = (int)stream;
|
||||
intptr_t fd = (intptr_t)stream;
|
||||
|
||||
retcode = read(fd, ptr, size * nmemb);
|
||||
|
||||
@@ -74,7 +88,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
int hd ;
|
||||
intptr_t hd ;
|
||||
struct stat file_info;
|
||||
|
||||
char *file;
|
||||
@@ -100,16 +114,16 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
|
||||
/* which file to upload */
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, hd);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, (void*)hd);
|
||||
|
||||
/* set the ioctl function */
|
||||
curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, my_ioctl);
|
||||
|
||||
/* pass the file descriptor to the ioctl callback as well */
|
||||
curl_easy_setopt(curl, CURLOPT_IOCTLDATA, hd);
|
||||
curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd);
|
||||
|
||||
/* enable "uploading" (which means PUT when doing HTTP) */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L) ;
|
||||
|
||||
/* specify target URL, and note that this URL should also include a file
|
||||
name, not only a directory (as you can do with GTP uploads) */
|
||||
@@ -117,12 +131,13 @@ int main(int argc, char **argv)
|
||||
|
||||
/* and give the size of the upload, this supports large file sizes
|
||||
on systems that have general support for it */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
|
||||
(curl_off_t)file_info.st_size);
|
||||
|
||||
/* tell libcurl we can use "any" auth, which lets the lib pick one, but it
|
||||
also costs one extra round-trip and possibly sending of all the PUT
|
||||
data twice!!! */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
|
||||
|
||||
/* set user name and password for the authentication */
|
||||
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
|
||||
|
@@ -102,16 +102,16 @@ int main(void)
|
||||
|
||||
rv=curl_global_init(CURL_GLOBAL_ALL);
|
||||
ch=curl_easy_init();
|
||||
rv=curl_easy_setopt(ch,CURLOPT_VERBOSE, 0);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_HEADER, 0);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_VERBOSE, 0L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_HEADER, 0L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
|
||||
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.cacert.org/");
|
||||
|
||||
/* first try: retrieve page without cacerts' certificate -> will fail
|
||||
|
@@ -54,7 +54,7 @@ main(void)
|
||||
char nline[256];
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com/"); /* google.com sets "PREF" cookie */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* just to start the cookie engine */
|
||||
res = curl_easy_perform(curl);
|
||||
if (res != CURLE_OK) {
|
||||
|
@@ -29,7 +29,7 @@ size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||
return fread(ptr, size, nmemb, stream);
|
||||
}
|
||||
|
||||
int my_progress_func(GtkWidget *Bar,
|
||||
int my_progress_func(GtkWidget *bar,
|
||||
double t, /* dltotal */
|
||||
double d, /* dlnow */
|
||||
double ultotal,
|
||||
@@ -37,7 +37,7 @@ int my_progress_func(GtkWidget *Bar,
|
||||
{
|
||||
/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
|
||||
gdk_threads_enter();
|
||||
gtk_progress_set_value(GTK_PROGRESS(Bar), d*100.0/t);
|
||||
gtk_progress_set_value(GTK_PROGRESS(bar), d*100.0/t);
|
||||
gdk_threads_leave();
|
||||
return 0;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void *my_thread(void *ptr)
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE);
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
|
||||
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar);
|
||||
|
||||
@@ -77,6 +77,9 @@ int main(int argc, char **argv)
|
||||
GtkWidget *Window, *Frame, *Frame2;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
/* Must initialize libcurl before any threads are started */
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
/* Init thread */
|
||||
g_thread_init(NULL);
|
||||
|
||||
|
@@ -438,7 +438,7 @@ int main(int argc, char **argv) {
|
||||
/* Now specify the POST binary data */
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDS, binaryptr);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,tabLength);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,(long)tabLength);
|
||||
|
||||
/* pass our list of custom made headers */
|
||||
|
||||
@@ -477,7 +477,7 @@ int main(int argc, char **argv) {
|
||||
/* Now specify the POST binary data */
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDS, binaryptr);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,tabLength);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,(long)tabLength);
|
||||
|
||||
|
||||
/* Perform the request, res will get the return code */
|
||||
|
@@ -65,7 +65,7 @@ void dump(const char *text,
|
||||
|
||||
static
|
||||
int my_trace(CURL *handle, curl_infotype type,
|
||||
unsigned char *data, size_t size,
|
||||
char *data, size_t size,
|
||||
void *userp)
|
||||
{
|
||||
struct data *config = (struct data *)userp;
|
||||
@@ -98,7 +98,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
||||
break;
|
||||
}
|
||||
|
||||
dump(text, stderr, data, size, config->trace_ascii);
|
||||
dump(text, stderr, (unsigned char *)data, size, config->trace_ascii);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
|
||||
|
||||
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
res = curl_easy_perform(curl);
|
||||
|
@@ -36,7 +36,7 @@ int main(void)
|
||||
"file:///home/dast/src/curl/debug/new");
|
||||
|
||||
/* tell it to "upload" to the URL */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* set where to read from (on Windows you need to use READFUNCTION too) */
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, fd);
|
||||
@@ -46,7 +46,7 @@ int main(void)
|
||||
(curl_off_t)file_info.st_size);
|
||||
|
||||
/* enable verbose for easier tracing */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user