#define _FRESCAN_NEGOTIATION_MESSAGES_H_
#include <stdint.h>
-#include "frescan_requests.h"
+#include "frescan_bwres_requests.h"
#include "frescan_data.h"
-extern int frescan_request_to_message(frescan_request_id_t id, // in
- uint8_t *msg); // out
+/**
+ * frescan_request_to_message() - converts a request into a network message
+ *
+ * this function converts a request with the necessary data into a message
+ * that can be sent through the network.
+ *
+ * @req_data: the request data to fill the message bytes (in)
+ * @msg: buffer with the bytes that will be sent to the network (out)
+ *
+ */
+
+extern int frescan_request_to_message(const frescan_request_data_t *req_data,
+ uint8_t *msg);
+
+/**
+ * frescan_message_to_request() - converts a network message into a request
+ *
+ * this function is the opposite to the previous one. It will be used by
+ * the acceptor threads to transform messages received from the network
+ * into requests.
+ *
+ * @msg: buffer with the bytes received from the network (in)
+ * @req_data: the request data to fill from the message bytes (out)
+ *
+ */
-extern int frescan_message_to_request(const uint8_t *msg, // in
- frescan_request_id_t id); // in out
+extern int frescan_message_to_request(const uint8_t *msg,
+ frescan_request_data_t *req_data);
#endif // _FRESCAN_NEGOTIATION_MESSAGES_H_