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 */