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 | 2a916ce6e550ba82a413fca9d2e296140c4ac73c (patch) | |
tree | 3bed0497a0769fe38c6a50c3c0f8261acc0de012 /ares.h | |
parent | 10461d141401e9ffcdce63efaf03541c66edc210 (diff) | |
download | c-ares-2a916ce6e550ba82a413fca9d2e296140c4ac73c.tar.gz c-ares-2a916ce6e550ba82a413fca9d2e296140c4ac73c.tar.bz2 c-ares-2a916ce6e550ba82a413fca9d2e296140c4ac73c.zip |
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.h')
-rw-r--r-- | ares.h | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 |