Kernel/LibC: Implement socketpair for UNIX sockets
This commit is contained in:
@@ -64,6 +64,7 @@ __BEGIN_DECLS
|
||||
O(SYS_FCHOWNAT, fchownat) \
|
||||
O(SYS_LOAD_KEYMAP, load_keymap) \
|
||||
O(SYS_SOCKET, socket) \
|
||||
O(SYS_SOCKETPAIR, socketpair) \
|
||||
O(SYS_BIND, bind) \
|
||||
O(SYS_SENDTO, sendto) \
|
||||
O(SYS_RECVFROM, recvfrom) \
|
||||
|
||||
@@ -68,6 +68,11 @@ int socket(int domain, int type, int protocol)
|
||||
return syscall(SYS_SOCKET, domain, type, protocol);
|
||||
}
|
||||
|
||||
int socketpair(int domain, int type, int protocol, int socket_vector[2])
|
||||
{
|
||||
return syscall(SYS_SOCKETPAIR, domain, type, protocol, socket_vector);
|
||||
}
|
||||
|
||||
int getsockname(int socket, struct sockaddr* __restrict address, socklen_t* __restrict address_len)
|
||||
{
|
||||
return syscall(SYS_GETSOCKNAME, socket, address, address_len);
|
||||
|
||||
Reference in New Issue
Block a user