24 lines
525 B
C++
24 lines
525 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <cstdio>
|
|
|
|
static constexpr int CTRL_SYNC = 0x1234;
|
|
static constexpr int CTRL_ACK = 0x2345;
|
|
static constexpr int CTRL_START = 0x5678;
|
|
static constexpr int CTRL_STOP = 0x3456;
|
|
static constexpr int CTRL_STAT = 0x4567;
|
|
|
|
static constexpr int DSMBR_MSG_MAX_DATA = 16;
|
|
struct dsmbr_ctrl_msg {
|
|
uint32_t code;
|
|
uint64_t data[DSMBR_MSG_MAX_DATA];
|
|
};
|
|
|
|
|
|
int
|
|
dsmbr_send_ctrl_msg(int sockfd, struct dsmbr_ctrl_msg * msg);
|
|
|
|
int
|
|
dsmbr_recv_ctrl_msg(int sockfd, struct dsmbr_ctrl_msg * msg);
|