diff options
author | Marvin Borner | 2020-11-18 17:53:31 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-18 17:53:31 +0100 |
commit | a5a04ef3de6ad3f81d37a04fede23eb3b4b348b1 (patch) | |
tree | 555496762aaa15e810bf3038bd2d444d68931d65 /kernel/inc | |
parent | 431c88102153b8b41a15a1105e291ecf161c030e (diff) |
Added browser and many networking things
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/net.h | 13 | ||||
-rw-r--r-- | kernel/inc/proc.h | 2 |
2 files changed, 3 insertions, 12 deletions
diff --git a/kernel/inc/net.h b/kernel/inc/net.h index 5630e97..0c36691 100644 --- a/kernel/inc/net.h +++ b/kernel/inc/net.h @@ -40,17 +40,6 @@ #define DHCP_REPLY 2 #define DHCP_TRANSACTION_IDENTIFIER 0x18122002 -#define DNS_NOERROR 0 -#define DNS_FORMERR 1 -#define DNS_SERVFAIL 2 -#define DNS_NXDOMAIN 3 -#define DNS_NOTIMP 4 -#define DNS_REFUSED 5 -#define DNS_YXDOMAIN 6 -#define DNS_XRRSET 7 -#define DNS_NOTAUTH 8 -#define DNS_NOTZONE 9 - #define HARDWARE_TYPE_ETHERNET 0x01 // Hardcoded ports - TODO! @@ -171,6 +160,8 @@ struct socket *net_open(enum socket_type type); void net_close(struct socket *socket); int net_connect(struct socket *socket, u32 ip_addr, u16 dst_port); void net_send(struct socket *socket, void *data, u32 len); +int net_receive(struct socket *socket, void *buf, u32 len); +int net_data_available(struct socket *socket); void net_install(void); diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h index ad95104..dc12369 100644 --- a/kernel/inc/proc.h +++ b/kernel/inc/proc.h @@ -17,7 +17,7 @@ #define GDT_USER_CODE_OFFSET 0x1b // User code segment offset in GDT (with ring3 mask) #define GDT_USER_DATA_OFFSET 0x23 // User data segment offset in GDT (with ring3 mask) -enum proc_state { PROC_RUNNING }; +enum proc_state { PROC_RUNNING, PROC_SLEEPING }; struct proc { u32 pid; |