Squash commits for public release
This commit is contained in:
16
kernel/include/io/sockets/local_socket.h
Normal file
16
kernel/include/io/sockets/local_socket.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef _KERNEL_IO_SOCKETS_LOCAL_SOCKET_H
|
||||
#define _KERNEL_IO_SOCKETS_LOCAL_SOCKET_H
|
||||
|
||||
#include <io/sockets/socket.h>
|
||||
|
||||
int local_socket_create(int type, int protocol, file_descriptor_t* fd);
|
||||
bool local_socket_can_read(file_t* file, size_t start);
|
||||
int local_socket_read(file_t* file, void __user* buf, size_t start, size_t len);
|
||||
bool local_socket_can_write(file_t* file, size_t start);
|
||||
int local_socket_write(file_t* file, void __user* buf, size_t start, size_t len);
|
||||
int local_socket_fchmod(file_t* file, mode_t mode);
|
||||
|
||||
int local_socket_bind(file_descriptor_t* sock, char* name, size_t len);
|
||||
int local_socket_connect(file_descriptor_t* sock, char* name, size_t len);
|
||||
|
||||
#endif /* _KERNEL_IO_SOCKETS_LOCAL_SOCKET_H */
|
||||
14
kernel/include/io/sockets/socket.h
Normal file
14
kernel/include/io/sockets/socket.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef _KERNEL_IO_SOCKETS_SOCKET_H
|
||||
#define _KERNEL_IO_SOCKETS_SOCKET_H
|
||||
|
||||
#include <fs/vfs.h>
|
||||
#include <libkern/syscall_structs.h>
|
||||
#include <libkern/types.h>
|
||||
|
||||
#define MAX_SOCKET_COUNT 32
|
||||
|
||||
int socket_create(int domain, int type, int protocol, file_descriptor_t* fd, file_ops_t* ops);
|
||||
socket_t* socket_duplicate(socket_t* sock);
|
||||
int socket_put(socket_t* sock);
|
||||
|
||||
#endif /* _KERNEL_IO_SOCKETS_SOCKET_H */
|
||||
Reference in New Issue
Block a user