summaryrefslogtreecommitdiff
path: root/lib/resolver.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-07-03 16:49:19 -0400
committerGitHub <noreply@github.com>2019-07-03 16:49:19 -0400
commitc682502cd723f0f6f8a0f64607bc35f736b4e635 (patch)
treec4e8948a1ce5359648a3e8119854691ccb9e3896 /lib/resolver.h
parentb08c7022d89f26ee2eaf5c761795c3e10da1e597 (diff)
parent50cdb6cf95c5fc7df40e4a7328eb1fc7fcff4a9c (diff)
Merge pull request #4639 from opensourcerouting/c-ares-lib
make c-ares DNS resolver available as lib
Diffstat (limited to 'lib/resolver.h')
-rw-r--r--lib/resolver.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/resolver.h b/lib/resolver.h
new file mode 100644
index 0000000000..bc6326edaa
--- /dev/null
+++ b/lib/resolver.h
@@ -0,0 +1,25 @@
+/* C-Ares integration to Quagga mainloop
+ * Copyright (c) 2014-2015 Timo Teräs
+ *
+ * This file is free software: you may copy, redistribute and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef _FRR_RESOLVER_H
+#define _FRR_RESOLVER_H
+
+#include "thread.h"
+#include "sockunion.h"
+
+struct resolver_query {
+ void (*callback)(struct resolver_query *, int n, union sockunion *);
+};
+
+void resolver_init(struct thread_master *tm);
+void resolver_resolve(struct resolver_query *query, int af,
+ const char *hostname, void (*cb)(struct resolver_query *,
+ int, union sockunion *));
+
+#endif /* _FRR_RESOLVER_H */