mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-10 05:02:54 +00:00
Kernel: Add getpeername() syscall, and fix getsockname() behavior.
We were copying the raw IPv4 addresses into the wrong part of sockaddr_in, and we didn't set sa_family or sa_port.
This commit is contained in:
parent
f008156dbf
commit
ae470ec955
Notes:
sideshowbarker
2024-07-19 14:00:00 +09:00
Author: https://github.com/awesomekling
Commit: ae470ec955
11 changed files with 73 additions and 9 deletions
|
@ -30,7 +30,8 @@ public:
|
|||
|
||||
virtual KResult bind(const sockaddr*, socklen_t) = 0;
|
||||
virtual KResult connect(FileDescriptor&, const sockaddr*, socklen_t, ShouldBlock) = 0;
|
||||
virtual bool get_address(sockaddr*, socklen_t*) = 0;
|
||||
virtual bool get_local_address(sockaddr*, socklen_t*) = 0;
|
||||
virtual bool get_peer_address(sockaddr*, socklen_t*) = 0;
|
||||
virtual bool is_local() const { return false; }
|
||||
virtual bool is_ipv4() const { return false; }
|
||||
virtual void attach(FileDescriptor&) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue