diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-23 03:35:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-23 03:35:54 +0100 |
commit | 542563babda739f7aee468c3eaaab6315ffa4224 (patch) | |
tree | 76a11b38d8e6bbb2908fd1d8ba86bd34f6c1f2fd /socket.h | |
parent | 5cb5a6ffc33667c93e9bc3572534dcaa684046e3 (diff) |
rework socket handling
Diffstat (limited to 'socket.h')
-rw-r--r-- | socket.h | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -6,6 +6,7 @@ typedef struct Socket Socket; #include "name.h" +#include "socket-util.h" typedef enum SocketState { SOCKET_DEAD, @@ -27,14 +28,34 @@ typedef enum SocketExecCommand { _SOCKET_EXEC_MAX } SocketExecCommand; +typedef enum SocketType { + SOCKET_SOCKET, + SOCKET_FIFO +} SocketType; + +typedef struct SocketPort SocketPort; + +struct SocketPort { + SocketType type; + + SocketAddress address; + char *path; + + int fd; + + LIST_FIELDS(SocketPort); +}; + struct Socket { Meta meta; SocketState state; - Address address; - int *fds; - unsigned n_fds; + LIST_HEAD(SocketPort, ports); + + /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */ + bool bind_ipv6_only; + unsigned backlog; ExecCommand* exec_command[_SOCKET_EXEC_MAX]; ExecContext exec_context; |