Kernel/LibC: Implement basic socket binding
This commit is contained in:
@@ -64,6 +64,7 @@ __BEGIN_DECLS
|
||||
#define SYS_CHOWN 63
|
||||
#define SYS_LOAD_KEYMAP 64
|
||||
#define SYS_SOCKET 65
|
||||
#define SYS_BIND 66
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int bind(int socket, const struct sockaddr* address, socklen_t address_len)
|
||||
{
|
||||
return syscall(SYS_BIND, socket, address, address_len);
|
||||
}
|
||||
|
||||
int socket(int domain, int type, int protocol)
|
||||
{
|
||||
return syscall(SYS_SOCKET, domain, type, protocol);
|
||||
|
||||
Reference in New Issue
Block a user