]>
git.ipfire.org Git - thirdparty/systemd.git/blob - socket.h
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
6 typedef struct Socket Socket
;
10 #include "socket-util.h"
12 typedef enum SocketState
{
19 SOCKET_STOP_PRE_SIGTERM
,
20 SOCKET_STOP_PRE_SIGKILL
,
22 SOCKET_STOP_POST_SIGTERM
,
23 SOCKET_STOP_POST_SIGKILL
,
28 typedef enum SocketExecCommand
{
29 SOCKET_EXEC_START_PRE
,
30 SOCKET_EXEC_START_POST
,
32 SOCKET_EXEC_STOP_POST
,
36 typedef enum SocketType
{
41 typedef struct SocketPort SocketPort
;
46 SocketAddress address
;
52 LIST_FIELDS(SocketPort
, port
);
58 LIST_HEAD(SocketPort
, ports
);
60 /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */
66 ExecCommand
* exec_command
[_SOCKET_EXEC_MAX
];
67 ExecContext exec_context
;
73 ExecCommand
* control_command
;
82 /* Called from the service code when collecting fds */
83 int socket_collect_fds(Socket
*s
, int **fds
, unsigned *n_fds
);
85 /* Called from the service when it shut down */
86 void socket_notify_service_dead(Socket
*s
);
88 extern const UnitVTable socket_vtable
;