Skip to content
Snippets Groups Projects
Commit 23f42481 authored by Ruben Otto's avatar Ruben Otto :crab:
Browse files

chore: update type definition of daemon_measurement_t

parent c4f3ee04
Branches
No related tags found
No related merge requests found
#pragma once
#include <stdint.h>
#include <linux/limits.h>
#include <sys/types.h>
#define MAX_DAEMON_PACKET_SIZE PIPE_BUF
#define DAEMON_PACKET_HEADER_SIZE sizeof(u_int8_t) + sizeof(u_int16_t)
#define DAEMON_PACKET_HEADER_SIZE sizeof(uint8_t) + sizeof(uint16_t)
#define MAX_DAEMON_PACKET_DATA_SIZE MAX_DAEMON_PACKET_SIZE - DAEMON_PACKET_HEADER_SIZE
#define DAEMON_PIPE_NAME "/var/run/sibyl"
typedef struct {
// measurement id
u_int8_t measurement_id;
uint8_t measurement_id;
// size must not exceed 4072
u_int16_t size;
uint16_t size;
// data
u_int8_t data[MAX_DAEMON_PACKET_DATA_SIZE];
uint8_t data[MAX_DAEMON_PACKET_DATA_SIZE];
} daemon_measurement_t;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment