llarp/dns/serialize.hpp

Namespaces

Name
llarp
[crypto.hpp]
llarp::dns

Classes

Name
struct llarp::dns::Serialize
base type for serializable dns entities

Source code

#pragma once

#include <llarp/util/buffer.hpp>
#include <vector>

namespace llarp::dns
{
  struct Serialize
  {
    virtual ~Serialize() = 0;

    virtual bool
    Encode(llarp_buffer_t* buf) const = 0;

    virtual bool
    Decode(llarp_buffer_t* buf) = 0;
  };

  bool
  EncodeRData(llarp_buffer_t* buf, const std::vector<byte_t>& rdata);

  bool
  DecodeRData(llarp_buffer_t* buf, std::vector<byte_t>& rdata);

}  // namespace llarp::dns

Updated on 2026-01-10 at 22:49:45 +0000