File: resolver.h

package info (click to toggle)
frr 10.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 76,324 kB
  • sloc: ansic: 686,900; python: 225,905; perl: 6,379; sh: 2,627; cpp: 1,883; makefile: 670; yacc: 397; lex: 363; lisp: 66; xml: 35; javascript: 8
file content (36 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// 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_terminate(void);
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 */