ares_free_data.3 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. .\"
  2. .\" Copyright 1998 by the Massachusetts Institute of Technology.
  3. .\" Copyright (C) 2004-2010 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_FREE_DATA 3 "5 March 2010"
  18. .SH NAME
  19. ares_free_data \- Free data allocated by several c-ares functions
  20. .SH SYNOPSIS
  21. .nf
  22. .B #include <ares.h>
  23. .PP
  24. .B void ares_free_data(void *\fIdataptr\fP)
  25. .PP
  26. .B cc file.c -lcares
  27. .fi
  28. .SH DESCRIPTION
  29. .PP
  30. The
  31. .B ares_free_data(3)
  32. function frees one or more data structures allocated and returned
  33. by several c-ares functions. Specifically the data returned by the
  34. following list of functions must be deallocated using this function.
  35. .TP 5
  36. .B ares_get_servers(3)
  37. When used to free the data returned by ares_get_servers(3) this
  38. will free the whole linked list of ares_addr_node structures returned
  39. by ares_get_servers(3).
  40. .TP
  41. .B ares_parse_srv_reply(3)
  42. When used to free the data returned by ares_parse_srv_reply(3) this
  43. will free the whole linked list of ares_srv_reply structures returned
  44. by ares_parse_srv_reply(3), along with any additional storage
  45. associated with those structures.
  46. .TP
  47. .B ares_parse_mx_reply(3)
  48. When used to free the data returned by ares_parse_mx_reply(3) this
  49. will free the whole linked list of ares_mx_reply structures returned
  50. by ares_parse_mx_reply(3), along with any additional storage
  51. associated with those structures.
  52. .TP
  53. .B ares_parse_txt_reply(3)
  54. When used to free the data returned by ares_parse_txt_reply(3) this
  55. will free the whole linked list of ares_txt_reply structures returned
  56. by ares_parse_txt_reply(3), along with any additional storage
  57. associated with those structures.
  58. .TP
  59. .B ares_parse_soa_reply(3)
  60. When used to free the data returned by ares_parse_soa_reply(3) this
  61. will free the ares_soa_reply structure, along with any additional storage
  62. associated with those structure.
  63. .B ares_parse_uri_reply(3)
  64. When used to free the data returned by ares_parse_uri_reply(3) this
  65. will free list of ares_uri_reply structures, along with any additional
  66. storage associated with those structure.
  67. .SH RETURN VALUE
  68. The ares_free_data() function does not return a value.
  69. .SH AVAILABILITY
  70. This function was first introduced in c-ares version 1.7.0.
  71. .SH SEE ALSO
  72. .BR ares_get_servers(3),
  73. .BR ares_parse_srv_reply(3),
  74. .BR ares_parse_mx_reply(3),
  75. .BR ares_parse_txt_reply(3),
  76. .BR ares_parse_soa_reply(3)
  77. .SH AUTHOR
  78. Yang Tse
  79. .PP
  80. Copyright 1998 by the Massachusetts Institute of Technology.
  81. .br
  82. Copyright (C) 2004-2010 by Daniel Stenberg.