summaryrefslogtreecommitdiffstats
path: root/server/resolv/ares/ares_parse_txt_reply.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-07-15 18:21:15 +0200
committerSimo Sorce <ssorce@redhat.com>2009-07-24 10:21:43 -0400
commitb6bf81803977318aad8b876a56a42e4a3ffbae6a (patch)
treeedc8117a07bce3e6cbe0a7ff5e2dd674afdcc2dc /server/resolv/ares/ares_parse_txt_reply.h
parentb919feeb115751ddda02a326e1d2636f1c83e32f (diff)
downloadsssd-b6bf81803977318aad8b876a56a42e4a3ffbae6a.tar.gz
sssd-b6bf81803977318aad8b876a56a42e4a3ffbae6a.tar.xz
sssd-b6bf81803977318aad8b876a56a42e4a3ffbae6a.zip
Add ares helpers into sssd
This patch adds ares parsing functions that are not yet upstreamed together with a private ares header file (ares_dns.h) that contains some necessary macros for parsing common structures in the replies. Users of these two parsing functions must also include the header files ares_parse_{srv,txt}_reply.h that contain the function and structures declarations that should eventually end up in upstream ares.h
Diffstat (limited to 'server/resolv/ares/ares_parse_txt_reply.h')
-rw-r--r--server/resolv/ares/ares_parse_txt_reply.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/resolv/ares/ares_parse_txt_reply.h b/server/resolv/ares/ares_parse_txt_reply.h
new file mode 100644
index 000000000..b1e326985
--- /dev/null
+++ b/server/resolv/ares/ares_parse_txt_reply.h
@@ -0,0 +1,12 @@
+#ifndef __ARES_PARSE_TXT_REPLY_H__
+#define __ARES_PARSE_TXT_REPLY_H__
+
+struct txt_reply {
+ int length; /* length of the text */
+ unsigned char *txt; /* may contain nulls */
+};
+
+int _ares_parse_txt_reply(const unsigned char* abuf, int alen,
+ struct txt_reply **txt_out, int *ntxtreply);
+
+#endif /* __ARES_PARSE_TXT_REPLY_H__ */