mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
502 B
C++
29 lines
502 B
C++
6 years ago
|
#ifndef LLARP_DNS_NAME_HPP
|
||
|
#define LLARP_DNS_NAME_HPP
|
||
|
|
||
|
#include <string>
|
||
|
#include <llarp/buffer.h>
|
||
|
#include <llarp/net_int.hpp>
|
||
|
|
||
|
namespace llarp
|
||
|
{
|
||
|
namespace dns
|
||
|
{
|
||
|
using Name_t = std::string;
|
||
|
|
||
|
/// decode name from buffer
|
||
|
bool
|
||
|
DecodeName(llarp_buffer_t* buf, Name_t& name);
|
||
|
|
||
|
/// encode name to buffer
|
||
|
bool
|
||
|
EncodeName(llarp_buffer_t* buf, const Name_t& name);
|
||
|
|
||
|
bool
|
||
|
DecodePTR(const Name_t& name, huint32_t& ip);
|
||
|
|
||
|
} // namespace dns
|
||
|
} // namespace llarp
|
||
|
|
||
|
#endif
|