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

---

# llarp::dns::SRVData





## Public Functions

|                | Name           |
| -------------- | -------------- |
| bool | **[IsValid](Classes/structllarp_1_1dns_1_1SRVData.md#function-isvalid)**() const |
| SRVTuple | **[toTuple](Classes/structllarp_1_1dns_1_1SRVData.md#function-totuple)**() const |
| auto | **[toTupleRef](Classes/structllarp_1_1dns_1_1SRVData.md#function-totupleref)**() const |
| bool | **[operator<](Classes/structllarp_1_1dns_1_1SRVData.md#function-operator<)**(const [SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) & other) const<br>so we can put [SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) in a std::set  |
| bool | **[operator==](Classes/structllarp_1_1dns_1_1SRVData.md#function-operator==)**(const [SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) & other) const |
| bool | **[BEncode](Classes/structllarp_1_1dns_1_1SRVData.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * ) const |
| bool | **[BDecode](Classes/structllarp_1_1dns_1_1SRVData.md#function-bdecode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * ) |
| util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1dns_1_1SRVData.md#function-extractstatus)**() const |
| bool | **[fromString](Classes/structllarp_1_1dns_1_1SRVData.md#function-fromstring)**(std::string_view srvString) |
| [SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) | **[fromTuple](Classes/structllarp_1_1dns_1_1SRVData.md#function-fromtuple)**(SRVTuple tuple) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr size_t | **[TARGET_MAX_SIZE](Classes/structllarp_1_1dns_1_1SRVData.md#variable-target-max-size)**  |
| std::string | **[service_proto](Classes/structllarp_1_1dns_1_1SRVData.md#variable-service-proto)**  |
| uint16_t | **[priority](Classes/structllarp_1_1dns_1_1SRVData.md#variable-priority)**  |
| uint16_t | **[weight](Classes/structllarp_1_1dns_1_1SRVData.md#variable-weight)**  |
| uint16_t | **[port](Classes/structllarp_1_1dns_1_1SRVData.md#variable-port)**  |
| std::string | **[target](Classes/structllarp_1_1dns_1_1SRVData.md#variable-target)**  |

## Public Functions Documentation

### function IsValid

```cpp
bool IsValid() const
```


### function toTuple

```cpp
SRVTuple toTuple() const
```


### function toTupleRef

```cpp
inline auto toTupleRef() const
```


### function operator<

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

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

### function operator==

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


### function BEncode

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


### function BDecode

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


### function ExtractStatus

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


### function fromString

```cpp
bool fromString(
    std::string_view srvString
)
```


### function fromTuple

```cpp
static SRVData fromTuple(
    SRVTuple tuple
)
```


## Public Attributes Documentation

### variable TARGET_MAX_SIZE

```cpp
static constexpr size_t TARGET_MAX_SIZE = 200;
```


### variable service_proto

```cpp
std::string service_proto;
```


### variable priority

```cpp
uint16_t priority;
```


### variable weight

```cpp
uint16_t weight;
```


### variable port

```cpp
uint16_t port;
```


### variable target

```cpp
std::string target;
```


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

Updated on 2022-10-17 at 13:14:49 +0000