]>
Commit | Line | Data |
---|---|---|
1bac0258 AR |
1 | /* |
2 | * $Id$ | |
3 | * | |
4 | * DEBUG: section 54 Interprocess Communication | |
5 | * | |
6 | */ | |
7 | ||
8 | #ifndef SQUID_IPC_MESSAGES_H | |
9 | #define SQUID_IPC_MESSAGES_H | |
10 | ||
11 | #include <sys/types.h> | |
1bac0258 | 12 | |
f9b9f3bc | 13 | /** Declarations used by varios IPC messages */ |
1bac0258 AR |
14 | |
15 | namespace Ipc | |
16 | { | |
17 | ||
18 | class TypedMsgHdr; | |
19 | ||
f9b9f3bc | 20 | /// message class identifier |
7230e9c7 | 21 | typedef enum { mtNone = 0, mtRegistration, |
f9b9f3bc | 22 | mtSharedListenRequest, mtSharedListenResponse } MessageType; |
1bac0258 AR |
23 | |
24 | /// Strand location details | |
25 | class StrandCoord { | |
26 | public: | |
7230e9c7 AR |
27 | StrandCoord(); ///< unknown location |
28 | StrandCoord(int akidId, pid_t aPid); ///< from registrant | |
29 | explicit StrandCoord(const TypedMsgHdr &hdrMsg); ///< from recvmsg() | |
30 | void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg() | |
1bac0258 AR |
31 | |
32 | public: | |
33 | int kidId; ///< internal Squid process number | |
34 | pid_t pid; ///< OS process or thread identifier | |
35 | }; | |
36 | ||
1bac0258 AR |
37 | } // namespace Ipc; |
38 | ||
39 | ||
40 | #endif /* SQUID_IPC_MESSAGES_H */ |