diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-20 04:26:30 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-20 04:26:30 +0100 |
commit | 9120b05a4044b346be397b0ae5b9b7e9a8cbd0b1 (patch) | |
tree | 529e549f4fb7a48c3526dda0ee36654af4dc5bde /Servers | |
parent | 67009cee8e6db04a3ba3b07a7bbde8c9e8e21b8a (diff) | |
download | serenity-9120b05a4044b346be397b0ae5b9b7e9a8cbd0b1.zip |
Rename DNSLookupServer => LookupServer.
Diffstat (limited to 'Servers')
-rw-r--r-- | Servers/DNSLookupServer/.gitignore | 3 | ||||
-rw-r--r-- | Servers/LookupServer/.gitignore | 3 | ||||
-rw-r--r-- | Servers/LookupServer/DNSPacket.h (renamed from Servers/DNSLookupServer/DNSPacket.h) | 0 | ||||
-rw-r--r-- | Servers/LookupServer/DNSRecord.h (renamed from Servers/DNSLookupServer/DNSRecord.h) | 0 | ||||
-rw-r--r-- | Servers/LookupServer/Makefile (renamed from Servers/DNSLookupServer/Makefile) | 6 | ||||
-rw-r--r-- | Servers/LookupServer/main.cpp (renamed from Servers/DNSLookupServer/main.cpp) | 18 |
6 files changed, 15 insertions, 15 deletions
diff --git a/Servers/DNSLookupServer/.gitignore b/Servers/DNSLookupServer/.gitignore deleted file mode 100644 index 29821a015d..0000000000 --- a/Servers/DNSLookupServer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.o -*.d -DNSLookupServer diff --git a/Servers/LookupServer/.gitignore b/Servers/LookupServer/.gitignore new file mode 100644 index 0000000000..2bdfd6d40d --- /dev/null +++ b/Servers/LookupServer/.gitignore @@ -0,0 +1,3 @@ +*.o +*.d +LookupServer diff --git a/Servers/DNSLookupServer/DNSPacket.h b/Servers/LookupServer/DNSPacket.h index 3049292460..3049292460 100644 --- a/Servers/DNSLookupServer/DNSPacket.h +++ b/Servers/LookupServer/DNSPacket.h diff --git a/Servers/DNSLookupServer/DNSRecord.h b/Servers/LookupServer/DNSRecord.h index f584fc0dd9..f584fc0dd9 100644 --- a/Servers/DNSLookupServer/DNSRecord.h +++ b/Servers/LookupServer/DNSRecord.h diff --git a/Servers/DNSLookupServer/Makefile b/Servers/LookupServer/Makefile index 3dd231ad91..b82f3afe70 100644 --- a/Servers/DNSLookupServer/Makefile +++ b/Servers/LookupServer/Makefile @@ -1,8 +1,8 @@ -DNSLOOKUPSERVER_OBJS = \ +LOOKUPSERVER_OBJS = \ main.o -APP = DNSLookupServer -OBJS = $(DNSLOOKUPSERVER_OBJS) +APP = LookupServer +OBJS = $(LOOKUPSERVER_OBJS) STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough diff --git a/Servers/DNSLookupServer/main.cpp b/Servers/LookupServer/main.cpp index 9f280c0f50..fad690f89b 100644 --- a/Servers/DNSLookupServer/main.cpp +++ b/Servers/LookupServer/main.cpp @@ -31,7 +31,7 @@ int main(int argc, char**argv) (void)argc; (void)argv; - unlink("/tmp/.DNSLookupServer-socket"); + unlink("/tmp/.LookupServer-socket"); HashMap<String, IPv4Address> dns_cache; @@ -43,7 +43,7 @@ int main(int argc, char**argv) sockaddr_un address; address.sun_family = AF_LOCAL; - strcpy(address.sun_path, "/tmp/.DNSLookupServer-socket"); + strcpy(address.sun_path, "/tmp/.LookupServer-socket"); int rc = bind(server_fd, (const sockaddr*)&address, sizeof(address)); if (rc < 0) { @@ -93,7 +93,7 @@ int main(int argc, char**argv) client_buffer[nrecv] = '\0'; auto hostname = String(client_buffer, nrecv, Chomp); - dbgprintf("DNSLookupServer: Got request for '%s'\n", hostname.characters()); + dbgprintf("LookupServer: Got request for '%s'\n", hostname.characters()); Vector<IPv4Address> addresses; @@ -107,7 +107,7 @@ int main(int argc, char**argv) break; } while (--retries); if (did_timeout) { - fprintf(stderr, "DNSLookupServer: Out of retries :(\n"); + fprintf(stderr, "LookupServer: Out of retries :(\n"); close(client_fd); continue; } @@ -213,7 +213,7 @@ Vector<IPv4Address> lookup(const String& hostname, bool& did_timeout) response_buffer[nrecv] = '\0'; if (nrecv < (int)sizeof(DNSPacket)) { - dbgprintf("DNSLookupServer: Response not big enough (%d) to be a DNS packet :(\n", nrecv); + dbgprintf("LookupServer: Response not big enough (%d) to be a DNS packet :(\n", nrecv); return { }; } @@ -225,15 +225,15 @@ Vector<IPv4Address> lookup(const String& hostname, bool& did_timeout) //printf("Additional count: %u\n", response_header.additional_count()); if (response_header.id() != request_header.id()) { - dbgprintf("DNSLookupServer: ID mismatch (%u vs %u) :(\n", response_header.id(), request_header.id()); + dbgprintf("LookupServer: ID mismatch (%u vs %u) :(\n", response_header.id(), request_header.id()); return { }; } if (response_header.question_count() != 1) { - dbgprintf("DNSLookupServer: Question count (%u vs %u) :(\n", response_header.question_count(), request_header.question_count()); + dbgprintf("LookupServer: Question count (%u vs %u) :(\n", response_header.question_count(), request_header.question_count()); return { }; } if (response_header.answer_count() < 1) { - dbgprintf("DNSLookupServer: Not enough answers (%u) :(\n", response_header.answer_count()); + dbgprintf("LookupServer: Not enough answers (%u) :(\n", response_header.answer_count()); return { }; } @@ -246,7 +246,7 @@ Vector<IPv4Address> lookup(const String& hostname, bool& did_timeout) for (word i = 0; i < response_header.answer_count(); ++i) { auto& record = *(const DNSRecord*)(&((const byte*)response_header.payload())[offset]); auto ipv4_address = IPv4Address((const byte*)record.data()); - dbgprintf("DNSLookupServer: Answer #%u: (question: %s), ttl=%u, length=%u, data=%s\n", + dbgprintf("LookupServer: Answer #%u: (question: %s), ttl=%u, length=%u, data=%s\n", i, question.characters(), record.ttl(), |