1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
6 typedef struct Socket Socket;
9 #include "socket-util.h"
11 typedef enum SocketState {
18 SOCKET_STOP_PRE_SIGTERM,
19 SOCKET_STOP_PRE_SIGKILL,
21 SOCKET_STOP_POST_SIGTERM,
22 SOCKET_STOP_POST_SIGKILL,
27 typedef enum SocketExecCommand {
28 SOCKET_EXEC_START_PRE,
29 SOCKET_EXEC_START_POST,
31 SOCKET_EXEC_STOP_POST,
35 typedef enum SocketType {
40 typedef struct SocketPort SocketPort;
45 SocketAddress address;
50 LIST_FIELDS(SocketPort, port);
56 LIST_HEAD(SocketPort, ports);
58 /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */
64 ExecCommand* exec_command[_SOCKET_EXEC_MAX];
65 ExecContext exec_context;
71 ExecCommand* control_command;
78 /* Called from the service code when collecting fds */
79 int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds);
81 extern const NameVTable socket_vtable;