AquilaOS documentation
How it works, and its code
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
11struct 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. */
18
23 struct waitq connect;
24
25 /* 1 once accepted, -1 if refused because the listener closed */
27};
28
30struct un_socket {
31 struct vnode *vnode;
32
33 size_t backlog; /* how many connection requests may wait */
34
36 struct waitq accept;
37
39};
40
41#include <aquila/un.h>
42
43#endif /* ! _NET_UNIX_H */
A queue.
Definition queue.h:29
A ring buffer.
Definition ringbuf.h:18
A connection between a client socket and the server that accepted it.
Definition unix.h:11
struct waitq server_recv
Definition unix.h:19
struct ringbuf * sico
Definition unix.h:13
int connected
Definition unix.h:26
struct waitq server_send
Definition unix.h:20
struct waitq connect
Definition unix.h:23
struct ringbuf * soci
Definition unix.h:12
struct waitq client_send
Definition unix.h:22
int soci_end
Definition unix.h:17
int sico_end
Definition unix.h:17
struct waitq client_recv
Definition unix.h:21
A listening socket, bound to a name in the file system.
Definition unix.h:30
struct waitq accept
Definition unix.h:36
struct queue requests
Definition unix.h:35
struct vnode * vnode
Definition unix.h:31
int listening
Definition unix.h:38
size_t backlog
Definition unix.h:33
Definition waitq.h:19