]> git.proxmox.com Git - mirror_frr.git/blame - lib/resolver.h
*: Rename `struct thread` to `struct event`
[mirror_frr.git] / lib / resolver.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
fe9e7b71
DL
2/* C-Ares integration to Quagga mainloop
3 * Copyright (c) 2014-2015 Timo Teräs
fe9e7b71
DL
4 */
5
6#ifndef _FRR_RESOLVER_H
7#define _FRR_RESOLVER_H
8
cb37cb33 9#include "event.h"
fe9e7b71
DL
10#include "sockunion.h"
11
17e38209
RW
12#ifdef __cplusplus
13extern "C" {
14#endif
15
fe9e7b71 16struct resolver_query {
3286ca07
DL
17 void (*callback)(struct resolver_query *, const char *errstr, int n,
18 union sockunion *);
125dc952
DL
19
20 /* used to immediate provide the result if IP literal is passed in */
21 union sockunion literal_addr;
e6685141 22 struct event *literal_cb;
fe9e7b71
DL
23};
24
25void resolver_init(struct thread_master *tm);
c742573b
PG
26void resolver_resolve(struct resolver_query *query, int af, vrf_id_t vrf_id,
27 const char *hostname,
28 void (*cb)(struct resolver_query *, const char *, int,
29 union sockunion *));
fe9e7b71 30
17e38209
RW
31#ifdef __cplusplus
32}
33#endif
34
fe9e7b71 35#endif /* _FRR_RESOLVER_H */