ares_dup.3 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .\" $Id$
  2. .\"
  3. .\" Copyright (C) 2007-2008 by Daniel Stenberg
  4. .\"
  5. .\" Permission to use, copy, modify, and distribute this
  6. .\" software and its documentation for any purpose and without
  7. .\" fee is hereby granted, provided that the above copyright
  8. .\" notice appear in all copies and that both that copyright
  9. .\" notice and this permission notice appear in supporting
  10. .\" documentation, and that the name of M.I.T. not be used in
  11. .\" advertising or publicity pertaining to distribution of the
  12. .\" software without specific, written prior permission.
  13. .\" M.I.T. makes no representations about the suitability of
  14. .\" this software for any purpose. It is provided "as is"
  15. .\" without express or implied warranty.
  16. .\"
  17. .TH ARES_DUP 3 "2 Dec 2008"
  18. .SH NAME
  19. ares_dup \- Duplicate a resolver channel
  20. .SH SYNOPSIS
  21. .nf
  22. .B #include <ares.h>
  23. .PP
  24. .B int ares_dup(ares_channel *\fIchannel\fP, ares_channel \fIsource\fP)
  25. .fi
  26. .SH DESCRIPTION
  27. The \fBares_dup(3)\fP function duplicates an existing communications channel
  28. for name service lookups. If it returns successfully, \fBares_dup(3)\fP will
  29. set the variable pointed to by \fIchannel\fP to a handle used to identify the
  30. name service channel. The caller should invoke \fIares_destroy(3)\fP on the
  31. handle when the channel is no longer needed.
  32. The \fBares_dup_options\fP function also initializes a name service channel,
  33. with additional options set exactly as the \fIsource\fP channel has them
  34. configured.
  35. .SH SEE ALSO
  36. .BR ares_destroy(3),
  37. .BR ares_init(3)
  38. .SH AVAILABILITY
  39. ares_dup(3) was added in c-ares 1.6.0
  40. .SH AUTHOR
  41. Daniel Stenberg