socket: initial implementation

This commit is contained in:
Matheus
2024-04-07 16:38:08 -03:00
parent 890bc57aa3
commit d49de825cc
3 changed files with 253 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#include <kernel/sock.h>
#include <logging.h>
static socket_t *(*createsocket[])() = {
udp_createsocket
};
socket_t *socket_create(int type) {
__assert(type < sizeof(createsocket) / sizeof(createsocket[0]));
return createsocket[type]();
}