diff options
author | Marvin Borner | 2020-11-14 13:43:55 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-14 13:43:55 +0100 |
commit | 1af60d64fb97cfadab39b9d3e86248473cac0693 (patch) | |
tree | 4c700a5e19b1bc05fa88de4b430aaf431a60a9f2 /kernel/inc | |
parent | 4d9e6b63d6cad0f6a9b50782b1d540220cfcdf6e (diff) |
Added ugly dns implementation
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/net.h | 14 |
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; |