+++ /dev/null
-/*
- File name : message.h
- Projet : MERLIN
- Date of creation : 2025/04/03
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains message definition
-
- History :
- - initial version
-*/
-
-#ifndef __MESSAGE_H__
-#define __MESSAGE_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGE
-
- Clear data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
-} CLEAR_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- Encrypted data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
- uint8_t iv[12]; /**< initial vector */
-} ENCRYPTED_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- PRNG parameter type
-*/
-typedef struct {
- uint8_t prng_id; /**< algorithm index */
- uint16_t seq_len; /**< requested PRNG sequence length */
- uint8_t seed_len; /**< data length (must be aligned to 16 bytes) */
-} PRNG_PARAM_t;
-
-/**
- @ingroup MESSAGE
-
- Key type
-*/
-typedef struct {
- uint16_t key_len; /**< key length */
- uint8_t key[1495]; /**< raw key */
-} KEY_t;
-
-/**
- @ingroup MESSAGE
-
- Channel type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t key_id; /**< key index */
-} CHANNEL_t;
-
-/**
- @ingroup MESSAGE
-
- Status type
-*/
-typedef struct {
- uint8_t status; /**< status */
-} STATUS_t;
-
-/**
- @ingroup MESSAGE
-
- Raw data type
-*/
-typedef struct {
- uint16_t data_len; /**< payload length */
- uint8_t data[1495]; /**< raw payload */
-} RAW_DATA_t;
-
-__END_DECLS
-
-#endif /* __MESSAGE_H__ */
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : clear_data.c
- Projet : MERLIN
- Date of creation : 2025/04/07
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains definition of clear data type
-
- History :
- - initial version
-*/
-
-#include <stdint.h>
-
-#include "parse.h"
-
-#include "clear_data.h"
-
-int parse_clear_data (char *line, CLEAR_DATA_t *out)
-{
- BEGIN_PARSE (line)
- PARSE_INT ("CHANNEL", out->channel_id)
- PARSE_INT ("BYPASS", out->bypass)
- PARSE_ARRAY ("DATA", out->data)
- END_PARSE ()
-}
-
-int format_clear_data (CLEAR_DATA_t *in, char *buffer, int maxlen)
-{
- BEGIN_FORMAT (buffer, maxlen);
- FORMAT_INT ("CHANNEL", out->channel_id)
- FORMAT_INT ("BYPASS", out->bypass)
- FORMAT_ARRAY ("DATA", out->data)
- END_FORMAT ()
-}
-
-int serial_clear_data (CLEAR_DATA_t *in, uint8_t *buffer, int maxlen)
-{
- BEGIN_SERIAL (buffer, maxlen);
- SERIAL_INT (out->channel_id)
- SERIAL_INT (out->bypass)
- SERIAL_ARRAY (out->data)
- END_SERIAL ()
-}
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : clear_data.h
- Projet : MERLIN
- Date of creation : 2025/04/07
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains definition of clear data type
-
- History :
- - initial version
-*/
-
-#ifndef __CLEAR_DATA_H__
-#define __CLEAR_DATA_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGES
-
- Clear data type
-*/
-typedef struct {
- uint8_t channelid; /**< channel index */
- int bypass_len; /**< attached bypass message length */
- uint8_t bypass[255]; /**< attached bypass message */
- int data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
-} CLEAR_DATA_t;
-
-/**
- @ingroup MESSAGES
-
- Parse a string containing some clear data type fields
-
- @param line string to analyse
- @param out output structure
- @return 0 on success
-*/
-int parse_clear_data (char *line, CLEAR_DATA_t *out);
-
-/**
- @ingroup MESSAGES
-
- Format clear data type fields into a string
-
- @param in input structure
- @param buffer output string
- @param maxlen buffer limit
- @return 0 on success
-*/
-int format_clear_data (CLEAR_DATA_t *in, char *buffer, int maxlen);
-
-/**
- @ingroup MESSAGES
-
- Serial clear data type fields into a network stream
-
- @param in input structure
- @param buffer network stream
- @param maxlen buffer limit
- @return buffer length
-*/
-int serial_clear_data (CLEAR_DATA_t *in, uint8_t *buffer, int maxlen);
-
-/**
- @ingroup MESSAGES
-
- Deserial clear data type fields from a network stream
-
- @param buffer network stream
- @param maxlen buffer limit
- @param out output structure
- @return 0 on success
-*/
-int deserial_clear_data (uint8_t *buffer, int maxlen, CLEAR_DATA_t *out);
-
-__END_DECLS
-
-#endif /* __CLEAR_DATA_H__ */
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : message.h
- Projet : MERLIN
- Date of creation : 2025/04/03
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains message definition
-
- History :
- - initial version
-*/
-
-#ifndef __MESSAGE_H__
-#define __MESSAGE_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGE
-
- Clear data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
-} CLEAR_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- Encrypted data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
- uint8_t iv[12]; /**< initial vector */
-} ENCRYPTED_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- PRNG parameter type
-*/
-typedef struct {
- uint8_t prng_id; /**< algorithm index */
- uint16_t seq_len; /**< requested PRNG sequence length */
- uint8_t seed_len; /**< data length (must be aligned to 16 bytes) */
-} PRNG_PARAM_t;
-
-/**
- @ingroup MESSAGE
-
- Key type
-*/
-typedef struct {
- uint16_t key_len; /**< key length */
- uint8_t key[1495]; /**< raw key */
-} KEY_t;
-
-/**
- @ingroup MESSAGE
-
- Channel type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t key_id; /**< key index */
-} CHANNEL_t;
-
-/**
- @ingroup MESSAGE
-
- Status type
-*/
-typedef struct {
- uint8_t status; /**< status */
-} STATUS_t;
-
-/**
- @ingroup MESSAGE
-
- Raw data type
-*/
-typedef struct {
- uint16_t data_len; /**< payload length */
- uint8_t data[1495]; /**< raw payload */
-} RAW_DATA_t;
-
-__END_DECLS
-
-#endif /* __MESSAGE_H__ */
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : message.h
- Projet : MERLIN
- Date of creation : 2025/04/03
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains message definition
-
- History :
- - initial version
-*/
-
-#ifndef __MESSAGE_H__
-#define __MESSAGE_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGE
-
- Clear data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
-} CLEAR_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- Encrypted data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
- uint8_t iv[12]; /**< initial vector */
-} ENCRYPTED_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- PRNG parameter type
-*/
-typedef struct {
- uint8_t prng_id; /**< algorithm index */
- uint16_t seq_len; /**< requested PRNG sequence length */
- uint8_t seed_len; /**< data length (must be aligned to 16 bytes) */
-} PRNG_PARAM_t;
-
-/**
- @ingroup MESSAGE
-
- Key type
-*/
-typedef struct {
- uint16_t key_len; /**< key length */
- uint8_t key[1495]; /**< raw key */
-} KEY_t;
-
-/**
- @ingroup MESSAGE
-
- Channel type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t key_id; /**< key index */
-} CHANNEL_t;
-
-/**
- @ingroup MESSAGE
-
- Status type
-*/
-typedef struct {
- uint8_t status; /**< status */
-} STATUS_t;
-
-/**
- @ingroup MESSAGE
-
- Raw data type
-*/
-typedef struct {
- uint16_t data_len; /**< payload length */
- uint8_t data[1495]; /**< raw payload */
-} RAW_DATA_t;
-
-__END_DECLS
-
-#endif /* __MESSAGE_H__ */
-
-/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : message.h
+ Projet : MERLIN
+ Date of creation : 2025/04/03
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains message definition
+
+ History :
+ - initial version
+*/
+
+#ifndef __MESSAGE_H__
+#define __MESSAGE_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGE
+
+ Channel type
+*/
+typedef struct {
+ uint8_t channel_id; /**< channel index */
+ uint8_t key_id; /**< key index */
+} CHANNEL_t;
+
+__END_DECLS
+
+#endif /* __MESSAGE_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : clear_data.c
+ Projet : MERLIN
+ Date of creation : 2025/04/07
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains definition of clear data type
+
+ History :
+ - initial version
+*/
+
+#include <stdint.h>
+
+#include "parse.h"
+
+#include "clear_data.h"
+
+int parse_clear_data (char *line, CLEAR_DATA_t *out)
+{
+ BEGIN_PARSE (line)
+ PARSE_INT ("CHANNEL", out->channel_id)
+ PARSE_INT ("BYPASS", out->bypass)
+ PARSE_ARRAY ("DATA", out->data)
+ END_PARSE ()
+}
+
+int format_clear_data (CLEAR_DATA_t *in, char *buffer, int maxlen)
+{
+ BEGIN_FORMAT (buffer, maxlen);
+ FORMAT_INT ("CHANNEL", out->channel_id)
+ FORMAT_INT ("BYPASS", out->bypass)
+ FORMAT_ARRAY ("DATA", out->data)
+ END_FORMAT ()
+}
+
+int serial_clear_data (CLEAR_DATA_t *in, uint8_t *buffer, int maxlen)
+{
+ BEGIN_SERIAL (buffer, maxlen);
+ SERIAL_INT (out->channel_id)
+ SERIAL_INT (out->bypass)
+ SERIAL_ARRAY (out->data)
+ END_SERIAL ()
+}
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : clear_data.h
+ Projet : MERLIN
+ Date of creation : 2025/04/07
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains definition of clear data type
+
+ History :
+ - initial version
+*/
+
+#ifndef __CLEAR_DATA_H__
+#define __CLEAR_DATA_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGES
+
+ Clear data type
+*/
+typedef struct {
+ uint8_t channelid; /**< channel index */
+ int bypass_len; /**< attached bypass message length */
+ uint8_t bypass[255]; /**< attached bypass message */
+ int data_len; /**< data length (must be aligned to 16 bytes) */
+ uint8_t data[1472]; /**< data message */
+} CLEAR_DATA_t;
+
+/**
+ @ingroup MESSAGES
+
+ Parse a string containing some clear data type fields
+
+ @param line string to analyse
+ @param out output structure
+ @return 0 on success
+*/
+int parse_clear_data (char *line, CLEAR_DATA_t *out);
+
+/**
+ @ingroup MESSAGES
+
+ Format clear data type fields into a string
+
+ @param in input structure
+ @param buffer output string
+ @param maxlen buffer limit
+ @return 0 on success
+*/
+int format_clear_data (CLEAR_DATA_t *in, char *buffer, int maxlen);
+
+/**
+ @ingroup MESSAGES
+
+ Serial clear data type fields into a network stream
+
+ @param in input structure
+ @param buffer network stream
+ @param maxlen buffer limit
+ @return buffer length
+*/
+int serial_clear_data (CLEAR_DATA_t *in, uint8_t *buffer, int maxlen);
+
+/**
+ @ingroup MESSAGES
+
+ Deserial clear data type fields from a network stream
+
+ @param buffer network stream
+ @param maxlen buffer limit
+ @param out output structure
+ @return 0 on success
+*/
+int deserial_clear_data (uint8_t *buffer, int maxlen, CLEAR_DATA_t *out);
+
+__END_DECLS
+
+#endif /* __CLEAR_DATA_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : message.h
+ Projet : MERLIN
+ Date of creation : 2025/04/03
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains message definition
+
+ History :
+ - initial version
+*/
+
+#ifndef __MESSAGE_H__
+#define __MESSAGE_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGE
+
+ Encrypted data type
+*/
+typedef struct {
+ uint8_t channel_id; /**< channel index */
+ uint8_t bypass_len; /**< attached bypass message length */
+ uint8_t bypass_msg[255]; /**< attached bypass message */
+ uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
+ uint8_t data[1472]; /**< data message */
+ uint8_t iv[12]; /**< initial vector */
+} ENCRYPTED_DATA_t;
+
+__END_DECLS
+
+#endif /* __MESSAGE_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : message.h
+ Projet : MERLIN
+ Date of creation : 2025/04/03
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains message definition
+
+ History :
+ - initial version
+*/
+
+#ifndef __MESSAGE_H__
+#define __MESSAGE_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGE
+
+ Key type
+*/
+typedef struct {
+ uint16_t key_len; /**< key length */
+ uint8_t key[1495]; /**< raw key */
+} KEY_t;
+
+__END_DECLS
+
+#endif /* __MESSAGE_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : message.h
+ Projet : MERLIN
+ Date of creation : 2025/04/03
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains message definition
+
+ History :
+ - initial version
+*/
+
+#ifndef __MESSAGE_H__
+#define __MESSAGE_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGE
+
+ PRNG parameter type
+*/
+typedef struct {
+ uint8_t prng_id; /**< algorithm index */
+ uint16_t seq_len; /**< requested PRNG sequence length */
+ uint8_t seed_len; /**< data length (must be aligned to 16 bytes) */
+} PRNG_PARAM_t;
+
+__END_DECLS
+
+#endif /* __MESSAGE_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : raw_data.c
+ Projet : MERLIN
+ Date of creation : 2025/04/07
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains definition of raw data type
+
+ History :
+ - initial version
+*/
+
+#include <stdint.h>
+
+#include "parse.h"
+
+#include "raw_data.h"
+
+int parse_raw_data (char *line, RAW_DATA_t *out)
+{
+ BEGIN_PARSE (line)
+ PARSE_ARRAY ("DATA", out->data)
+ END_PARSE ()
+}
+
+int format_raw_data (RAW_DATA_t *in, char *buffer, int maxlen)
+{
+ BEGIN_FORMAT (buffer, maxlen)
+ FORMAT_ARRAY ("DATA", in->data)
+ END_FORMAT ()
+}
+
+int serial_raw_data (RAW_DATA_t *in, uint8_t *buffer, int maxlen)
+{
+ BEGIN_SERIAL (buffer, maxlen)
+ SERIAL_ARRAY ("DATA", in->data)
+ END_SERIAL ()
+}
+
+int deserial_raw_data (uint8_t *buffer, int maxlen, RAW_DATA_t *out)
+{
+ BEGIN_DESERIAL (buffer, maxlen)
+ DESERIAL_ARRAY ("DATA", out->data)
+ END_DESERIAL ()
+}
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : raw_data.h
+ Projet : MERLIN
+ Date of creation : 2025/04/07
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains definition of raw data type
+
+ History :
+ - initial version
+*/
+
+#ifndef __RAW_DATA_H__
+#define __RAW_DATA_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGES
+
+ Raw data type
+*/
+typedef struct {
+ int data_len; /**< data length*/
+ uint8_t data[1496]; /**< data message */
+} RAW_DATA_t;
+
+/**
+ @ingroup MESSAGES
+
+ Parse a string containing some raw data type fields
+
+ @param line string to analyse
+ @param out output structure
+ @return 0 on success
+*/
+int parse_raw_data (char *line, RAW_DATA_t *out);
+
+/**
+ @ingroup MESSAGES
+
+ Format raw data type fields into a string
+
+ @param in input structure
+ @param buffer output string
+ @param maxlen buffer limit
+ @return 0 on success
+*/
+int format_raw_data (RAW_DATA_t *in, char *buffer, int maxlen);
+
+/**
+ @ingroup MESSAGES
+
+ Serialize raw data type fields into a network stream
+
+ @param in input structure
+ @param buffer network stream
+ @param maxlen buffer limit
+ @return buffer length
+*/
+int serial_raw_data (RAW_DATA_t *in, uint8_t *buffer, int maxlen);
+
+/**
+ @ingroup MESSAGES
+
+ Deserial raw data type fields from a network stream
+
+ @param buffer network stream
+ @param maxlen buffer limit
+ @param out output structure
+ @return 0 on success
+*/
+int deserial_raw_data (uint8_t *buffer, int maxlen, RAW_DATA_t *out);
+
+__END_DECLS
+
+#endif /* __RAW_DATA_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
--- /dev/null
+/*
+ File name : message.h
+ Projet : MERLIN
+ Date of creation : 2025/04/03
+ Version : 1.0
+ Copyright : Thales SIX
+ Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
+
+ Description : This file contains message definition
+
+ History :
+ - initial version
+*/
+
+#ifndef __MESSAGE_H__
+#define __MESSAGE_H__
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/**
+ @ingroup MESSAGE
+
+ Status type
+*/
+typedef struct {
+ uint8_t status; /**< status */
+} STATUS_t;
+
+__END_DECLS
+
+#endif /* __MESSAGE_H__ */
+
+/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : message.h
- Projet : MERLIN
- Date of creation : 2025/04/03
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains message definition
-
- History :
- - initial version
-*/
-
-#ifndef __MESSAGE_H__
-#define __MESSAGE_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGE
-
- Clear data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
-} CLEAR_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- Encrypted data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
- uint8_t iv[12]; /**< initial vector */
-} ENCRYPTED_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- PRNG parameter type
-*/
-typedef struct {
- uint8_t prng_id; /**< algorithm index */
- uint16_t seq_len; /**< requested PRNG sequence length */
- uint8_t seed_len; /**< data length (must be aligned to 16 bytes) */
-} PRNG_PARAM_t;
-
-/**
- @ingroup MESSAGE
-
- Key type
-*/
-typedef struct {
- uint16_t key_len; /**< key length */
- uint8_t key[1495]; /**< raw key */
-} KEY_t;
-
-/**
- @ingroup MESSAGE
-
- Channel type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t key_id; /**< key index */
-} CHANNEL_t;
-
-/**
- @ingroup MESSAGE
-
- Status type
-*/
-typedef struct {
- uint8_t status; /**< status */
-} STATUS_t;
-
-/**
- @ingroup MESSAGE
-
- Raw data type
-*/
-typedef struct {
- uint16_t data_len; /**< payload length */
- uint8_t data[1495]; /**< raw payload */
-} RAW_DATA_t;
-
-__END_DECLS
-
-#endif /* __MESSAGE_H__ */
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : raw_data.c
- Projet : MERLIN
- Date of creation : 2025/04/07
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains definition of raw data type
-
- History :
- - initial version
-*/
-
-#include <stdint.h>
-
-#include "parse.h"
-
-#include "raw_data.h"
-
-int parse_raw_data (char *line, RAW_DATA_t *out)
-{
- BEGIN_PARSE (line)
- PARSE_ARRAY ("DATA", out->data)
- END_PARSE ()
-}
-
-int format_raw_data (RAW_DATA_t *in, char *buffer, int maxlen)
-{
- BEGIN_FORMAT (buffer, maxlen)
- FORMAT_ARRAY ("DATA", in->data)
- END_FORMAT ()
-}
-
-int serial_raw_data (RAW_DATA_t *in, uint8_t *buffer, int maxlen)
-{
- BEGIN_SERIAL (buffer, maxlen)
- SERIAL_ARRAY ("DATA", in->data)
- END_SERIAL ()
-}
-
-int deserial_raw_data (uint8_t *buffer, int maxlen, RAW_DATA_t *out)
-{
- BEGIN_DESERIAL (buffer, maxlen)
- DESERIAL_ARRAY ("DATA", out->data)
- END_DESERIAL ()
-}
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : raw_data.h
- Projet : MERLIN
- Date of creation : 2025/04/07
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains definition of raw data type
-
- History :
- - initial version
-*/
-
-#ifndef __RAW_DATA_H__
-#define __RAW_DATA_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGES
-
- Raw data type
-*/
-typedef struct {
- int data_len; /**< data length*/
- uint8_t data[1496]; /**< data message */
-} RAW_DATA_t;
-
-/**
- @ingroup MESSAGES
-
- Parse a string containing some raw data type fields
-
- @param line string to analyse
- @param out output structure
- @return 0 on success
-*/
-int parse_raw_data (char *line, RAW_DATA_t *out);
-
-/**
- @ingroup MESSAGES
-
- Format raw data type fields into a string
-
- @param in input structure
- @param buffer output string
- @param maxlen buffer limit
- @return 0 on success
-*/
-int format_raw_data (RAW_DATA_t *in, char *buffer, int maxlen);
-
-/**
- @ingroup MESSAGES
-
- Serialize raw data type fields into a network stream
-
- @param in input structure
- @param buffer network stream
- @param maxlen buffer limit
- @return buffer length
-*/
-int serial_raw_data (RAW_DATA_t *in, uint8_t *buffer, int maxlen);
-
-/**
- @ingroup MESSAGES
-
- Deserial raw data type fields from a network stream
-
- @param buffer network stream
- @param maxlen buffer limit
- @param out output structure
- @return 0 on success
-*/
-int deserial_raw_data (uint8_t *buffer, int maxlen, RAW_DATA_t *out);
-
-__END_DECLS
-
-#endif /* __RAW_DATA_H__ */
-
-/* vim: set ts=4 sw=4 si et: */
+++ /dev/null
-/*
- File name : message.h
- Projet : MERLIN
- Date of creation : 2025/04/03
- Version : 1.0
- Copyright : Thales SIX
- Author : Laurent Mazet <laurent.mazet@thalesgroup.com>
-
- Description : This file contains message definition
-
- History :
- - initial version
-*/
-
-#ifndef __MESSAGE_H__
-#define __MESSAGE_H__
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/**
- @ingroup MESSAGE
-
- Clear data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
-} CLEAR_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- Encrypted data type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t bypass_len; /**< attached bypass message length */
- uint8_t bypass_msg[255]; /**< attached bypass message */
- uint8_t data_len; /**< data length (must be aligned to 16 bytes) */
- uint8_t data[1472]; /**< data message */
- uint8_t iv[12]; /**< initial vector */
-} ENCRYPTED_DATA_t;
-
-/**
- @ingroup MESSAGE
-
- PRNG parameter type
-*/
-typedef struct {
- uint8_t prng_id; /**< algorithm index */
- uint16_t seq_len; /**< requested PRNG sequence length */
- uint8_t seed_len; /**< data length (must be aligned to 16 bytes) */
-} PRNG_PARAM_t;
-
-/**
- @ingroup MESSAGE
-
- Key type
-*/
-typedef struct {
- uint16_t key_len; /**< key length */
- uint8_t key[1495]; /**< raw key */
-} KEY_t;
-
-/**
- @ingroup MESSAGE
-
- Channel type
-*/
-typedef struct {
- uint8_t channel_id; /**< channel index */
- uint8_t key_id; /**< key index */
-} CHANNEL_t;
-
-/**
- @ingroup MESSAGE
-
- Status type
-*/
-typedef struct {
- uint8_t status; /**< status */
-} STATUS_t;
-
-/**
- @ingroup MESSAGE
-
- Raw data type
-*/
-typedef struct {
- uint16_t data_len; /**< payload length */
- uint8_t data[1495]; /**< raw payload */
-} RAW_DATA_t;
-
-__END_DECLS
-
-#endif /* __MESSAGE_H__ */
-
-/* vim: set ts=4 sw=4 si et: */