KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Definitions for a sockets "filesystem". More...
#include <sys/cdefs.h>
#include <arch/types.h>
#include <kos/fs.h>
#include <kos/net.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | net_socket_t |
Internal representation of a socket for fs_socket. More... | |
struct | fs_socket_proto_t |
Internal sockets protocol handler. More... | |
Macros | |
#define | FS_SOCKET_PROTO_ENTRY { NULL, NULL } |
Initializer for the entry field in the fs_socket_proto_t struct. | |
#define | FS_SOCKET_NONBLOCK 0x00000001 /** \brief Non-blocking operations */ |
#define | FS_SOCKET_V6ONLY 0x00000002 /** \brief IPv6 Only */ |
#define | FS_SOCKET_GEN_MAX 0x00008000 /** \brief Maximum generic flag */ |
#define | FS_SOCKET_FAM_MAX 0x00800000 /** \brief Maximum family flag */ |
Functions | |
net_socket_t * | fs_socket_open_sock (fs_socket_proto_t *proto) |
Open a socket without calling the protocol initializer. | |
int | fs_socket_input (netif_t *src, int domain, int protocol, const void *hdr, const uint8 *data, size_t size) |
Input a packet into some socket family handler. | |
int | fs_socket_proto_add (fs_socket_proto_t *proto) |
Add a new protocol for use with fs_socket. | |
int | fs_socket_proto_remove (fs_socket_proto_t *proto) |
Unregister a protocol from fs_socket. | |
Definitions for a sockets "filesystem".
This file provides definitions to support the BSD-sockets-like filesystem in KallistiOS. Technically, this filesystem mounts itself on /sock, but it doesn't export any files there, so that point is largely irrelevant. The filesystem is designed to be extensible, making it possible to add additional socket family handlers at runtime. Currently, the kernel only implements UDP sockets over IPv4 and IPv6, but as mentioned, this can be extended in a fairly straightforward manner. In general, as a user of KallistiOS (someone not interested in adding additional socket family drivers), there's very little in this file that will be of interest.