]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - src_frescan/frescan_negotiation_messages.h
net
[frescor/fna.git] / src_frescan / frescan_negotiation_messages.h
1 /*!
2  * @file frescan_negotiation_messages.h
3  *
4  * @brief FRESCAN negotiation messages format and operations
5  *
6  * This module contains the data types that define the FRESCAN negotiation
7  * message format and operations
8  *
9  * @version 0.01
10  *
11  * @date 2-Apr-2008
12  *
13  * @author Daniel Sangorrin <daniel.sangorrin@unican.es>
14  *
15  */
16
17 #ifndef _FRESCAN_NEGOTIATION_MESSAGES_H_
18 #define _FRESCAN_NEGOTIATION_MESSAGES_H_
19
20 #include <stdint.h>
21 #include "frescan_requests_queue.h"
22 #include "frescan_data.h"
23
24 extern int frescan_neg_message_create(uint8_t *msg,
25                                       frescan_request_id_t id,
26                                       const frescan_contract_t *contract);
27
28 extern int frescan_repneg_message_create(uint8_t *msg,
29                                          frescan_request_id_t id,
30                                          int accepted,
31                                          frescan_server_params_t *params);
32
33 extern int frescan_message_parse(frescan_network_t net,
34                                  const uint8_t *msg,
35                                  size_t size,
36                                  frescan_node_t from);
37
38 #endif // _FRESCAN_NEGOTIATION_MESSAGES_H_