mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
b1c14af938
* update loki-mq submodule for tuple support * srv record reply implementation still need to encode srv records into intro sets / router contacts as well as decode from them and match against queried service.proto * inverted condition fix in config code * SRV record struct (de-)serialization for intro sets * parsing and using srv records from config (for/in introsets) * adopt str utils from core and use for srv parsing * changes to repeat requests no longer drop repeat requests on the floor, but do not make an *actual* request for them if one is in progress. do not call reply hook for each reply for a request, as each userland request is actually made into several lokinet requests and this would result in duplicate replies. * fetch SRVs from introsets for .loki * make format * dns and srv fixes, srv appears to be working
34 lines
875 B
C++
34 lines
875 B
C++
#ifndef LLARP_DNS_DNS_HPP
|
|
#define LLARP_DNS_DNS_HPP
|
|
|
|
#include <cstdint>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace dns
|
|
{
|
|
constexpr uint16_t qTypeSRV = 33;
|
|
constexpr uint16_t qTypeAAAA = 28;
|
|
constexpr uint16_t qTypeTXT = 16;
|
|
constexpr uint16_t qTypeMX = 15;
|
|
constexpr uint16_t qTypePTR = 12;
|
|
constexpr uint16_t qTypeCNAME = 5;
|
|
constexpr uint16_t qTypeNS = 2;
|
|
constexpr uint16_t qTypeA = 1;
|
|
|
|
constexpr uint16_t qClassIN = 1;
|
|
|
|
constexpr uint16_t flags_QR = (1 << 15);
|
|
constexpr uint16_t flags_AA = (1 << 10);
|
|
constexpr uint16_t flags_TC = (1 << 9);
|
|
constexpr uint16_t flags_RD = (1 << 8);
|
|
constexpr uint16_t flags_RA = (1 << 7);
|
|
constexpr uint16_t flags_RCODENameError = (3);
|
|
constexpr uint16_t flags_RCODEServFail = (2);
|
|
constexpr uint16_t flags_RCODENoError = (0);
|
|
|
|
} // namespace dns
|
|
} // namespace llarp
|
|
|
|
#endif
|