From 1af60d64fb97cfadab39b9d3e86248473cac0693 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 14 Nov 2020 13:43:55 +0100 Subject: Added ugly dns implementation --- kernel/inc/net.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'kernel/inc/net.h') 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; -- cgit v1.2.3