---
title: llarp::dns::SRVData

---

# llarp::dns::SRVData





## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[SRVData](Classes/classllarp_1_1dns_1_1SRVData.md#function-srvdata)**(SRVTuple tup) |
| | **[SRVData](Classes/classllarp_1_1dns_1_1SRVData.md#function-srvdata)**(std::string_view str) |
| | **[SRVData](Classes/classllarp_1_1dns_1_1SRVData.md#function-srvdata)**() =default |
| | **[SRVData](Classes/classllarp_1_1dns_1_1SRVData.md#function-srvdata)**(const [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) & ) =default |
| | **[SRVData](Classes/classllarp_1_1dns_1_1SRVData.md#function-srvdata)**([SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) && ) =default |
| [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) & | **[operator=](Classes/classllarp_1_1dns_1_1SRVData.md#function-operator=)**([SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) && other) |
| [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) & | **[operator=](Classes/classllarp_1_1dns_1_1SRVData.md#function-operator=)**(const [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) & other) |
| bool | **[valid](Classes/classllarp_1_1dns_1_1SRVData.md#function-valid)**() const |
| bool | **[empty_target](Classes/classllarp_1_1dns_1_1SRVData.md#function-empty-target)**() const<br>return if the target refers to the query's qname.  |
| bool | **[target_full_stop](Classes/classllarp_1_1dns_1_1SRVData.md#function-target-full-stop)**() const<br>returns true if the target is authoritative "no such service"  |
| constexpr bool | **[operator<](Classes/classllarp_1_1dns_1_1SRVData.md#function-operator<)**(const [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) & other) const<br>so we can put [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) in a std::set  |
| constexpr bool | **[operator==](Classes/classllarp_1_1dns_1_1SRVData.md#function-operator==)**(const [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) & other) const |
| bool | **[BEncode](Classes/classllarp_1_1dns_1_1SRVData.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * ) const |
| [bstring_t](Namespaces/namespacellarp.md#using-bstring-t) | **[bt_serizalize](Classes/classllarp_1_1dns_1_1SRVData.md#function-bt-serizalize)**() const |
| void | **[bt_deserialize](Classes/classllarp_1_1dns_1_1SRVData.md#function-bt-deserialize)**([byte_view_t](Namespaces/namespacellarp.md#typedef-byte-view-t) & raw) |
| bool | **[BDecode](Classes/classllarp_1_1dns_1_1SRVData.md#function-bdecode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * ) |
| util::StatusObject | **[ExtractStatus](Classes/classllarp_1_1dns_1_1SRVData.md#function-extractstatus)**() const |
| std::vector< std::string_view > | **[target_dns_labels](Classes/classllarp_1_1dns_1_1SRVData.md#function-target-dns-labels)**(std::string_view rootname) const |
| [bstring_t](Namespaces/namespacellarp.md#using-bstring-t) | **[encode_dns](Classes/classllarp_1_1dns_1_1SRVData.md#function-encode-dns)**(std::string rootname) const |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| std::string & | **[service_proto](Classes/classllarp_1_1dns_1_1SRVData.md#variable-service-proto)**  |
| uint16_t & | **[priority](Classes/classllarp_1_1dns_1_1SRVData.md#variable-priority)**  |
| uint16_t & | **[weight](Classes/classllarp_1_1dns_1_1SRVData.md#variable-weight)**  |
| uint16_t & | **[port](Classes/classllarp_1_1dns_1_1SRVData.md#variable-port)**  |
| std::string & | **[target](Classes/classllarp_1_1dns_1_1SRVData.md#variable-target)**  |
| const SRVTuple & | **[tuple](Classes/classllarp_1_1dns_1_1SRVData.md#variable-tuple)**  |

## Public Functions Documentation

### function SRVData

```cpp
explicit SRVData(
    SRVTuple tup
)
```


### function SRVData

```cpp
explicit SRVData(
    std::string_view str
)
```


### function SRVData

```cpp
SRVData() =default
```


### function SRVData

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


### function SRVData

```cpp
SRVData(
    SRVData && 
) =default
```


### function operator=

```cpp
SRVData & operator=(
    SRVData && other
)
```


### function operator=

```cpp
SRVData & operator=(
    const SRVData & other
)
```


### function valid

```cpp
bool valid() const
```


### function empty_target

```cpp
bool empty_target() const
```

return if the target refers to the query's qname. 

### function target_full_stop

```cpp
bool target_full_stop() const
```

returns true if the target is authoritative "no such service" 

### function operator<

```cpp
inline constexpr bool operator<(
    const SRVData & other
) const
```

so we can put [SRVData](Classes/classllarp_1_1dns_1_1SRVData.md) in a std::set 

### function operator==

```cpp
inline constexpr bool operator==(
    const SRVData & other
) const
```


### function BEncode

```cpp
bool BEncode(
    llarp_buffer_t * 
) const
```


### function bt_serizalize

```cpp
bstring_t bt_serizalize() const
```


### function bt_deserialize

```cpp
void bt_deserialize(
    byte_view_t & raw
)
```


### function BDecode

```cpp
bool BDecode(
    llarp_buffer_t * 
)
```


### function ExtractStatus

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


### function target_dns_labels

```cpp
std::vector< std::string_view > target_dns_labels(
    std::string_view rootname
) const
```


### function encode_dns

```cpp
bstring_t encode_dns(
    std::string rootname
) const
```


## Public Attributes Documentation

### variable service_proto

```cpp
std::string & service_proto {
        std::get<0>(_tuple)};
```


### variable priority

```cpp
uint16_t & priority {std::get<1>(_tuple)};
```


### variable weight

```cpp
uint16_t & weight {std::get<2>(_tuple)};
```


### variable port

```cpp
uint16_t & port {std::get<3>(_tuple)};
```


### variable target

```cpp
std::string & target {std::get<4>(_tuple)};
```


### variable tuple

```cpp
const SRVTuple & tuple {_tuple};
```


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

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