|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| cmake/ | | 22-Oct-2025 | - | 438 | 382 |
| docs/ | | 22-Oct-2025 | - | 7,792 | 6,577 |
| include/ | | 22-Oct-2025 | - | 4,519 | 2,383 |
| src/ | | 22-Oct-2025 | - | 50,486 | 34,143 |
| test/ | | 22-Oct-2025 | - | 19,755 | 15,533 |
| .gitattributes | D | 22-Oct-2025 | 631 | 16 | 15 |
| AUTHORS | D | 22-Oct-2025 | 1.2 KiB | 85 | 83 |
| BUILD.gn | D | 22-Oct-2025 | 5.8 KiB | 243 | 228 |
| CMakeLists.txt | D | 22-Oct-2025 | 37.5 KiB | 906 | 790 |
| CONTRIBUTING.md | D | 22-Oct-2025 | 369 | 10 | 7 |
| DEVELOPER-NOTES.md | D | 22-Oct-2025 | 2.6 KiB | 48 | 37 |
| INSTALL.md | D | 22-Oct-2025 | 15 KiB | 473 | 337 |
| LICENSE.md | D | 22-Oct-2025 | 1.2 KiB | 25 | 20 |
| Makefile.Watcom | D | 22-Oct-2025 | 5.8 KiB | 244 | 182 |
| Makefile.am | D | 22-Oct-2025 | 2.4 KiB | 66 | 23 |
| Makefile.dj | D | 22-Oct-2025 | 3.5 KiB | 150 | 93 |
| Makefile.in | D | 22-Oct-2025 | 31.9 KiB | 985 | 851 |
| Makefile.m32 | D | 22-Oct-2025 | 2.2 KiB | 82 | 49 |
| Makefile.msvc | D | 22-Oct-2025 | 16 KiB | 473 | 275 |
| Makefile.netware | D | 22-Oct-2025 | 14 KiB | 431 | 359 |
| OAT.xml | D | 22-Oct-2025 | 6.2 KiB | 91 | 38 |
| README.OpenSource | D | 22-Oct-2025 | 306 | 12 | 11 |
| README.md | D | 22-Oct-2025 | 7.7 KiB | 159 | 130 |
| README.msvc | D | 22-Oct-2025 | 3.6 KiB | 103 | 62 |
| RELEASE-NOTES.md | D | 22-Oct-2025 | 1 KiB | 29 | 21 |
| SECURITY.md | D | 22-Oct-2025 | 4.4 KiB | 101 | 74 |
| aclocal.m4 | D | 22-Oct-2025 | 44.9 KiB | 1,249 | 1,136 |
| aminclude_static.am | D | 22-Oct-2025 | 6.6 KiB | 127 | 108 |
| buildconf | D | 22-Oct-2025 | 211 | 7 | 2 |
| buildconf.bat | D | 22-Oct-2025 | 646 | 24 | 19 |
| bundle.json | D | 22-Oct-2025 | 1.3 KiB | 49 | 48 |
| c-ares-config.cmake.in | D | 22-Oct-2025 | 886 | 28 | 21 |
| configure | D | 22-Oct-2025 | 819.3 KiB | 28,448 | 23,882 |
| configure.ac | D | 22-Oct-2025 | 33.9 KiB | 880 | 789 |
| install.sh | D | 22-Oct-2025 | 817 | 32 | 12 |
| libcares.pc.cmake | D | 22-Oct-2025 | 775 | 24 | 22 |
| libcares.pc.in | D | 22-Oct-2025 | 672 | 23 | 21 |
README.OpenSource
1[
2 {
3 "Name": "c-ares",
4 "License": "MIT License",
5 "License File": "LICENSE.md",
6 "Version Number": "cares-1_34_5",
7 "Owner": "heqianmo@huawei.com",
8 "Upstream URL": "https://gitee.com/c-ares/c-ares",
9 "Description": "A C library for asynchronous DNS requests."
10 }
11]
12
README.md
1# [](https://c-ares.org/)
2
3[](https://cirrus-ci.com/github/c-ares/c-ares)
4[](https://ci.appveyor.com/project/c-ares/c-ares/branch/main)
5[](https://coveralls.io/github/c-ares/c-ares?branch=main)
6[](https://bestpractices.coreinfrastructure.org/projects/291)
7[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:c-ares)
8[](https://sonarcloud.io/summary/new_code?id=c-ares_c-ares)
9[](https://scan.coverity.com/projects/c-ares)
10
11- [Overview](#overview)
12- [Code](#code)
13- [Communication](#communication)
14- [Release Keys](#release-keys)
15 - [Verifying signatures](#verifying-signatures)
16- [Features](#features)
17 - [RFCs and Proposals](#supported-rfcs-and-proposals)
18
19## Overview
20[c-ares](https://c-ares.org) is a modern DNS (stub) resolver library, written in
21C. It provides interfaces for asynchronous queries while trying to abstract the
22intricacies of the underlying DNS protocol. It was originally intended for
23applications which need to perform DNS queries without blocking, or need to
24perform multiple DNS queries in parallel.
25
26One of the goals of c-ares is to be a better DNS resolver than is provided by
27your system, regardless of which system you use. We recommend using
28the c-ares library in all network applications even if the initial goal of
29asynchronous resolution is not necessary to your application.
30
31c-ares will build with any C89 compiler and is [MIT licensed](LICENSE.md),
32which makes it suitable for both free and commercial software. c-ares runs on
33Linux, FreeBSD, OpenBSD, MacOS, Solaris, AIX, Windows, Android, iOS and many
34more operating systems.
35
36c-ares has a strong focus on security, implementing safe parsers and data
37builders used throughout the code, thus avoiding many of the common pitfalls
38of other C libraries. Through automated testing with our extensive testing
39framework, c-ares is constantly validated with a range of static and dynamic
40analyzers, as well as being constantly fuzzed by [OSS Fuzz](https://github.com/google/oss-fuzz).
41
42While c-ares has been around for over 20 years, it has been actively maintained
43both in regards to the latest DNS RFCs as well as updated to follow the latest
44best practices in regards to C coding standards.
45
46## Code
47
48The full source code and revision history is available in our
49[GitHub repository](https://github.com/c-ares/c-ares). Our signed releases
50are available in the [release archives](https://c-ares.org/download/).
51
52
53See the [INSTALL.md](INSTALL.md) file for build information.
54
55## Communication
56
57**Issues** and **Feature Requests** should be reported to our
58[GitHub Issues](https://github.com/c-ares/c-ares/issues) page.
59
60**Discussions** around c-ares and its use, are held on
61[GitHub Discussions](https://github.com/c-ares/c-ares/discussions/categories/q-a)
62or the [Mailing List](https://lists.haxx.se/mailman/listinfo/c-ares). Mailing
63List archive [here](https://lists.haxx.se/pipermail/c-ares/).
64Please, do not mail volunteers privately about c-ares.
65
66**Security vulnerabilities** are treated according to our
67[Security Procedure](SECURITY.md), please email c-ares-security at
68 haxx.se if you suspect one.
69
70
71## Release keys
72
73Primary GPG keys for c-ares Releasers (some Releasers sign with subkeys):
74
75* **Daniel Stenberg** <<daniel@haxx.se>>
76 `27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2`
77* **Brad House** <<brad@brad-house.com>>
78 `DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA`
79
80To import the full set of trusted release keys (including subkeys possibly used
81to sign releases):
82
83```bash
84gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 # Daniel Stenberg
85gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA # Brad House
86```
87
88### Verifying signatures
89
90For each release `c-ares-X.Y.Z.tar.gz` there is a corresponding
91`c-ares-X.Y.Z.tar.gz.asc` file which contains the detached signature for the
92release.
93
94After fetching all of the possible valid signing keys and loading into your
95keychain as per the prior section, you can simply run the command below on
96the downloaded package and detached signature:
97
98```bash
99% gpg -v --verify c-ares-1.29.0.tar.gz.asc c-ares-1.29.0.tar.gz
100gpg: enabled compatibility flags:
101gpg: Signature made Fri May 24 02:50:38 2024 EDT
102gpg: using RSA key 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2
103gpg: using pgp trust model
104gpg: Good signature from "Daniel Stenberg <daniel@haxx.se>" [unknown]
105gpg: WARNING: This key is not certified with a trusted signature!
106gpg: There is no indication that the signature belongs to the owner.
107Primary key fingerprint: 27ED EAF2 2F3A BCEB 50DB 9A12 5CC9 08FD B71E 12C2
108gpg: binary signature, digest algorithm SHA512, key algorithm rsa2048
109```
110
111## Features
112
113See [Features](FEATURES.md)
114
115### Supported RFCs and Proposals
116- [RFC1035](https://datatracker.ietf.org/doc/html/rfc1035).
117 Initial/Base DNS RFC
118- [RFC2671](https://datatracker.ietf.org/doc/html/rfc2671),
119 [RFC6891](https://datatracker.ietf.org/doc/html/rfc6891).
120 EDNS0 option (meta-RR)
121- [RFC3596](https://datatracker.ietf.org/doc/html/rfc3596).
122 IPv6 Address. `AAAA` Record.
123- [RFC2782](https://datatracker.ietf.org/doc/html/rfc2782).
124 Server Selection. `SRV` Record.
125- [RFC3403](https://datatracker.ietf.org/doc/html/rfc3403).
126 Naming Authority Pointer. `NAPTR` Record.
127- [RFC6698](https://datatracker.ietf.org/doc/html/rfc6698).
128 DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol.
129 `TLSA` Record.
130- [RFC9460](https://datatracker.ietf.org/doc/html/rfc9460).
131 General Purpose Service Binding, Service Binding type for use with HTTPS.
132 `SVCB` and `HTTPS` Records.
133- [RFC7553](https://datatracker.ietf.org/doc/html/rfc7553).
134 Uniform Resource Identifier. `URI` Record.
135- [RFC6844](https://datatracker.ietf.org/doc/html/rfc6844).
136 Certification Authority Authorization. `CAA` Record.
137- [RFC2535](https://datatracker.ietf.org/doc/html/rfc2535),
138 [RFC2931](https://datatracker.ietf.org/doc/html/rfc2931).
139 `SIG0` Record. Only basic parser, not full implementation.
140- [RFC7873](https://datatracker.ietf.org/doc/html/rfc7873),
141 [RFC9018](https://datatracker.ietf.org/doc/html/rfc9018).
142 DNS Cookie off-path dns poisoning and amplification mitigation.
143- [draft-vixie-dnsext-dns0x20-00](https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00).
144 DNS 0x20 query name case randomization to prevent cache poisioning attacks.
145- [RFC7686](https://datatracker.ietf.org/doc/html/rfc7686).
146 Reject queries for `.onion` domain names with `NXDOMAIN`.
147- [RFC2606](https://datatracker.ietf.org/doc/html/rfc2606),
148 [RFC6761](https://datatracker.ietf.org/doc/html/rfc6761).
149 Special case treatment for `localhost`/`.localhost`.
150- [RFC2308](https://datatracker.ietf.org/doc/html/rfc2308),
151 [RFC9520](https://datatracker.ietf.org/doc/html/rfc9520).
152 Negative Caching of DNS Resolution Failures.
153- [RFC6724](https://datatracker.ietf.org/doc/html/rfc6724).
154 IPv6 address sorting as used by `ares_getaddrinfo()`.
155- [RFC7413](https://datatracker.ietf.org/doc/html/rfc7413).
156 TCP FastOpen (TFO) for 0-RTT TCP Connection Resumption.
157- [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986).
158 Uniform Resource Identifier (URI). Used for server configuration.
159
README.msvc
1
2
3 ___ __ _ _ __ ___ ___
4 / __| ___ / _` | '__/ _ \/ __|
5 | (_ |___| (_| | | | __/\__ \
6 \___| \__,_|_| \___||___/
7
8
9 How to build c-ares using MSVC or Visual Studio
10 =================================================
11
12
13
14 How to build using MSVC from the command line
15 ---------------------------------------------
16
17 Open a command prompt window and ensure that the environment is properly
18 set up in order to use MSVC or Visual Studio compiler tools.
19
20 Change to c-ares source folder where Makefile.msvc file is located and run:
21
22 > nmake -f Makefile.msvc
23
24 This will build all c-ares libraries as well as three sample programs.
25
26 Once the above command has finished a new folder named MSVCXX will exist
27 below the folder where makefile.msvc is found. The name of the folder
28 depends on the MSVC compiler version being used to build c-ares.
29
30 Below the MSVCXX folder there will exist four folders named 'cares',
31 'ahost', and 'adig'. The 'cares' folder is the one that
32 holds the c-ares libraries you have just generated, the other three
33 hold sample programs that use the libraries.
34
35 The above command builds four versions of the c-ares library, dynamic
36 and static versions and each one in release and debug flavours. Each
37 of these is found in folders named dll-release, dll-debug, lib-release,
38 and lib-debug, which hang from the 'cares' folder mentioned above. Each
39 sample program also has folders with the same names to reflect which
40 library version it is using.
41
42
43 How to install using MSVC from the command line
44 -----------------------------------------------
45
46 In order to allow easy usage of c-ares libraries it may be convenient to
47 install c-ares libraries and header files to a common subdirectory tree.
48
49 Once that c-ares libraries have been built using procedure described above,
50 use same command prompt window to define environment variable INSTALL_DIR
51 to designate the top subdirectory where installation of c-ares libraries and
52 header files will be done.
53
54 > set INSTALL_DIR=c:\c-ares
55
56 Afterwards, run following command to actually perform the installation:
57
58 > nmake -f Makefile.msvc install
59
60 Installation procedure will copy c-ares libraries to subdirectory 'lib' and
61 c-ares header files to subdirectory 'include' below the INSTALL_DIR subdir.
62
63 When environment variable INSTALL_DIR is not defined, installation is done
64 to c-ares source folder where Makefile.msvc file is located.
65
66
67
68 Relationship between c-ares library file names and versions
69 -----------------------------------------------------------
70
71 c-ares static release library version files:
72
73 libcares.lib -> static release library
74
75 c-ares static debug library version files:
76
77 libcaresd.lib -> static debug library
78
79 c-ares dynamic release library version files:
80
81 cares.dll -> dynamic release library
82 cares.lib -> import library for the dynamic release library
83 cares.exp -> export file for the dynamic release library
84
85 c-ares dynamic debug library version files:
86
87 caresd.dll -> dynamic debug library
88 caresd.lib -> import library for the dynamic debug library
89 caresd.exp -> export file for the dynamic debug library
90 caresd.pdb -> debug symbol file for the dynamic debug library
91
92
93 How to use c-ares static libraries
94 ----------------------------------
95
96 When using the c-ares static library in your program, you will have to
97 define preprocessor symbol CARES_STATICLIB while building your program,
98 otherwise you will get errors at linkage stage.
99
100
101Have Fun!
102
103