summaryrefslogtreecommitdiff
path: root/LibC/sys/socket.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-20 20:33:03 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-20 20:33:03 +0200
commitae470ec9558e5903ff68bd3cf95e1355e5a13c1c (patch)
treeb80d21b27d1c1d7fe62d0f77db3766b07c5a2008 /LibC/sys/socket.h
parentf008156dbf30a892827f3b6bf7203680533b2eb9 (diff)
downloadserenity-ae470ec9558e5903ff68bd3cf95e1355e5a13c1c.zip
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.
Diffstat (limited to 'LibC/sys/socket.h')
-rw-r--r--LibC/sys/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/LibC/sys/socket.h b/LibC/sys/socket.h
index 06e59e527d..42123275ec 100644
--- a/LibC/sys/socket.h
+++ b/LibC/sys/socket.h
@@ -55,6 +55,7 @@ struct sockaddr_in {
#define SO_RCVTIMEO 1
#define SO_SNDTIMEO 2
+#define SO_KEEPALIVE 3
int socket(int domain, int type, int protocol);
int bind(int sockfd, const struct sockaddr* addr, socklen_t);
@@ -68,6 +69,7 @@ ssize_t recvfrom(int sockfd, void*, size_t, int flags, struct sockaddr*, socklen
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*);
__END_DECLS