1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

LookupServer: Move parse_dns_name() -> DNSName::parse()

While at it, refactor it slightly.
This commit is contained in:
Sergey Bugaev 2021-02-14 15:10:39 +03:00 committed by Andreas Kling
parent ae1e82fd2f
commit 42bc5f2cc1
3 changed files with 41 additions and 35 deletions

View file

@ -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: