]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/socket.h
Merge pull request #8817 from yuwata/cleanup-nsflags
[thirdparty/systemd.git] / src / core / socket.h
index 9c528fb39cd3d28f499b95c345e89cd5de482593..8a9559d5c6da0c7f89a92338a134491e96a3c3d3 100644 (file)
@@ -5,19 +5,6 @@
   This file is part of systemd.
 
   Copyright 2010 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 typedef struct Socket Socket;
@@ -26,6 +13,7 @@ typedef struct SocketPeer SocketPeer;
 #include "mount.h"
 #include "service.h"
 #include "socket-util.h"
+#include "unit.h"
 
 typedef enum SocketExecCommand {
         SOCKET_EXEC_START_PRE,
@@ -67,7 +55,7 @@ typedef struct SocketPort {
         SocketType type;
         int fd;
         int *auxiliary_fds;
-        int n_auxiliary_fds;
+        size_t n_auxiliary_fds;
 
         SocketAddress address;
         char *path;
@@ -104,8 +92,8 @@ struct Socket {
         DynamicCreds dynamic_creds;
 
         /* For Accept=no sockets refers to the one service we'll
-        activate. For Accept=yes sockets is either NULL, or filled
-        when the next service we spawn. */
+         * activate. For Accept=yes sockets is either NULL, or filled
+         * to refer to the next service we spawn. */
         UnitRef service;
 
         SocketState state, deserialized_state;
@@ -195,3 +183,5 @@ SocketResult socket_result_from_string(const char *s) _pure_;
 
 const char* socket_port_type_to_string(SocketPort *p) _pure_;
 SocketType socket_port_type_from_string(const char *p) _pure_;
+
+DEFINE_CAST(SOCKET, Socket);