message.h
Go to the documentation of this file.
/*
* Copyright (C) 2018 dimercur
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MESSAGE_H
#define MESSAGE_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
typedef struct {
char header[4];
void *data = NULL;
} MessageToMon;
void set_msgToMon_header(MessageToMon *msg, char *header);
void set_msgToMon_data(MessageToMon *msg, void *data);
void free_msgToMon_data(MessageToMon *msg);
void print_msgToMon(MessageToMon *msg);
#endif /* MESSAGE_H */
MessageToMon
Definition: message.h:34
set_msgToMon_header
void set_msgToMon_header(MessageToMon *msg, char *header)
Set header part of monitor message.
free_msgToMon_data
void free_msgToMon_data(MessageToMon *msg)
Dealocate moemory pointed by data part of message.
set_msgToMon_data
void set_msgToMon_data(MessageToMon *msg, void *data)
Set data part of monitor message.
print_msgToMon
void print_msgToMon(MessageToMon *msg)
Print message, header and data.