From 42bc5f2cc19c5c528aed8902bb8a48e902da025f Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 14 Feb 2021 15:10:39 +0300 Subject: LookupServer: Move parse_dns_name() -> DNSName::parse() While at it, refactor it slightly. --- Userland/Services/LookupServer/DNSName.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Userland/Services/LookupServer/DNSName.h') diff --git a/Userland/Services/LookupServer/DNSName.h b/Userland/Services/LookupServer/DNSName.h index 20f1c91fba..21d1b88e47 100644 --- a/Userland/Services/LookupServer/DNSName.h +++ b/Userland/Services/LookupServer/DNSName.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2018-2020, Andreas Kling * Copyright (c) 2021, Sergey Bugaev * All rights reserved. * @@ -33,6 +34,9 @@ namespace LookupServer { class DNSName { public: DNSName(const String&); + + static DNSName parse(const u8* data, size_t& offset, size_t max_offset, size_t recursion_level = 0); + const String& as_string() const { return m_name; } private: -- cgit v1.2.3