AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
unix.h
Go to the documentation of this file.
1
#ifndef _NET_UNIX_H
2
#define _NET_UNIX_H
3
4
/*
5
* Unix domain sockets' private structures (net/unix/unix.c).
6
*/
7
8
#define AF_UNIX_CONN 255
9
11
struct
un_conn
{
12
struct
ringbuf
*
soci
;
/* data the server sends and the client receives */
13
struct
ringbuf
*
sico
;
/* data the client sends and the server receives */
14
15
/* Set when the writer of a ring is done (shutdown or close): the reader
16
* reads what is left, then sees the end, and frees the ring. */
17
int
soci_end
,
sico_end
;
18
19
struct
waitq
server_recv
;
20
struct
waitq
server_send
;
21
struct
waitq
client_recv
;
22
struct
waitq
client_send
;
23
struct
waitq
connect
;
24
25
/* 1 once accepted, -1 if refused because the listener closed */
26
int
connected
;
27
};
28
30
struct
un_socket
{
31
struct
vnode
*
vnode
;
32
33
size_t
backlog
;
/* how many connection requests may wait */
34
35
struct
queue
requests
;
36
struct
waitq
accept
;
37
38
int
listening
;
39
};
40
41
#include <aquila/un.h>
42
43
#endif
/* ! _NET_UNIX_H */
queue
A queue.
Definition
queue.h:29
ringbuf
A ring buffer.
Definition
ringbuf.h:18
un_conn
A connection between a client socket and the server that accepted it.
Definition
unix.h:11
un_conn::server_recv
struct waitq server_recv
Definition
unix.h:19
un_conn::sico
struct ringbuf * sico
Definition
unix.h:13
un_conn::connected
int connected
Definition
unix.h:26
un_conn::server_send
struct waitq server_send
Definition
unix.h:20
un_conn::connect
struct waitq connect
Definition
unix.h:23
un_conn::soci
struct ringbuf * soci
Definition
unix.h:12
un_conn::client_send
struct waitq client_send
Definition
unix.h:22
un_conn::soci_end
int soci_end
Definition
unix.h:17
un_conn::sico_end
int sico_end
Definition
unix.h:17
un_conn::client_recv
struct waitq client_recv
Definition
unix.h:21
un_socket
A listening socket, bound to a name in the file system.
Definition
unix.h:30
un_socket::accept
struct waitq accept
Definition
unix.h:36
un_socket::requests
struct queue requests
Definition
unix.h:35
un_socket::vnode
struct vnode * vnode
Definition
unix.h:31
un_socket::listening
int listening
Definition
unix.h:38
un_socket::backlog
size_t backlog
Definition
unix.h:33
waitq
Definition
waitq.h:19
kernel
net
unix
unix.h
Generated by
1.18.0