#ifndef _FNA_H_
#define _FNA_H_
-#include "frsh_core_types.h" /* for frsh_resource_id_t, frsh_contract_t, etc */
-#include "fna_error.h" /* for ERROR constants */
-#include <stdint.h> /* for uint32_t, UINT32_MAX */
+/* for frsh_resource_id_t, frsh_contract_t, etc */
+#include "frsh_core_types.h"
+/* for frsh_network_address_t, frsh_stream_id_t */
+#include "frsh_distributed_types.h"
+/* for timespec */
+#include <time.h>
+/* for ERROR constants */
+// #include "fna_error.h"
+/* for uint32_t, UINT32_MAX */
+#include <stdint.h>
/**
* @defgroup fna FNA Private Interface
* @{
**/
+typedef frsh_send_endpoint_t fna_send_endpoint_t;
+
/**
* fna_send_sync()
*
#ifndef _FRSH_FNA_H_
#define _FRSH_FNA_H_
-#define RTEP
+/* for frsh_resource_id_t */
+#include "frsh_core_types.h"
+/* for frsh_network_address_t, frsh_stream_id_t */
+#include "frsh_distributed_types.h"
+/* for timespec */
+#include <time.h>
+/* for bool */
+#include <stdbool.h>
+
+#ifdef RTEP
+/* for rtep_priority_t, rtep_channel_t, rtep_station_id_t,
+rtep_server_id_t, rtep_mutex_id_t, rtep_budget_t */
+ #include "rtep.h"
+#elif OTHER
+ ...
+#endif
/**
* @defgroup frshfna FNA Public Interface
*
**/
-//////////////////////////////////////////////////////////////////////
-// MAPPING FUNCTIONS
-//////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+// MAPPING FUNCTIONS
+////////////////////////////////////////////////////////////////////
/**
* @defgroup frshfnamap FNA Mapping Functions
#ifdef RTEP
int frsh_rtep_map_network_address
(const frsh_resource_id_t resource_id,
- const rtep_network_address_t *in_address,
+ const rtep_station_id_t in_address,
frsh_network_address_t *out_address);
#elif OTHER
...
#ifdef RTEP
int frsh_rtep_map_stream_id
(const frsh_resource_id_t resource_id,
- const rtep_channel_t *in_stream,
+ const rtep_channel_t in_stream,
frsh_stream_id_t *out_stream);
#elif OTHER
...
* FNA_ERR_NOT_INITIALIZED: if the protocol is not initialized \n
* FNA_ERR_RESOURCE_ID_INVALID: if we are not in charge of resource_id \n
* FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
+ * FNA_ERR_REJECTED_CONTRACT : if the renegotiation fails \n
*
**/
#ifdef RTEP
int frsh_rtep_negotiation_messages_vres_renegotiate
(const frsh_resource_id_t resource_id,
- const struct timespec *period,
- bool *accepted);
+ const struct timespec *period);
#elif OTHER
...
#endif