]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - src_frescan/frescan_bwres_messages.h
99bd6399286edc414b2bafcc23867119198115da
[frescor/fna.git] / src_frescan / frescan_bwres_messages.h
1 /*!
2  * @file frescan_bwres_messages.h
3  *
4  * @brief FRESCAN bandwidth reservation layer: negotiation messages formating
5  *
6  * This module contains the data types that define the FRESCAN negotiation
7  * message format and operations to convert them into or from negotiation
8  * requests
9  *
10  * @version 0.01
11  *
12  * @date 2-Apr-2008
13  *
14  * @author Daniel Sangorrin <daniel.sangorrin@unican.es>
15  *
16  * @license
17  *
18  * -----------------------------------------------------------------------
19  *  Copyright (C) 2006 - 2008 FRESCOR consortium partners:
20  *
21  *    Universidad de Cantabria,              SPAIN
22  *    University of York,                    UK
23  *    Scuola Superiore Sant'Anna,            ITALY
24  *    Kaiserslautern University,             GERMANY
25  *    Univ. Politécnica  Valencia,           SPAIN
26  *    Czech Technical University in Prague,  CZECH REPUBLIC
27  *    ENEA                                   SWEDEN
28  *    Thales Communication S.A.              FRANCE
29  *    Visual Tools S.A.                      SPAIN
30  *    Rapita Systems Ltd                     UK
31  *    Evidence                               ITALY
32  *
33  *    See http://www.frescor.org for a link to partners' websites
34  *
35  *           FRESCOR project (FP6/2005/IST/5-034026) is funded
36  *        in part by the European Union Sixth Framework Programme
37  *        The European Union is not liable of any use that may be
38  *        made of this code.
39  *
40  *  This file is part of FRESCAN
41  *
42  *  FRESCAN is free software; you can  redistribute it and/or  modify
43  *  it under the terms of  the GNU General Public License as published by
44  *  the Free Software Foundation;  either  version 2, or (at  your option)
45  *  any later version.
46  *
47  *  FRESCAN  is distributed  in  the hope  that  it  will  be useful,  but
48  *  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
49  *  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
50  *  General Public License for more details.
51  *
52  *  You should have  received a  copy of  the  GNU  General Public License
53  *  distributed  with  FRESCAN;  see file COPYING.   If not,  write to the
54  *  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
55  *  02111-1307, USA.
56  *
57  * As a special exception, including FRESCAN header files in a file,
58  * instantiating FRESCAN generics or templates, or linking other files
59  * with FRESCAN objects to produce an executable application, does not
60  * by itself cause the resulting executable application to be covered
61  * by the GNU General Public License. This exception does not
62  * however invalidate any other reasons why the executable file might be
63  * covered by the GNU Public License.
64  * -----------------------------------------------------------------------
65  *
66  */
67
68 #ifndef _FRESCAN_BWRES_MESSAGES_H_
69 #define _FRESCAN_BWRES_MESSAGES_H_
70
71 #include <stdint.h>
72 #include "frescan_bwres_requests.h"
73 #include "frescan_data.h"
74
75 /**
76  * frescan_messages_init() - initialization function for the module
77  */
78
79 extern int frescan_messages_init(frescan_network_t net);
80
81 /**
82  * frescan_messages_send_request()
83  *
84  * this function converts a request with the necessary data into a message
85  * and sends it.
86  *
87  * @req_data: the request to be sent (NOTE: the network is in req_data)
88  *
89  */
90
91 extern int frescan_messages_send_request(const frescan_request_data_t *req_data);
92
93 /**
94  * frescan_messages_recv_request()
95  *
96  * this function BLOCKS the calling thread until receives a message
97  * and transforms it into a request.
98  *
99  * @net: network from where we want to wait messages
100  * @req: the request received (it must be freed)
101  *
102  */
103
104 extern int frescan_messages_recv_request(frescan_network_t    net,
105                                          frescan_request_id_t *req);
106
107 #endif // _FRESCAN_BWRES_MESSAGES_H_