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

LookupServer+LibC: Add support for reverse DNS lookups via gethostbyaddr().

LookupServer can now take two types of requests:

* L: Lookup
* R: Reverse lookup

The /bin/host program now does a reverse lookup if the input string is a
valid IPv4 address. :^)
This commit is contained in:
Andreas Kling 2019-06-06 05:35:03 +02:00
parent d03505bc29
commit 01f1333856
4 changed files with 156 additions and 46 deletions

View file

@ -15,6 +15,7 @@ struct hostent {
};
struct hostent* gethostbyname(const char*);
struct hostent* gethostbyaddr(const void* addr, socklen_t len, int type);
struct servent {
char* s_name;