Skip to content

Commit

Permalink
ipc: prototypes for socket syscalls
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 6, 2024
1 parent 16445be commit f712421
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/include/kernel/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <stdint.h>
#include <stddef.h>
#include <kernel/sched.h>

/* socket family/domain - only Unix sockets will be implemented in the kernel */
#define AF_UNIX 1
Expand Down Expand Up @@ -42,3 +43,12 @@ typedef struct {
int inboundCount, outboundCount;
void **inbound, **outbound;
} SocketDescriptor;

/* socket system calls */
int socket(Thread *, int, int, int);
int connect(Thread *, int, const struct sockaddr *, socklen_t);
int bind(Thread *, int, const struct sockaddr *, socklen_t);
int listen(Thread *, int, int);
int accept(Thread *, int, struct sockaddr *, socklen_t *);
ssize_t recv(Thread *, int, void *, size_t, int);
ssize_t send(Thread *, int, const void *, size_t, int);

0 comments on commit f712421

Please sign in to comment.