From 8b7afb63296b27bbd137daa3ade4c9a0661360db Mon Sep 17 00:00:00 2001 From: fastium Date: Fri, 5 Jun 2026 19:59:35 +0200 Subject: [PATCH] feat(MP/daemon): define common for ipc server --- src/06-mini-project/common/common_ipc.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/06-mini-project/common/common_ipc.h diff --git a/src/06-mini-project/common/common_ipc.h b/src/06-mini-project/common/common_ipc.h new file mode 100644 index 0000000..a508e1e --- /dev/null +++ b/src/06-mini-project/common/common_ipc.h @@ -0,0 +1,19 @@ +// common_ipc.h +#ifndef COMMON_IPC_H +#define COMMON_IPC_H + +#define SOCKET_PATH "/tmp/regulator_daemon.sock" + +/* Commands definitions */ +#define CMD_SET_MODE 10 +#define CMD_SET_FREQ 20 +#define CMD_INC_FREQ 30 +#define CMD_DEC_FREQ 40 + +/* Structure of the message sent through IPC */ +typedef struct { + int command; + int value; +} ipc_msg_t; + +#endif /* COMMON_IPC_H */