Various control protocol improvements, still needs significant work.
[oweals/dinit.git] / control-cmds.h
1 // Dinit control command packet types
2
3 // Requests:
4
5 // Start or stop a named service:
6 constexpr static int DINIT_CP_STARTSERVICE = 0;
7 constexpr static int DINIT_CP_STOPSERVICE  = 1;
8
9 // Roll-back all services:
10 constexpr static int DINIT_CP_ROLLBACKALL = 2;
11
12
13 // Replies:
14
15 // Reply: ACK/NAK to request
16 constexpr static int DINIT_RP_ACK = 50;
17 //constexpr static int DINIT_RP_NAK = 51;
18
19 // Request was bad (connection will be closed)
20 constexpr static int DINIT_RP_BADREQ = 52;
21
22 // Connection being closed due to out-of-memory condition
23 constexpr static int DINIT_RP_OOM = 53;
24
25 // Reply: rollback completed
26 constexpr static int DINIT_ROLLBACK_COMPLETED = 60;
27
28 // Start service replies:
29 constexpr static int DINIT_RP_SERVICELOADERR = 61;
30 constexpr static int DINIT_RP_SERVICEOOM = 62; // couldn't start due to out-of-memory