---
title: llarp::dns::RData

---

# llarp::dns::RData





## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**() =default |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**(const [RData](Classes/classllarp_1_1dns_1_1RData.md) & ) =default |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**([RData](Classes/classllarp_1_1dns_1_1RData.md) && ) =default |
| [RData](Classes/classllarp_1_1dns_1_1RData.md) & | **[operator=](Classes/classllarp_1_1dns_1_1RData.md#function-operator=)**(const [RData](Classes/classllarp_1_1dns_1_1RData.md) & ) =default |
| [RData](Classes/classllarp_1_1dns_1_1RData.md) & | **[operator=](Classes/classllarp_1_1dns_1_1RData.md#function-operator=)**([RData](Classes/classllarp_1_1dns_1_1RData.md) && ) =default |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**([byte_view_t](Namespaces/namespacellarp.md#typedef-byte-view-t) & view)<br>construct from view, modifies view to contain remaining unread data.  |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**(std::vector< std::string_view > dns_labels)<br>construct rdata holding dns labels.  |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**(net::ipv4addr_t ip)<br>construct holding ipv4 address  |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**(net::ipv6addr_t ip)<br>construct holding ipv6 address  |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**(uint16_t priority, std::vector< std::string_view > dns_labels)<br>mx record constructor.  |
| | **[RData](Classes/classllarp_1_1dns_1_1RData.md#function-rdata)**([bstring_t](Namespaces/namespacellarp.md#using-bstring-t) && raw)<br>construct from raw buffer.  |
| constexpr const auto & | **[data](Classes/classllarp_1_1dns_1_1RData.md#function-data)**() const |
| std::vector< std::string_view > | **[view_dns_labels](Classes/classllarp_1_1dns_1_1RData.md#function-view-dns-labels)**() const |
| std::string | **[as_dns_name](Classes/classllarp_1_1dns_1_1RData.md#function-as-dns-name)**() const |
| util::StatusObject | **[to_json](Classes/classllarp_1_1dns_1_1RData.md#function-to-json)**() const |
| std::string | **[ToString](Classes/classllarp_1_1dns_1_1RData.md#function-tostring)**() const |

## Public Functions Documentation

### function RData

```cpp
RData() =default
```


### function RData

```cpp
RData(
    const RData & 
) =default
```


### function RData

```cpp
RData(
    RData && 
) =default
```


### function operator=

```cpp
RData & operator=(
    const RData & 
) =default
```


### function operator=

```cpp
RData & operator=(
    RData && 
) =default
```


### function RData

```cpp
explicit RData(
    byte_view_t & view
)
```

construct from view, modifies view to contain remaining unread data. 

### function RData

```cpp
explicit RData(
    std::vector< std::string_view > dns_labels
)
```

construct rdata holding dns labels. 

### function RData

```cpp
explicit RData(
    net::ipv4addr_t ip
)
```

construct holding ipv4 address 

### function RData

```cpp
explicit RData(
    net::ipv6addr_t ip
)
```

construct holding ipv6 address 

### function RData

```cpp
explicit RData(
    uint16_t priority,
    std::vector< std::string_view > dns_labels
)
```

mx record constructor. 

### function RData

```cpp
explicit RData(
    bstring_t && raw
)
```

construct from raw buffer. 

### function data

```cpp
inline constexpr const auto & data() const
```


### function view_dns_labels

```cpp
std::vector< std::string_view > view_dns_labels() const
```


### function as_dns_name

```cpp
inline std::string as_dns_name() const
```


### function to_json

```cpp
util::StatusObject to_json() const
```


### function ToString

```cpp
std::string ToString() const
```


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

Updated on 2023-04-27 at 04:17:17 +0000