From b6bf81803977318aad8b876a56a42e4a3ffbae6a Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 15 Jul 2009 18:21:15 +0200 Subject: 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 --- server/resolv/ares/ares_parse_txt_reply.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 server/resolv/ares/ares_parse_txt_reply.h (limited to 'server/resolv/ares/ares_parse_txt_reply.h') 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 00000000..b1e32698 --- /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__ */ -- cgit