mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 10:55:06 +00:00
LibC+LookupServer: Use u32 for the endpoint magic
That's how LibIPC treats it, too.
This commit is contained in:
parent
34a8ee6da5
commit
2798a19c70
2 changed files with 6 additions and 5 deletions
|
@ -33,7 +33,7 @@ static in_addr_t* __gethostbyaddr_address_list_buffer[2];
|
||||||
// a chicken-and-egg situation. Because of this, the LookupServer endpoint magic
|
// a chicken-and-egg situation. Because of this, the LookupServer endpoint magic
|
||||||
// is hardcoded here.
|
// is hardcoded here.
|
||||||
// Keep the name synchronized with LookupServer/LookupServer.ipc.
|
// Keep the name synchronized with LookupServer/LookupServer.ipc.
|
||||||
static constexpr i32 lookup_server_endpoint_magic = "LookupServer"sv.hash();
|
static constexpr u32 lookup_server_endpoint_magic = "LookupServer"sv.hash();
|
||||||
|
|
||||||
// Get service entry buffers and file information for the getservent() family of functions.
|
// Get service entry buffers and file information for the getservent() family of functions.
|
||||||
static FILE* services_file = nullptr;
|
static FILE* services_file = nullptr;
|
||||||
|
@ -115,7 +115,7 @@ hostent* gethostbyname(const char* name)
|
||||||
|
|
||||||
struct [[gnu::packed]] {
|
struct [[gnu::packed]] {
|
||||||
u32 message_size;
|
u32 message_size;
|
||||||
i32 endpoint_magic;
|
u32 endpoint_magic;
|
||||||
i32 message_id;
|
i32 message_id;
|
||||||
i32 name_length;
|
i32 name_length;
|
||||||
} request_header = {
|
} request_header = {
|
||||||
|
@ -139,7 +139,7 @@ hostent* gethostbyname(const char* name)
|
||||||
|
|
||||||
struct [[gnu::packed]] {
|
struct [[gnu::packed]] {
|
||||||
u32 message_size;
|
u32 message_size;
|
||||||
i32 endpoint_magic;
|
u32 endpoint_magic;
|
||||||
i32 message_id;
|
i32 message_id;
|
||||||
i32 code;
|
i32 code;
|
||||||
u64 addresses_count;
|
u64 addresses_count;
|
||||||
|
@ -215,7 +215,7 @@ hostent* gethostbyaddr(const void* addr, socklen_t addr_size, int type)
|
||||||
|
|
||||||
struct [[gnu::packed]] {
|
struct [[gnu::packed]] {
|
||||||
u32 message_size;
|
u32 message_size;
|
||||||
i32 endpoint_magic;
|
u32 endpoint_magic;
|
||||||
i32 message_id;
|
i32 message_id;
|
||||||
i32 address_length;
|
i32 address_length;
|
||||||
} request_header = {
|
} request_header = {
|
||||||
|
@ -239,7 +239,7 @@ hostent* gethostbyaddr(const void* addr, socklen_t addr_size, int type)
|
||||||
|
|
||||||
struct [[gnu::packed]] {
|
struct [[gnu::packed]] {
|
||||||
u32 message_size;
|
u32 message_size;
|
||||||
i32 endpoint_magic;
|
u32 endpoint_magic;
|
||||||
i32 message_id;
|
i32 message_id;
|
||||||
i32 code;
|
i32 code;
|
||||||
i32 name_length;
|
i32 name_length;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Keep the name synchronized with LibC/netdb.cpp, constant 'lookup_server_endpoint_magic'.
|
// Keep the name synchronized with LibC/netdb.cpp, constant 'lookup_server_endpoint_magic'.
|
||||||
endpoint LookupServer
|
endpoint LookupServer
|
||||||
{
|
{
|
||||||
|
// Keep these definitions synchronized with gethostbyname and gethostbyaddr in netdb.cpp
|
||||||
lookup_name(String name) => (int code, Vector<String> addresses)
|
lookup_name(String name) => (int code, Vector<String> addresses)
|
||||||
lookup_address(String address) => (int code, String name)
|
lookup_address(String address) => (int code, String name)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue