aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/inc/net.h')
-rw-r--r--kernel/inc/net.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/inc/net.h b/kernel/inc/net.h
index e0c29eb..fe3270b 100644
--- a/kernel/inc/net.h
+++ b/kernel/inc/net.h
@@ -41,6 +41,10 @@
#define HARDWARE_TYPE_ETHERNET 0x01
+// Hardcoded ports - TODO!
+#define DHCP_PORT 68
+#define DNS_PORT 50053
+
// Protocol structs
struct ethernet_packet {
@@ -95,6 +99,16 @@ struct dhcp_packet {
u8 options[64];
} __attribute__((packed));
+struct dns_packet {
+ u16 qid;
+ u16 flags;
+ u16 questions;
+ u16 answers;
+ u16 authorities;
+ u16 additional;
+ u8 data[];
+} __attribute__((packed));
+
struct udp_packet {
u16 src_port;
u16 dst_port;