mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:17:45 +00:00
Kernel+LibC: Implement the socketpair() syscall
This commit is contained in:
parent
c841012f56
commit
aa792062cb
11 changed files with 100 additions and 91 deletions
|
@ -125,6 +125,13 @@ int getpeername(int sockfd, struct sockaddr* addr, socklen_t* addrlen)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int socketpair(int domain, int type, int protocol, int sv[2])
|
||||
{
|
||||
Syscall::SC_socketpair_params params { domain, type, protocol, sv };
|
||||
int rc = syscall(SC_socketpair, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int sendfd(int sockfd, int fd)
|
||||
{
|
||||
int rc = syscall(SC_sendfd, sockfd, fd);
|
||||
|
|
|
@ -138,6 +138,7 @@ int getsockopt(int sockfd, int level, int option, void*, socklen_t*);
|
|||
int setsockopt(int sockfd, int level, int option, const void*, socklen_t);
|
||||
int getsockname(int sockfd, struct sockaddr*, socklen_t*);
|
||||
int getpeername(int sockfd, struct sockaddr*, socklen_t*);
|
||||
int socketpair(int domain, int type, int protocol, int sv[2]);
|
||||
int sendfd(int sockfd, int fd);
|
||||
int recvfd(int sockfd, int options);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue