ARES\_VERSION(3) Library Functions Manual ARES\_VERSION(3)

# [NAME](#NAME)

ares\_version - Get the version number of the library

# [SYNOPSIS](#SYNOPSIS)

```
#include <ares.h>
const char *ares_version(int *version)
```

# [DESCRIPTION](#DESCRIPTION)

The [**ares\_version(3)**](/man/os/c-ares/ares_version.3) function gets the library version as a string and optionally as an integer stored in the *version* argument. If you pass a NULL, no integer is attempted to be returned.

The integer is built up as 24bit number, with 8 separate bits used for major number, minor number and patch number. This makes a version string such as 1.2.3 will be returned as the hexadecimal number 0x010203 (decimal 66051).

# [SEE ALSO](#SEE_ALSO)

[**ares\_init**(3)](/man/os/c-ares/ares_init.3), [**ares\_library\_init**(3)](/man/os/c-ares/ares_library_init.3)

29 January 2004

---

Document: ares_version(3) from c-ares 1.34.8-r2 (Chainguard OS)
Source: https://github.com/c-ares/c-ares
