PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
local.c File Reference
#include "local.h"
#include "local_conn.h"
#include "local_listen.h"
#include "socket.h"
#include "socket_family.h"
#include "socket_type.h"
#include <kernel/fs/path.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/sched/wait.h>
#include <kernel/sync/lock.h>
#include <kernel/utils/ref.h>
#include <kernel/utils/ring.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/io.h>
#include <sys/list.h>
Include dependency graph for local.c:

Go to the source code of this file.

Functions

static local_listen_tlocal_socket_data_get_listen (local_socket_data_t *data)
 
static local_conn_tlocal_socket_data_get_conn (local_socket_data_t *data)
 
static uint64_t local_socket_init (socket_t *sock)
 
static void local_socket_deinit (socket_t *sock)
 
static uint64_t local_socket_bind (socket_t *sock, const char *address)
 
static uint64_t local_socket_listen (socket_t *sock, uint32_t backlog)
 
static uint64_t local_socket_connect (socket_t *sock, const char *address)
 
static uint64_t local_socket_accept (socket_t *sock, socket_t *newSock, mode_t mode)
 
static uint64_t local_socket_send (socket_t *sock, const void *buffer, uint64_t count, uint64_t *offset, mode_t mode)
 
static uint64_t local_socket_recv (socket_t *sock, void *buffer, uint64_t count, uint64_t *offset, mode_t mode)
 
static wait_queue_tlocal_socket_poll (socket_t *sock, poll_events_t *revents)
 
uint64_t net_local_init (void)
 Initialize the local networking subsystem.
 
void net_local_deinit (void)
 Deinitialize the local networking subsystem.
 

Variables

static socket_family_ops_t ops
 

Function Documentation

◆ local_socket_data_get_listen()

static local_listen_t * local_socket_data_get_listen ( local_socket_data_t data)
static

Definition at line 22 of file local.c.

Here is the caller graph for this function:

◆ local_socket_data_get_conn()

static local_conn_t * local_socket_data_get_conn ( local_socket_data_t data)
static

Definition at line 34 of file local.c.

Here is the caller graph for this function:

◆ local_socket_init()

static uint64_t local_socket_init ( socket_t sock)
static

Definition at line 46 of file local.c.

Here is the call graph for this function:

◆ local_socket_deinit()

static void local_socket_deinit ( socket_t sock)
static

Definition at line 58 of file local.c.

Here is the call graph for this function:

◆ local_socket_bind()

static uint64_t local_socket_bind ( socket_t sock,
const char *  address 
)
static

Definition at line 104 of file local.c.

Here is the call graph for this function:

◆ local_socket_listen()

static uint64_t local_socket_listen ( socket_t sock,
uint32_t  backlog 
)
static

Definition at line 131 of file local.c.

◆ local_socket_connect()

static uint64_t local_socket_connect ( socket_t sock,
const char *  address 
)
static

Definition at line 164 of file local.c.

Here is the call graph for this function:

◆ local_socket_accept()

static uint64_t local_socket_accept ( socket_t sock,
socket_t newSock,
mode_t  mode 
)
static

Definition at line 219 of file local.c.

Here is the call graph for this function:

◆ local_socket_send()

static uint64_t local_socket_send ( socket_t sock,
const void *  buffer,
uint64_t  count,
uint64_t offset,
mode_t  mode 
)
static

Definition at line 286 of file local.c.

Here is the call graph for this function:

◆ local_socket_recv()

static uint64_t local_socket_recv ( socket_t sock,
void *  buffer,
uint64_t  count,
uint64_t offset,
mode_t  mode 
)
static

Definition at line 355 of file local.c.

Here is the call graph for this function:

◆ local_socket_poll()

static wait_queue_t * local_socket_poll ( socket_t sock,
poll_events_t revents 
)
static

Definition at line 434 of file local.c.

Here is the call graph for this function:

Variable Documentation

◆ ops

socket_family_ops_t ops
static
Initial value:
= {
}
static uint64_t local_socket_bind(socket_t *sock, const char *address)
Definition local.c:104
static uint64_t local_socket_accept(socket_t *sock, socket_t *newSock, mode_t mode)
Definition local.c:219
static uint64_t local_socket_connect(socket_t *sock, const char *address)
Definition local.c:164
static uint64_t local_socket_send(socket_t *sock, const void *buffer, uint64_t count, uint64_t *offset, mode_t mode)
Definition local.c:286
static void local_socket_deinit(socket_t *sock)
Definition local.c:58
static uint64_t local_socket_init(socket_t *sock)
Definition local.c:46
static wait_queue_t * local_socket_poll(socket_t *sock, poll_events_t *revents)
Definition local.c:434
static uint64_t local_socket_listen(socket_t *sock, uint32_t backlog)
Definition local.c:131
static uint64_t local_socket_recv(socket_t *sock, void *buffer, uint64_t count, uint64_t *offset, mode_t mode)
Definition local.c:355

Definition at line 505 of file local.c.