ares_set_servers_csv.3 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .\"
  2. .\" Copyright 2010 by Ben Greear <[email protected]>
  3. .\"
  4. .\" Permission to use, copy, modify, and distribute this
  5. .\" software and its documentation for any purpose and without
  6. .\" fee is hereby granted, provided that the above copyright
  7. .\" notice appear in all copies and that both that copyright
  8. .\" notice and this permission notice appear in supporting
  9. .\" documentation, and that the name of M.I.T. not be used in
  10. .\" advertising or publicity pertaining to distribution of the
  11. .\" software without specific, written prior permission.
  12. .\" M.I.T. makes no representations about the suitability of
  13. .\" this software for any purpose. It is provided "as is"
  14. .\" without express or implied warranty.
  15. .\"
  16. .TH ARES_SET_SERVERS_CSV 3 "30 June 2010"
  17. .SH NAME
  18. ares_set_servers_csv, ares_set_servers_ports_csv \- Set list of DNS servers to be used.
  19. .SH SYNOPSIS
  20. .nf
  21. .B #include <ares.h>
  22. .PP
  23. .B int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
  24. .B int ares_set_servers_ports_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
  25. .fi
  26. .SH DESCRIPTION
  27. The \fBares_set_servers_csv\fP and \fBares_set_servers_ports_csv\fPfunctions set
  28. the list of DNS servers that ARES will query. The format of the servers option is:
  29. host[:port][,host[:port]]...
  30. For example:
  31. 192.168.1.100,192.168.1.101,3.4.5.6
  32. .PP
  33. The \fBares_set_servers_csv\fP function will ignore any port values specified in
  34. the input string, whereare the \fBares_set_servers_ports_csv\fP function will
  35. apply any specified port values as the UDP and TCP port to be used for that
  36. particular nameserver.
  37. .SH RETURN VALUES
  38. .B ares_set_servers_csv(3)
  39. This function may return any of the following values:
  40. .TP 15
  41. .B ARES_SUCCESS
  42. The name servers configuration was successfully initialized.
  43. .TP 15
  44. .B ARES_ENOMEM
  45. The process's available memory was exhausted.
  46. .TP 15
  47. .B ARES_ENODATA
  48. The channel data identified by
  49. .IR channel
  50. was invalid.
  51. .TP 15
  52. .B ARES_ENOTINITIALIZED
  53. c-ares library initialization not yet performed.
  54. .TP 15
  55. .B ARES_ENOTIMP
  56. Changing name servers configuration while queries are outstanding is not implemented.
  57. .SH SEE ALSO
  58. .BR ares_set_servers (3)
  59. .SH AVAILABILITY
  60. \fBares_set_servers_csv\fP was added in c-ares 1.7.2;
  61. \fBares_set_servers_ports_csv\fP was added in c-ares 1.11.0.
  62. .SH AUTHOR
  63. Ben Greear