aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-11-14 22:27:59 +0100
committerMarvin Borner2020-11-14 22:27:59 +0100
commit0621c44e439bedf034399e1bff139ef506039eba (patch)
tree68e69323391e5c4725fa6ef2d16e17e6664011b4 /kernel/inc
parent1af60d64fb97cfadab39b9d3e86248473cac0693 (diff)
Some fixes
I WAS BUG-SEARCHING FOR SEVERAL HOURS WHYYYY, WHEEERE, AAAAAH
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/interrupts.h3
-rw-r--r--kernel/inc/net.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/kernel/inc/interrupts.h b/kernel/inc/interrupts.h
index 61d31fc..1c475b1 100644
--- a/kernel/inc/interrupts.h
+++ b/kernel/inc/interrupts.h
@@ -25,9 +25,6 @@ struct idt_ptr {
void *base;
} __attribute__((packed));
-struct idt_entry idt[256];
-struct idt_ptr idt_ptr;
-
void idt_set_gate(u8 num, u32 base, u16 sel, u8 flags);
void irq_install_handler(int irq, void (*handler)(struct regs *r));
diff --git a/kernel/inc/net.h b/kernel/inc/net.h
index fe3270b..f9986e0 100644
--- a/kernel/inc/net.h
+++ b/kernel/inc/net.h
@@ -161,12 +161,13 @@ struct tcp_socket {
// TODO: Use actual socket types (stream etc)
enum socket_type { S_TCP, S_UDP };
+enum socket_state { S_CONNECTING, S_CONNECTED, S_OPEN, S_CLOSED, S_FAILED };
struct socket {
u32 ip_addr;
u32 dst_port;
u32 src_port;
- u32 status;
+ enum socket_state state;
enum socket_type type;
u32 bytes_available;
u32 bytes_read;