summaryrefslogtreecommitdiff
path: root/kernel/socket.h
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-07-04 23:03:16 +0200
committerAnton Kling <anton@kling.gg>2024-07-05 12:46:50 +0200
commit6bf371cc35c11890ab18c32aabd11bf8a816e574 (patch)
tree00df8f66ec65fc8a59aa315ef90be91cadd64cb5 /kernel/socket.h
parent59893c116e9e4e5dd04c24c0ba2fd06fe1936500 (diff)
TCP: Add back support for listening on a socket
Diffstat (limited to 'kernel/socket.h')
-rw-r--r--kernel/socket.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/socket.h b/kernel/socket.h
index 5ea71f5..bba63c5 100644
--- a/kernel/socket.h
+++ b/kernel/socket.h
@@ -6,6 +6,7 @@ typedef int socklen_t;
#include <fs/vfs.h>
#include <lib/buffered_write.h>
#include <lib/relist.h>
+#include <lib/list.h>
#include <lib/ringbuffer.h>
#include <lib/stack.h>
#include <stddef.h>
@@ -69,10 +70,14 @@ struct TcpConnection {
u32 snd_nxt;
u32 snd_max;
u32 snd_wnd;
+
+ struct list incoming_connections;
};
struct TcpConnection *tcp_find_connection(ipv4_t src_ip, u16 src_port,
ipv4_t dst_ip, u16 dst_port);
+struct TcpConnection *tcp_connect_to_listen(ipv4_t src_ip, u16 src_port,
+ ipv4_t dst_ip, u16 dst_port);
struct UdpConnection *udp_find_connection(ipv4_t src_ip, u16 src_port,
u16 dst_port);