2 * @file frescan_bwres_messages.h
4 * @brief FRESCAN bandwidth reservation layer: negotiation messages formating
6 * This module contains the data types that define the FRESCAN negotiation
7 * message format and operations to convert them into or from negotiation
14 * @author Daniel Sangorrin <daniel.sangorrin@unican.es>
18 #ifndef _FRESCAN_BWRES_MESSAGES_H_
19 #define _FRESCAN_BWRES_MESSAGES_H_
22 #include "frescan_bwres_requests.h"
23 #include "frescan_data.h"
26 * frescan_messages_init() - initialization function for the module
29 extern int frescan_messages_init(frescan_network_t net);
32 * frescan_messages_send_request()
34 * this function converts a request with the necessary data into a message
37 * @req_data: the request to be sent (NOTE: the network is in req_data)
41 extern int frescan_messages_send_request(const frescan_request_data_t *req_data);
44 * frescan_messages_recv_request()
46 * this function BLOCKS the calling thread until receives a message
47 * and transforms it into a request.
49 * @net: network from where we want to wait messages
50 * @req: the request received (it must be freed)
54 extern int frescan_messages_recv_request(frescan_network_t net,
55 frescan_request_id_t *req);
57 #endif // _FRESCAN_BWRES_MESSAGES_H_