]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/Messages.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / ipc / Messages.h
index d545b21b74c5b49b76817654ea9a8065e146f292..5590475cf0b89803bc0d8e67f99ad74ef12066ce 100644 (file)
@@ -8,49 +8,23 @@
 #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;
-
+/// message class identifier
 typedef enum { mtNone = 0, mtRegistration,
-    mtDescriptorGet, mtDescriptorPut } 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:
-    Descriptor(); ///< unknown descriptor
-    Descriptor(int fromKid, int fd); ///< from descriptor sender or requestor
-    explicit Descriptor(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
-    void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
-
-public:
-    int fromKid; /// the source of this message
-    int fd; ///< raw descriptor value
-};
-
+               mtStrandSearchRequest, mtStrandSearchResponse,
+               mtSharedListenRequest, mtSharedListenResponse,
+               mtIpcIoNotification,
+               mtCacheMgrRequest, mtCacheMgrResponse
+#if SQUID_SNMP
+               ,
+               mtSnmpRequest, mtSnmpResponse
+#endif
+             } MessageType;
 
 } // namespace Ipc;
 
-
 #endif /* SQUID_IPC_MESSAGES_H */