---
name: "ares_dup"
section: "3"
platform: "linux"
package: "c-ares"
version: "1.34.9-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ares_dup"
---

# ares\_dup(3)

Duplicate a resolver channel

## NAME

ares\_dup - Duplicate a resolver channel

## SYNOPSIS

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

## DESCRIPTION

The **[ares\_dup(3)](/ares_dup/3.md)** function duplicates an existing communications channel for name service lookups.  If it returns successfully, **[ares\_dup(3)](/ares_dup/3.md)** 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)](/ares_destroy/3.md)* on the handle when the channel is no longer needed.

## SEE ALSO

[**ares\_destroy**(3)](/ares_destroy/3.md), [**ares\_init**(3)](/ares_init/3.md), [**ares\_library\_init**(3)](/ares_library_init/3.md)

## AVAILABILITY

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