summaryrefslogtreecommitdiffstats
path: root/lib/resolver.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:16:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:16:35 +0000
commite2bbf175a2184bd76f6c54ccf8456babeb1a46fc (patch)
treef0b76550d6e6f500ada964a3a4ee933a45e5a6f1 /lib/resolver.h
parentInitial commit. (diff)
downloadfrr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.tar.xz
frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.zip
Adding upstream version 9.1.upstream/9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/resolver.h')
-rw-r--r--lib/resolver.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/resolver.h b/lib/resolver.h
new file mode 100644
index 0000000..87e8ecd
--- /dev/null
+++ b/lib/resolver.h
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* C-Ares integration to Quagga mainloop
+ * Copyright (c) 2014-2015 Timo Teräs
+ */
+
+#ifndef _FRR_RESOLVER_H
+#define _FRR_RESOLVER_H
+
+#include "frrevent.h"
+#include "sockunion.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct resolver_query {
+ void (*callback)(struct resolver_query *, const char *errstr, int n,
+ union sockunion *);
+
+ /* used to immediate provide the result if IP literal is passed in */
+ union sockunion literal_addr;
+ struct event *literal_cb;
+};
+
+void resolver_init(struct event_loop *tm);
+void resolver_resolve(struct resolver_query *query, int af, vrf_id_t vrf_id,
+ const char *hostname,
+ void (*cb)(struct resolver_query *, const char *, int,
+ union sockunion *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FRR_RESOLVER_H */