summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorMarko Kreen <markokr@gmail.com>2012-06-15 11:29:03 (GMT)
committerDaniel Stenberg <daniel@haxx.se>2012-06-15 11:32:48 (GMT)
commit979bf951d3436bf7e86e690de26a174b39a081f8 (patch)
tree1c621aed06a24acef46f3d9eb7151bfd34384254 /ares.h
parent38b69b7269d4abbc75f34b8ab38d7bdab4ad91ab (diff)
downloadc-ares-979bf951d3436bf7e86e690de26a174b39a081f8.zip
c-ares-979bf951d3436bf7e86e690de26a174b39a081f8.tar.gz
c-ares-979bf951d3436bf7e86e690de26a174b39a081f8.tar.bz2
SOA parser added
I need to do SOA queries, so here is a parser for them. - ares_soa_reply: new struct - ares_malloc_data/ares_free_soa: ARES_DATATYPE_SOA_REPLY - ares_parse_soa_reply: actual function
Diffstat (limited to 'ares.h')
-rw-r--r--ares.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ares.h b/ares.h
index a4a119e..c5e4069 100644
--- a/ares.h
+++ b/ares.h
@@ -476,6 +476,16 @@ struct ares_naptr_reply {
unsigned short preference;
};
+struct ares_soa_reply {
+ char *nsname;
+ char *hostmaster;
+ unsigned int serial;
+ unsigned int refresh;
+ unsigned int retry;
+ unsigned int expire;
+ unsigned int minttl;
+};
+
/*
** Parse the buffer, starting at *abuf and of length alen bytes, previously
** obtained from an ares_search call. Put the results in *host, if nonnull.
@@ -523,10 +533,16 @@ CARES_EXTERN int ares_parse_naptr_reply(const unsigned char* abuf,
int alen,
struct ares_naptr_reply** naptr_out);
+CARES_EXTERN int ares_parse_soa_reply(const unsigned char* abuf,
+ int alen,
+ struct ares_soa_reply** soa_out);
+
CARES_EXTERN void ares_free_string(void *str);
CARES_EXTERN void ares_free_hostent(struct hostent *host);
+CARES_EXTERN void ares_free_soa(struct ares_soa_reply *soa);
+
CARES_EXTERN void ares_free_data(void *dataptr);
CARES_EXTERN const char *ares_strerror(int code);