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/async_resolv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/resolv/async_resolv.c') diff --git a/server/resolv/async_resolv.c b/server/resolv/async_resolv.c index 70bea6c8..b77819c0 100644 --- a/server/resolv/async_resolv.c +++ b/server/resolv/async_resolv.c @@ -42,6 +42,16 @@ #include "util/dlinklist.h" #include "util/util.h" +#ifndef HAVE_ARES_PARSE_SRV +#define ares_parse_srv_reply(abuf, alen, srv_out, nsrvreply) \ + _ares_parse_srv_reply(abuf, alen, srv_out, nsrvreply) +#endif /* HAVE_ARES_PARSE_SRV */ + +#ifndef HAVE_ARES_PARSE_TXT +#define ares_parse_txt_reply(abuf, alen, txt_out, ntxtreply) \ + _ares_parse_txt_reply(abuf, alen, txt_out, ntxtreply) +#endif /* HAVE_ARES_PARSE_TXT */ + /* TODO: remove later * These functions are available in the latest tevent/talloc and are the ones * that should be used as tevent_req is rightfully opaque there */ -- cgit