---
title: llarp::dns::UnboundResolver

---

# llarp::dns::UnboundResolver





Inherits from std::enable_shared_from_this< UnboundResolver >

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[UnboundResolver](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-unboundresolver)**(EventLoop_ptr loop, ReplyFunction replyFunc, FailFunction failFunc) |
| void | **[Stop](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-stop)**() |
| bool | **[Init](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-init)**() |
| bool | **[AddUpstreamResolver](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-addupstreamresolver)**(const [SockAddr](Classes/structllarp_1_1SockAddr.md) & upstreamResolverIP) |
| void | **[AddHostsFile](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-addhostsfile)**(const fs::path & file) |
| void | **[Lookup](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-lookup)**([SockAddr](Classes/structllarp_1_1SockAddr.md) to, [SockAddr](Classes/structllarp_1_1SockAddr.md) from, [Message](Classes/structllarp_1_1dns_1_1Message.md) msg) |
| void | **[Callback](Classes/classllarp_1_1dns_1_1UnboundResolver.md#function-callback)**(void * data, int err, ub_result * result) |

## Public Functions Documentation

### function UnboundResolver

```cpp
UnboundResolver(
    EventLoop_ptr loop,
    ReplyFunction replyFunc,
    FailFunction failFunc
)
```


### function Stop

```cpp
void Stop()
```


### function Init

```cpp
bool Init()
```


### function AddUpstreamResolver

```cpp
bool AddUpstreamResolver(
    const SockAddr & upstreamResolverIP
)
```


### function AddHostsFile

```cpp
void AddHostsFile(
    const fs::path & file
)
```


### function Lookup

```cpp
void Lookup(
    SockAddr to,
    SockAddr from,
    Message msg
)
```


### function Callback

```cpp
static void Callback(
    void * data,
    int err,
    ub_result * result
)
```


-------------------------------

Updated on 2022-09-01 at 18:16:53 +0000