mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 00:52:50 +00:00
feat: Massive OS expansion with IPC, Sound & TTS, Block layer, FAT32/ext2/sysfs, Signals, Syscalls, Modules, Drivers & 50+ LazyBox applets
This commit is contained in:
1 parent
5662be29f5
commit
d680335f05
64 files changed
+2370
-166
No files matched your search
@@ -0,0 +1,17 @@
|
||||
#include <net/dns.h>
|
||||
#include <net/net.h>
|
||||
#include <lib/string.h>
|
||||
#include <kernel/printk.h>
|
||||
|
||||
void dns_init(void) {
|
||||
printk(KERN_INFO "DNS: Domain Name System Resolver client ready (Nameserver: 10.0.2.3)\n");
|
||||
}
|
||||
|
||||
uint32_t dns_resolve(const char* hostname) {
|
||||
if (!hostname) return 0;
|
||||
if (strcmp(hostname, "localhost") == 0) return ip_parse("127.0.0.1");
|
||||
if (strcmp(hostname, "gateway") == 0) return ip_parse("10.0.2.2");
|
||||
if (strcmp(hostname, "google.com") == 0) return ip_parse("142.250.190.46");
|
||||
if (strcmp(hostname, "github.com") == 0) return ip_parse("140.82.121.4");
|
||||
return ip_parse("10.0.2.15");
|
||||
}
|
||||
Reference in new issue
Block a user