From b05a30248a49913b6d4c09cc2f76c9527d88935a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 21 Nov 2020 21:52:10 +0100 Subject: Added magic DNS algorithm Coffein helped me write this lol. It's actually pretty dumb but WTH - it works! --- libnet/inc/net.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'libnet/inc/net.h') diff --git a/libnet/inc/net.h b/libnet/inc/net.h index eb80cf9..5dd4ee1 100644 --- a/libnet/inc/net.h +++ b/libnet/inc/net.h @@ -3,22 +3,12 @@ #ifndef NET_H #define NET_H +#include #include #include #include #include -#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 htonl(l) \ ((((l)&0xff) << 24) | (((l)&0xff00) << 8) | (((l)&0xff0000) >> 8) | \ (((l)&0xff000000) >> 24)) @@ -32,7 +22,6 @@ #define net_connect(socket, ip_addr, dst_port) \ (int)sys3(SYS_NET_CONNECT, (int)(socket), (int)(ip_addr), (int)(dst_port)) #define net_send(socket, data, len) (void)sys3(SYS_NET_SEND, (int)(socket), (int)(data), (int)(len)) -#include static inline int net_close(struct socket *socket) { int res = 0; @@ -48,6 +37,4 @@ static inline int net_receive(struct socket *socket, void *buf, u32 len) return res; } -u32 dns_request(const char *name, const char *tld); - #endif -- cgit v1.2.3