summaryrefslogtreecommitdiff
path: root/Userland/Services/LookupServer/DNSName.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2021-02-14 15:10:39 +0300
committerAndreas Kling <kling@serenityos.org>2021-02-15 09:14:42 +0100
commit42bc5f2cc19c5c528aed8902bb8a48e902da025f (patch)
tree4ab3109bd2957b82efde621ea8483fd7159111ef /Userland/Services/LookupServer/DNSName.h
parentae1e82fd2f307ed49586c1bfc35f9f2fb30c8942 (diff)
downloadserenity-42bc5f2cc19c5c528aed8902bb8a48e902da025f.zip
LookupServer: Move parse_dns_name() -> DNSName::parse()
While at it, refactor it slightly.
Diffstat (limited to 'Userland/Services/LookupServer/DNSName.h')
-rw-r--r--Userland/Services/LookupServer/DNSName.h4
1 files changed, 4 insertions, 0 deletions
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 <kling@serenityos.org>
* Copyright (c) 2021, Sergey Bugaev <bugaevc@serenityos.org>
* 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: