diff options
Diffstat (limited to 'Userland/Services/LookupServer/ClientConnection.cpp')
-rw-r--r-- | Userland/Services/LookupServer/ClientConnection.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Services/LookupServer/ClientConnection.cpp b/Userland/Services/LookupServer/ClientConnection.cpp index 51adca6e07..98f5e3fb18 100644 --- a/Userland/Services/LookupServer/ClientConnection.cpp +++ b/Userland/Services/LookupServer/ClientConnection.cpp @@ -28,9 +28,9 @@ void ClientConnection::die() s_connections.remove(client_id()); } -Messages::LookupServer::LookupNameResponse ClientConnection::handle(const Messages::LookupServer::LookupName& message) +Messages::LookupServer::LookupNameResponse ClientConnection::lookup_name(String const& name) { - auto answers = LookupServer::the().lookup(message.name(), T_A); + auto answers = LookupServer::the().lookup(name, T_A); if (answers.is_empty()) return { 1, Vector<String>() }; Vector<String> addresses; @@ -40,16 +40,16 @@ Messages::LookupServer::LookupNameResponse ClientConnection::handle(const Messag return { 0, move(addresses) }; } -Messages::LookupServer::LookupAddressResponse ClientConnection::handle(const Messages::LookupServer::LookupAddress& message) +Messages::LookupServer::LookupAddressResponse ClientConnection::lookup_address(String const& address) { - if (message.address().length() != 4) + if (address.length() != 4) return { 1, String() }; - IPv4Address address { (const u8*)message.address().characters() }; + IPv4Address ip_address { (const u8*)address.characters() }; auto name = String::formatted("{}.{}.{}.{}.in-addr.arpa", - address[3], - address[2], - address[1], - address[0]); + ip_address[3], + ip_address[2], + ip_address[1], + ip_address[0]); auto answers = LookupServer::the().lookup(name, T_PTR); if (answers.is_empty()) return { 1, String() }; |