diff options
Diffstat (limited to 'libc/inc/socket.h')
-rw-r--r-- | libc/inc/socket.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libc/inc/socket.h b/libc/inc/socket.h index 651bba0..e5e23ad 100644 --- a/libc/inc/socket.h +++ b/libc/inc/socket.h @@ -4,6 +4,7 @@ #define SOCKET_H #include <def.h> +#include <list.h> // TODO: Use actual socket types (stream etc) enum socket_type { S_TCP, S_UDP }; @@ -15,15 +16,19 @@ struct tcp_socket { u32 state; }; +struct socket_data { + u8 *data; + u32 length; +}; + struct socket { + u32 pid; u32 ip_addr; u32 dst_port; u32 src_port; enum socket_state state; enum socket_type type; - u32 bytes_available; - u32 bytes_read; - void *current_packet; + struct list *packets; union { struct tcp_socket tcp; /* struct udp_socket udp; */ |