summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-20 08:50:03 +0000
committerYang Tse <yangsita@gmail.com>2009-11-20 08:50:03 +0000
commit2a916ce6e550ba82a413fca9d2e296140c4ac73c (patch)
tree3bed0497a0769fe38c6a50c3c0f8261acc0de012 /ares.h
parent10461d141401e9ffcdce63efaf03541c66edc210 (diff)
downloadc-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.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/ares.h b/ares.h
index 63eb681..d2b6cec 100644
--- a/ares.h
+++ b/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