]>
Commit | Line | Data |
---|---|---|
fe9e7b71 DL |
1 | /* C-Ares integration to Quagga mainloop |
2 | * Copyright (c) 2014-2015 Timo Teräs | |
3 | * | |
4 | * This file is free software: you may copy, redistribute and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation, either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | */ | |
9 | ||
10 | #ifndef _FRR_RESOLVER_H | |
11 | #define _FRR_RESOLVER_H | |
12 | ||
13 | #include "thread.h" | |
14 | #include "sockunion.h" | |
15 | ||
17e38209 RW |
16 | #ifdef __cplusplus |
17 | extern "C" { | |
18 | #endif | |
19 | ||
fe9e7b71 | 20 | struct resolver_query { |
3286ca07 DL |
21 | void (*callback)(struct resolver_query *, const char *errstr, int n, |
22 | union sockunion *); | |
125dc952 DL |
23 | |
24 | /* used to immediate provide the result if IP literal is passed in */ | |
25 | union sockunion literal_addr; | |
26 | struct thread *literal_cb; | |
fe9e7b71 DL |
27 | }; |
28 | ||
29 | void resolver_init(struct thread_master *tm); | |
c742573b PG |
30 | void resolver_resolve(struct resolver_query *query, int af, vrf_id_t vrf_id, |
31 | const char *hostname, | |
32 | void (*cb)(struct resolver_query *, const char *, int, | |
33 | union sockunion *)); | |
fe9e7b71 | 34 | |
17e38209 RW |
35 | #ifdef __cplusplus |
36 | } | |
37 | #endif | |
38 | ||
fe9e7b71 | 39 | #endif /* _FRR_RESOLVER_H */ |