frr/lib/resolver.h
Donald Sharp cb37cb336a *: Rename thread.[ch] to event.[ch]
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.

In this commit rename the thread.[ch] files to event.[ch].

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:16 -04:00

36 lines
816 B
C

// 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 "event.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 thread *literal_cb;
};
void resolver_init(struct thread_master *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 */