PatchworkOS
Loading...
Searching...
No Matches
Local Sockets

Local Sockets. More...

Modules

 Local Connections
 Local Connections.
 
 Local Listeners
 Local Listeners.
 

Data Structures

struct  local_packet_header_t
 Local packet header structure. struct local_packet_header_t. More...
 
struct  local_socket_data_t
 Local socket data structure. struct local_socket_data_t. More...
 

Macros

#define LOCAL_BUFFER_SIZE   (4 * PAGE_SIZE)
 The size of local sockets buffer.
 
#define LOCAL_MAX_PACKET_SIZE   (LOCAL_BUFFER_SIZE - sizeof(local_packet_header_t))
 The maximum size of a packet allowed to be sent/received via local sockets.
 
#define LOCAL_MAX_BACKLOG   128
 The maximum backlog of connections for a local listener.
 
#define LOCAL_PACKET_MAGIC   0xC0D74B56
 Magic number for local socket packets, used for validation.
 

Functions

void net_local_init (void)
 Initialize the local networking subsystem.
 

Detailed Description

Local Sockets.

Local Sockets are similar to UNIX domain sockets, they allow local communication on the host in a server-client manner.

Macro Definition Documentation

◆ LOCAL_BUFFER_SIZE

#define LOCAL_BUFFER_SIZE   (4 * PAGE_SIZE)

The size of local sockets buffer.

Definition at line 26 of file local.h.

◆ LOCAL_MAX_BACKLOG

#define LOCAL_MAX_BACKLOG   128

The maximum backlog of connections for a local listener.

Definition at line 36 of file local.h.

◆ LOCAL_MAX_PACKET_SIZE

#define LOCAL_MAX_PACKET_SIZE   (LOCAL_BUFFER_SIZE - sizeof(local_packet_header_t))

The maximum size of a packet allowed to be sent/received via local sockets.

Definition at line 31 of file local.h.

◆ LOCAL_PACKET_MAGIC

#define LOCAL_PACKET_MAGIC   0xC0D74B56

Magic number for local socket packets, used for validation.

Definition at line 41 of file local.h.

Function Documentation

◆ net_local_init()

void net_local_init ( void  )

Initialize the local networking subsystem.

Definition at line 517 of file local.c.

References ERR, local_listen_dir_init(), NULL, ops, panic(), socket_family_register(), and SOCKET_SEQPACKET.

Referenced by net_init().