]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/Messages.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / ipc / Messages.h
index d7b1aae232289fa4f00de9191539577c739f3996..c55452bdabbe35704a90ac307aba99b8fb67f1c3 100644 (file)
@@ -1,53 +1,35 @@
 /*
- * $Id$
- *
- * DEBUG: section 54    Interprocess Communication
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
  *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+/* DEBUG: section 54    Interprocess Communication */
+
 #ifndef SQUID_IPC_MESSAGES_H
 #define SQUID_IPC_MESSAGES_H
 
-#include <sys/types.h>
-#include <sys/socket.h>
-
-/// Declare IPC messages. These classes translate between high-level
-/// information and low-level TypedMsgHdr (i.e., struct msghdr) buffers.
+/** Declarations used by various IPC messages */
 
 namespace Ipc
 {
 
-class TypedMsgHdr;
-
-typedef enum { mtNone = 0, mtRegistration, mtDescriptor } MessageType;
-
-/// Strand location details
-class StrandCoord {
-public:
-       StrandCoord(); ///< unknown location
-       StrandCoord(int akidId, pid_t aPid); ///< from registrant
-       explicit StrandCoord(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
-       void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
-
-public:
-    int kidId; ///< internal Squid process number
-    pid_t pid; ///< OS process or thread identifier
-};
-
-/// a [socket] descriptor information
-class Descriptor
-{
-public:
-    explicit Descriptor(int fd); ///< from descriptor sender
-       explicit Descriptor(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
-       void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
-
-public:
-    int fd; ///< raw descriptor value
-};
-
+/// message class identifier
+typedef enum { mtNone = 0, mtRegistration,
+               mtStrandSearchRequest, mtStrandSearchResponse,
+               mtSharedListenRequest, mtSharedListenResponse,
+               mtIpcIoNotification,
+               mtCollapsedForwardingNotification,
+               mtCacheMgrRequest, mtCacheMgrResponse
+#if SQUID_SNMP
+               ,
+               mtSnmpRequest, mtSnmpResponse
+#endif
+             } MessageType;
 
 } // namespace Ipc;
 
-
 #endif /* SQUID_IPC_MESSAGES_H */
+