diff options
author | Yang Tse <yangsita@gmail.com> | 2009-11-20 08:50:03 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-11-20 08:50:03 +0000 |
commit | 5a0a473c30925d63e1695a7b8b1cee8f73ad6e68 (patch) | |
tree | ead0cabfa58c70b8241855cf743f38d37819eebc /ares/ares.h | |
parent | 5129442ee7074e24f097a389ddb789c9996bb42a (diff) |
Initial support for the generic ares_free_data() function that will allow
applications to free memory allocated and returned by some c-ares funtions.
Diffstat (limited to 'ares/ares.h')
-rw-r--r-- | ares/ares.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ares/ares.h b/ares/ares.h index 63eb6810e..d2b6cecc5 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -430,15 +430,17 @@ struct addr6ttl { }; struct ares_srv_reply { - unsigned short weight; - unsigned short priority; - unsigned short port; - char *host; + struct ares_srv_reply *next; + char *host; + unsigned short priority; + unsigned short weight; + unsigned short port; }; struct ares_txt_reply { - size_t length; /* length excludes null termination */ - unsigned char *txt; + struct ares_txt_reply *next; + unsigned char *txt; + size_t length; /* length excludes null termination */ }; /* @@ -486,6 +488,8 @@ CARES_EXTERN void ares_free_string(void *str); CARES_EXTERN void ares_free_hostent(struct hostent *host); +CARES_EXTERN void ares_free_data(void *dataptr); + CARES_EXTERN const char *ares_strerror(int code); #ifdef __cplusplus |