mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 21:58:20 +00:00
syscall: multiple syscalls related to sockets
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include <kernel/cmdline.h>
|
||||
#include <arch/smp.h>
|
||||
#include <kernel/virtio.h>
|
||||
#include <kernel/net.h>
|
||||
#include <kernel/sock.h>
|
||||
|
||||
static cpu_t bsp_cpu;
|
||||
|
||||
@@ -63,8 +65,14 @@ void kernel_entry() {
|
||||
tmpfs_init();
|
||||
devfs_init();
|
||||
pipefs_init();
|
||||
sockfs_init();
|
||||
ext2_init();
|
||||
|
||||
netdev_init();
|
||||
arp_init();
|
||||
ipv4_init();
|
||||
udp_init();
|
||||
|
||||
block_init();
|
||||
pseudodevices_init();
|
||||
arch_e9_initdev();
|
||||
|
||||
@@ -40,6 +40,11 @@ extern syscall_mount
|
||||
extern syscall_fchownat
|
||||
extern syscall_utimensat
|
||||
extern syscall_renameat
|
||||
extern syscall_socket
|
||||
extern syscall_bind
|
||||
extern syscall_sendmsg
|
||||
extern syscall_setsockopt
|
||||
extern syscall_recvmsg
|
||||
syscalltab:
|
||||
dq syscall_print
|
||||
dq syscall_mmap
|
||||
@@ -82,7 +87,12 @@ dq syscall_mount
|
||||
dq syscall_fchownat
|
||||
dq syscall_utimensat
|
||||
dq syscall_renameat
|
||||
syscallcount equ 41
|
||||
dq syscall_socket
|
||||
dq syscall_bind
|
||||
dq syscall_sendmsg
|
||||
dq syscall_setsockopt
|
||||
dq syscall_recvmsg
|
||||
syscallcount equ 46
|
||||
section .text
|
||||
global arch_syscall_entry
|
||||
; on entry:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#ifdef SYSCALL_LOGGING
|
||||
|
||||
#define SYSCALL_COUNT 41
|
||||
#define SYSCALL_COUNT 46
|
||||
#define LOGSTR(x) arch_e9_puts(x)
|
||||
|
||||
static char *name[] = {
|
||||
@@ -48,7 +48,12 @@ static char *name[] = {
|
||||
"mount",
|
||||
"fchownat",
|
||||
"utimensat",
|
||||
"renameat"
|
||||
"renameat",
|
||||
"socket",
|
||||
"bind",
|
||||
"sendmsg",
|
||||
"setsockopt",
|
||||
"recvmsg"
|
||||
};
|
||||
|
||||
static char *args[] = {
|
||||
@@ -92,7 +97,12 @@ static char *args[] = {
|
||||
"backing %p mountpoint %s fs %s flags %d data %p", // mount
|
||||
"fd %d path %s owner %d group %d flags %x", // fchownat
|
||||
"dirfd %d path %p times %p flags %x", // utimensat
|
||||
"olddirfd %d oldpath %s newdirfd %d newpath %s flags %d" // renameat
|
||||
"olddirfd %d oldpath %s newdirfd %d newpath %s flags %d", // renameat
|
||||
"domain %d type %d protocol %d\n", // socket
|
||||
"fd %d addr %p len %d\n", // bind
|
||||
"fd %d msghdr %p flags %d", // sendmsg
|
||||
"fd %d level %d optname %d optval %p optlen %lu", // setsockopt
|
||||
"fd %d msghdr %p flags %d", // recvmsg
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user