summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-09-04 21:56:14 (GMT)
committerDaniel Stenberg <daniel@haxx.se>2009-09-04 21:56:14 (GMT)
commita5b204dd5b30eb9a9c3e7c88132e8e26b7400f10 (patch)
treedb6955f62d494bb0041b3a594fa95ce81a4bf001 /ares.h
parentcef560e871533a197acfdc5106481105ef244194 (diff)
downloadc-ares-a5b204dd5b30eb9a9c3e7c88132e8e26b7400f10.zip
c-ares-a5b204dd5b30eb9a9c3e7c88132e8e26b7400f10.tar.gz
c-ares-a5b204dd5b30eb9a9c3e7c88132e8e26b7400f10.tar.bz2
- Jakub Hrozek added ares_parse_srv_reply() for SRV parsing
Diffstat (limited to 'ares.h')
-rw-r--r--ares.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ares.h b/ares.h
index f64e862..bfca7da 100644
--- a/ares.h
+++ b/ares.h
@@ -1,6 +1,6 @@
/* $Id$ */
-/* Copyright 1998 by the Massachusetts Institute of Technology.
+/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
* Copyright (C) 2007-2009 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
@@ -322,6 +322,13 @@ struct addr6ttl {
int ttl;
};
+struct srv_reply {
+ u_int16_t weight;
+ u_int16_t priority;
+ u_int16_t port;
+ char *host;
+};
+
/*
** 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.
@@ -339,6 +346,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
int addrlen, int family, struct hostent **host);
int ares_parse_ns_reply(const unsigned char *abuf, int alen,
struct hostent **host);
+int ares_parse_srv_reply(const unsigned char* abuf, int alen,
+ struct srv_reply** srv_out, int *nsrvreply);
void ares_free_string(void *str);
void ares_free_hostent(struct hostent *host);
const char *ares_strerror(int code);