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

# [NAME](#NAME)

ares\_dup - Duplicate a resolver channel

# [SYNOPSIS](#SYNOPSIS)

```
#include <ares.h>
int ares_dup(ares_channel_t **dest, const ares_channel_t *source)
```

# [DESCRIPTION](#DESCRIPTION)

The [**ares\_dup(3)**](/man/os/c-ares/ares_dup.3) function duplicates an existing communications channel for name service lookups. If it returns successfully, [**ares\_dup(3)**](/man/os/c-ares/ares_dup.3) will set the variable pointed to by *dest* to a handle used to identify the name service channel. The caller should invoke [*ares\_destroy(3)*](/man/os/c-ares/ares_destroy.3) on the handle when the channel is no longer needed.

# [SEE ALSO](#SEE_ALSO)

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

# [AVAILABILITY](#AVAILABILITY)

[*ares\_dup(3)*](/man/os/c-ares/ares_dup.3) was added in c-ares 1.6.0

26 May 2009

---

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