ppd/dsmbr/dmsg.hh

24 lines
550 B
C++
Raw Normal View History

2023-03-02 14:12:35 +00:00
#pragma once
#include <cstdint>
#include <cstdio>
static constexpr int CTRL_SYNC = 0x1234;
static constexpr int CTRL_ACK = 0x2345;
2023-03-11 02:09:28 +00:00
static constexpr int CTRL_START = 0x5678;
2023-03-02 14:12:35 +00:00
static constexpr int CTRL_STOP = 0x3456;
static constexpr int CTRL_STAT = 0x4567;
static constexpr int DSMBR_MSG_MAX_DATA = 16;
2023-03-14 13:30:03 +00:00
struct __attribute__((packed)) dsmbr_ctrl_msg {
2023-03-02 14:12:35 +00:00
uint32_t code;
uint64_t data[DSMBR_MSG_MAX_DATA];
};
2023-03-11 02:09:28 +00:00
int
dsmbr_send_ctrl_msg(int sockfd, struct dsmbr_ctrl_msg * msg);
2023-03-02 14:12:35 +00:00
int
dsmbr_recv_ctrl_msg(int sockfd, struct dsmbr_ctrl_msg * msg);