Asynchronous DNS stub resolver library in C
open sourceMITfree
c-ares is a DNS stub resolver library written in C, with interfaces for asynchronous queries, for applications that need to look up names without blocking or to run many queries in parallel. It aims to be a better resolver than the system's own, builds with any C89 compiler and runs on Linux, the BSDs, macOS, Solaris, AIX, Windows, Android and iOS. It's been around for over 20 years, is fuzzed by OSS-Fuzz, uses safe parsers and data builders throughout, and publishes SLSA provenance for its releases.
Problems it solves
- resolve hostnames in my C program without blocking the event loop
- run hundreds of DNS lookups in parallel from a network service
- a portable DNS resolver library that behaves the same on every OS
- replace getaddrinfo with something asynchronous and secure
Features
- asynchronous and parallel DNS queries
- builds with any C89 compiler
- Linux, BSD, macOS, Windows, Android and iOS support
- safe parsers and data builders throughout
- continuous fuzzing by OSS-Fuzz
- signed releases with SLSA provenance
