]> rtime.felk.cvut.cz Git - frescor/fna.git/blobdiff - src_rtep/rtep_fna_c.c
restore the configuration flags and add a CONNECTED flag
[frescor/fna.git] / src_rtep / rtep_fna_c.c
index e760fdf7b45c9eeee70d9b95d29e86320ed1df3c..a208a9afa70d0cc00b5b27f6e739caf7edc5699f 100644 (file)
@@ -67,8 +67,7 @@
 #include "rtep.h" // for rtep_adainit, rtep_valid_multicast_id, ..
 #include "rtep_bandwith_reservation.h" // for rtep_bwres_*
 #include "rtep_fna.h" // function prototypes
-
-#include "frsh_freelist.h"
+#include "fadt_freelist.h"
 
 #if 0
 #include <stdio.h>
@@ -79,7 +78,7 @@
 
 // TODO: add a mutex for concurrent access if necessary
 static rtep_bwres_vres_t rtep_vres_list[MAX_N_RTEP_BWRES_VRES];
-static frsh_freelist_t rtep_vres_freelist;
+static fadt_freelist_t rtep_vres_freelist;
 
 //////////////////////////////////////////////////////////////////////
 //           INITIALIZATION
@@ -104,18 +103,22 @@ static frsh_freelist_t rtep_vres_freelist;
  **/
 int rtep_fna_init(const frsh_resource_id_t resource_id)
 {
-    int err = 0;
+        int err = 0;
+
+        DEBUG("calling rtep_adainit\n");
 
-    DEBUG("starting rtep\n");
+        // init Ada bindings
+        rtep_adainit();
 
-    // init Ada bindings
-    rtep_adainit();
+        DEBUG("calling freelist_init\n");
 
-    // initialize the freelist to handle the rtep_vres
-    err = frsh_freelist_init(&rtep_vres_freelist, MAX_N_RTEP_BWRES_VRES);
-    if (err != 0) return -1;
+        // initialize the freelist to handle the rtep_vres
+        err = fadt_freelist_init(&rtep_vres_freelist, NULL, MAX_N_RTEP_BWRES_VRES);
+        if (err != 0) return -1;
 
-    return rtep_bwres_init();
+        DEBUG("calling rtep_bwres_init\n");
+
+        return rtep_bwres_init();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -156,43 +159,46 @@ int rtep_fna_init(const frsh_resource_id_t resource_id)
  *
  **/
 int rtep_fna_contract_negotiate
-      (const frsh_resource_id_t resource_id,
-       const frsh_contract_t *contract,
-       fna_vres_id_t *vres)
+                (const frsh_resource_id_t resource_id,
+                 const frsh_contract_t *contract,
+                 fna_vres_id_t *vres)
 {
-    rtep_bwres_contract_t rtep_contract;
-    int accepted;
-    int pos;
-
-    // convert FRSH contract to RTEP BWRES contract
-    rtep_contract.period_max = contract->period_max;
-    rtep_contract.deadline = contract->deadline;
-    rtep_contract.prio = contract->preemption_level;
-    // in RTEP BWRES, budget is given in number of packets. We do a little trick
-    // in the function bytes_to_network_budget to use a the field tv_sec from
-    // the timespec in frsh_contract to store the budget in bytes directly
-    rtep_contract.budget_min = contract->budget_min.tv_sec;
-
-    // allocate a free internal vres.
-    pos = frsh_freelist_alloc(&rtep_vres_freelist);
-
-    if (pos < 0) {
-        return -1;
-    }
-
-    DEBUG("calling rtep_bwres_contract_negotiate\n");
-    // negotiate the contract
-    accepted = rtep_bwres_contract_negotiate
-                    (&rtep_contract, &rtep_vres_list[pos]);
-
-    // if accepted assign the vres, if not deallocate the rtep_vres
-    if (accepted == 0) {
-        *vres = (fna_vres_id_t)pos;
-    } else {
-        frsh_freelist_free(&rtep_vres_freelist, pos);
-    }
-
-    return accepted;
+        rtep_bwres_contract_t rtep_contract;
+        int accepted;
+        int pos;
+
+         // convert FRSH contract to RTEP BWRES contract
+        rtep_contract.period_max = contract->period_max;
+        rtep_contract.deadline = contract->deadline;
+        rtep_contract.prio = contract->preemption_level;
+        // in RTEP BWRES, budget is given in number of packets. We do a little trick
+        // in the function bytes_to_network_budget to use a the field tv_sec from
+        // the timespec in frsh_contract to store the budget in bytes directly
+        rtep_contract.budget_min = contract->budget_min.tv_sec;
+
+        // allocate a free internal vres.
+        pos = fadt_freelist_alloc(&rtep_vres_freelist);
+
+        if (pos < 0) {
+                DEBUG("not enough resources\n");
+                return -1;
+        }
+
+        DEBUG("calling rtep_bwres_contract_negotiate\n");
+        // negotiate the contract
+        accepted = rtep_bwres_contract_negotiate
+                        (&rtep_contract, &rtep_vres_list[pos]);
+
+        // if accepted assign the vres, if not deallocate the rtep_vres
+        if (accepted == 0) {
+                DEBUG("contract accepted\n");
+                *vres = (fna_vres_id_t)pos;
+        } else {
+                DEBUG("contract not accepted\n");
+                fadt_freelist_free(&rtep_vres_freelist, pos);
+        }
+
+        return accepted;
 }
 
 /**
@@ -226,28 +232,28 @@ int rtep_fna_contract_negotiate
  *
  **/
 int rtep_fna_contract_renegotiate_sync
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       const frsh_contract_t *new_contract)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 const frsh_contract_t *new_contract)
 {
-    rtep_bwres_contract_t rtep_contract;
-    int accepted;
-    int pos = (int) vres;
-
-    // convert FRSH contract to RTEP BWRES contract
-    rtep_contract.period_max = new_contract->period_max;
-    rtep_contract.deadline = new_contract->deadline;
-    rtep_contract.prio = new_contract->preemption_level;
-    // in RTEP BWRES, budget is given in number of packets. We do a little trick
-    // in the function bytes_to_network_budget to use a the field tv_sec from
-    // the timespec in frsh_contract to store the budget in bytes directly
-    rtep_contract.budget_min = new_contract->budget_min.tv_sec;
-
-    // renegotiate the contract
-    accepted = rtep_bwres_contract_renegotiate_sync
-            (&rtep_vres_list[pos], &rtep_contract);
-
-    return accepted;
+        rtep_bwres_contract_t rtep_contract;
+        int accepted;
+        int pos = (int) vres;
+
+        // convert FRSH contract to RTEP BWRES contract
+        rtep_contract.period_max = new_contract->period_max;
+        rtep_contract.deadline = new_contract->deadline;
+        rtep_contract.prio = new_contract->preemption_level;
+        // in RTEP BWRES, budget is given in number of packets. We do a little trick
+        // in the function bytes_to_network_budget to use a the field tv_sec from
+        // the timespec in frsh_contract to store the budget in bytes directly
+        rtep_contract.budget_min = new_contract->budget_min.tv_sec;
+
+        // renegotiate the contract
+        accepted = rtep_bwres_contract_renegotiate_sync
+                        (&rtep_vres_list[pos], &rtep_contract);
+
+        return accepted;
 }
 
 /**
@@ -292,13 +298,13 @@ int rtep_fna_contract_renegotiate_sync
  *
  **/
 int rtep_fna_contract_renegotiate_async
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       const frsh_contract_t *new_contract,
-       frsh_signal_t signal_to_notify,
-       frsh_signal_info_t signal_info)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 const frsh_contract_t *new_contract,
+                 frsh_signal_t signal_to_notify,
+                 frsh_signal_info_t signal_info)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -330,11 +336,11 @@ int rtep_fna_contract_renegotiate_async
  *
  **/
 int rtep_fna_vres_get_renegotiation_status
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       frsh_renegotiation_status_t *renegotiation_status)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 frsh_renegotiation_status_t *renegotiation_status)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -359,21 +365,22 @@ int rtep_fna_vres_get_renegotiation_status
  *
  **/
 int rtep_fna_vres_destroy
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres)
 {
-    int err = 0;
-    int pos = (int) vres;
+        int err = 0;
+        int pos = (int) vres;
 
-    // cancel de negotiated contract (the function spread results among nodes)
-    err = rtep_bwres_vres_destroy (&rtep_vres_list[pos]);
-    if (err != 0) return -1;
+        // cancel de negotiated contract (the function spread results
+        // among nodes)
+        err = rtep_bwres_vres_destroy (&rtep_vres_list[pos]);
+        if (err != 0) return -1;
 
-    // free the element in the rtep_vres list
-    err = frsh_freelist_free(&rtep_vres_freelist, pos);
-    if (err != 0) return -1;
+        // free the element in the rtep_vres list
+        err = fadt_freelist_free(&rtep_vres_freelist, pos);
+        if (err != 0) return -1;
 
-    return 0;
+        return 0;
 }
 
 /**
@@ -398,11 +405,11 @@ int rtep_fna_vres_destroy
  *
  **/
 int rtep_fna_vres_get_contract
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       frsh_contract_t *contract)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 frsh_contract_t *contract)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -426,11 +433,11 @@ int rtep_fna_vres_get_contract
  *
  **/
 int rtep_fna_vres_get_usage
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       struct timespec *usage)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 struct timespec *usage)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -455,11 +462,11 @@ int rtep_fna_vres_get_usage
  *
  **/
 int rtep_fna_vres_get_remaining_budget
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       struct timespec *remaining_budget)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 struct timespec *remaining_budget)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -485,12 +492,12 @@ int rtep_fna_vres_get_remaining_budget
  *
  **/
 int rtep_fna_vres_get_budget_and_period
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       struct timespec *budget,
-       struct timespec *period)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 struct timespec *budget,
+                 struct timespec *period)
 {
-   return 0;
+        return 0;
 }
 
 /*@}*/
@@ -533,11 +540,11 @@ int rtep_fna_vres_get_budget_and_period
  *
  **/
 int rtep_fna_resource_get_capacity
-      (const frsh_resource_id_t resource_id,
-       const int importance,
-       uint32_t *capacity)
+                (const frsh_resource_id_t resource_id,
+                 const int importance,
+                 uint32_t *capacity)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -560,11 +567,11 @@ int rtep_fna_resource_get_capacity
  *
  **/
 int rtep_fna_resource_get_total_weight
-      (const frsh_resource_id_t resource_id,
-       const int importance,
-       int *total_weight)
+                (const frsh_resource_id_t resource_id,
+                 const int importance,
+                 int *total_weight)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -593,12 +600,12 @@ int rtep_fna_resource_get_total_weight
  *
  **/
 int rtep_fna_vres_decrease_capacity
-      (const frsh_resource_id_t resource_id,
-       const fna_vres_id_t vres,
-       const struct timespec new_budget,
-       const struct timespec new_period)
+                (const frsh_resource_id_t resource_id,
+                 const fna_vres_id_t vres,
+                 const struct timespec new_budget,
+                 const struct timespec new_period)
 {
-   return 0;
+        return 0;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -629,11 +636,23 @@ int rtep_fna_vres_decrease_capacity
  *
  **/
 int rtep_fna_send_sync
-   (const fna_endpoint_data_t *endpoint,
-    const void *msg,
-    const size_t size)
+                (const fna_endpoint_data_t *endpoint,
+                 const void *msg,
+                 const size_t size)
 {
-   return 0;
+        DEBUG("dest: %d, chan: %d, size: %d, server: %d\n",
+              endpoint->destination, endpoint->stream_id, size,
+              rtep_vres_list[endpoint->vres].server_id);
+
+        // TODO: check errors
+        rtep_server_send_info
+                        ((rtep_station_id_t) endpoint->destination,
+                         (rtep_channel_t) endpoint->stream_id,
+                         (uint8_t *) msg,
+                         size,
+                         rtep_vres_list[endpoint->vres].server_id,
+                         1); // blocking
+        return 0;
 }
 
 /**
@@ -661,23 +680,23 @@ int rtep_fna_send_sync
  *
  **/
 int rtep_fna_send_async
-   (const fna_endpoint_data_t *endpoint,
-    const void *msg,
-    const size_t size)
+                (const fna_endpoint_data_t *endpoint,
+                 const void *msg,
+                 const size_t size)
 {
-    DEBUG("dest: %d, chan: %d, size: %d, server: %d\n",
-          endpoint->destination, endpoint->stream_id, size,
-          rtep_vres_list[endpoint->vres].server_id);
-
-    // TODO: check errors
-    rtep_server_send_info
-            ((rtep_station_id_t) endpoint->destination,
-             (rtep_channel_t) endpoint->stream_id,
-             (uint8_t *) msg,
-             size,
-             rtep_vres_list[endpoint->vres].server_id,
-             0); // not blocking
-    return 0;
+        DEBUG("dest: %d, chan: %d, size: %d, server: %d\n",
+              endpoint->destination, endpoint->stream_id, size,
+              rtep_vres_list[endpoint->vres].server_id);
+
+        // TODO: check errors
+        rtep_server_send_info
+                        ((rtep_station_id_t) endpoint->destination,
+                          (rtep_channel_t) endpoint->stream_id,
+                          (uint8_t *) msg,
+                          size,
+                          rtep_vres_list[endpoint->vres].server_id,
+                          0); // not blocking
+        return 0;
 }
 
 /**
@@ -718,30 +737,31 @@ int rtep_fna_send_async
  *
  **/
 int rtep_fna_receive_sync
-      (const fna_endpoint_data_t *endpoint,
-       void *buffer,
-       const size_t buffer_size,
-       size_t *received_bytes,
-       frsh_network_address_t *from)
+                (const fna_endpoint_data_t *endpoint,
+                 void *buffer,
+                 const size_t buffer_size,
+                 size_t *received_bytes,
+                 frsh_network_address_t *from)
 {
-    rtep_priority_t prio;
-    rtep_station_id_t rtep_from;
-    rtep_channel_t chan = (rtep_channel_t) endpoint->stream_id;
+        rtep_priority_t prio;
+        rtep_station_id_t rtep_from;
+        rtep_channel_t chan = (rtep_channel_t) endpoint->stream_id;
 
-    // TODO: checks for errors
-    rtep_recv_info
-            (&rtep_from,
-             chan,
-             (uint8_t *) buffer,
-             buffer_size,
-             received_bytes,
-             &prio);
+        // TODO: checks for errors
+        rtep_recv_info
+                        (&rtep_from,
+                          chan,
+                          (uint8_t *) buffer,
+                          buffer_size,
+                          received_bytes,
+                          &prio);
 
-    *from = rtep_from;
+        *from = rtep_from;
 
-    DEBUG(" %u bytes, from %u, prio %u\n", *received_bytes, rtep_from, prio);
+        DEBUG(" %u bytes, from %u, prio %u\n",
+              *received_bytes, rtep_from, prio);
 
-    return 0;
+        return 0;
 }
 
 /**
@@ -770,13 +790,13 @@ int rtep_fna_receive_sync
  *
  **/
 int rtep_fna_receive_async
-      (const fna_endpoint_data_t *endpoint,
-       void *buffer,
-       const size_t buffer_size,
-       size_t *received_bytes,
-       frsh_network_address_t *from)
+                (const fna_endpoint_data_t *endpoint,
+                 void *buffer,
+                 const size_t buffer_size,
+                 size_t *received_bytes,
+                 frsh_network_address_t *from)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -800,12 +820,12 @@ int rtep_fna_receive_async
  *
  **/
 int rtep_fna_send_endpoint_get_status
-   (const fna_endpoint_data_t *endpoint,
-    int *number_of_pending_messages,
-    frsh_endpoint_network_status_t *network_status,
-    frsh_protocol_status_t *protocol_status)
+                (const fna_endpoint_data_t *endpoint,
+                 int *number_of_pending_messages,
+                 frsh_endpoint_network_status_t *network_status,
+                 frsh_protocol_status_t *protocol_status)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -827,9 +847,9 @@ int rtep_fna_send_endpoint_get_status
  *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
  **/
 int rtep_fna_receive_endpoint_created
-      (fna_endpoint_data_t *endpoint)
+                (fna_endpoint_data_t *endpoint)
 {
-   return 0;
+        return 0;
 }
 
 /**
@@ -853,12 +873,12 @@ int rtep_fna_receive_endpoint_created
  *
  **/
 int rtep_fna_receive_endpoint_get_status
-      (const fna_endpoint_data_t *endpoint,
-       int *number_of_pending_messages,
-       frsh_endpoint_network_status_t *network_status,
-       frsh_protocol_status_t *protocol_status)
+                (const fna_endpoint_data_t *endpoint,
+                 int *number_of_pending_messages,
+                 frsh_endpoint_network_status_t *network_status,
+                 frsh_protocol_status_t *protocol_status)
 {
-   return 0;
+        return 0;
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -893,23 +913,23 @@ int rtep_fna_receive_endpoint_get_status
  *
  **/
 int rtep_fna_network_get_max_message_size
-      (const frsh_resource_id_t resource_id,
-       const frsh_network_address_t destination,
-       size_t *max_size)
+                (const frsh_resource_id_t resource_id,
+                 const frsh_network_address_t destination,
+                 size_t *max_size)
 {
-    int is_multicast;
-
-    if (max_size == NULL) {
-        return -1;
-    }
-
-    is_multicast = rtep_valid_multicast_id ((rtep_station_id_t) destination);
-    if (is_multicast) {
-        *max_size = MULTICAST_MTU;
-    } else {
-        *max_size = MAX_RTEP_MTU;
-    }
-    return 0;
+        int is_multicast;
+
+        if (max_size == NULL) {
+                return -1;
+        }
+
+        is_multicast = rtep_valid_multicast_id((rtep_station_id_t) destination);
+        if (is_multicast) {
+                *max_size = MULTICAST_MTU;
+        } else {
+                *max_size = MAX_RTEP_MTU;
+        }
+        return 0;
 }
 
 /**
@@ -934,23 +954,23 @@ int rtep_fna_network_get_max_message_size
  *
  **/
 int rtep_fna_network_bytes_to_budget
-      (const frsh_resource_id_t resource_id,
-       const size_t nbytes,
-       struct timespec *budget)
+                (const frsh_resource_id_t resource_id,
+                 const size_t nbytes,
+                 struct timespec *budget)
 {
-    int number_of_packets;
-
-    if (budget == NULL || nbytes < 0) {
-        return -1;
-    }
-
-   // we measure the budget in number of RTEP packets of maximum size
-    number_of_packets = nbytes / MAX_RTEP_MTU + 1;
-   // we store the budget in number of packets instead of in time. We
-   // use a field in the timespec structure.
-    budget->tv_sec = number_of_packets;
-    DEBUG("bytes: %d -> budget: %d\n", nbytes, budget->tv_sec);
-    return 0;
+        int number_of_packets;
+
+        if (budget == NULL || nbytes < 0) {
+                return -1;
+        }
+
+        // we measure the budget in number of RTEP packets of maximum size
+        number_of_packets = nbytes / MAX_RTEP_MTU + 1;
+        // we store the budget in number of packets instead of in time. We
+        // use a field in the timespec structure.
+        budget->tv_sec = number_of_packets;
+        DEBUG("bytes: %d -> budget: %d\n", nbytes, budget->tv_sec);
+        return 0;
 }
 
 /**
@@ -974,18 +994,18 @@ int rtep_fna_network_bytes_to_budget
  *
  **/
 int rtep_fna_network_budget_to_bytes
-      (const frsh_resource_id_t resource_id,
-       const struct timespec *budget,
-       size_t *nbytes)
+                (const frsh_resource_id_t resource_id,
+                 const struct timespec *budget,
+                 size_t *nbytes)
 {
-    int number_of_packets;
-
-    if (budget == NULL || nbytes == NULL) {
-        return -1;
-    }
-    number_of_packets = budget->tv_sec;
-    *nbytes = number_of_packets * MAX_RTEP_MTU;
-    return 0;
+        int number_of_packets;
+
+        if (budget == NULL || nbytes == NULL) {
+                return -1;
+        }
+        number_of_packets = budget->tv_sec;
+        *nbytes = number_of_packets * MAX_RTEP_MTU;
+        return 0;
 }
 
 /**
@@ -1017,41 +1037,43 @@ int rtep_fna_network_budget_to_bytes
  *
  **/
 int rtep_fna_network_get_min_eff_budget
-      (const frsh_resource_id_t resource_id,
-       struct timespec *budget)
+                (const frsh_resource_id_t resource_id,
+                 struct timespec *budget)
 {
-   if (budget == NULL) {
-      return -1;
-   }
-   budget->tv_sec = 1;
-   return 0;
+        if (budget == NULL) {
+                return -1;
+        }
+        budget->tv_sec = 1;
+        return 0;
 }
 
 // GLOBAL variable to install the network protocol in FRESCOR
 
 fna_operations_t rtep_fna_operations = {
-    .fna_init = rtep_fna_init,
-    .fna_contract_negotiate = rtep_fna_contract_negotiate,
-    .fna_contract_renegotiate_sync = rtep_fna_contract_renegotiate_sync,
-    .fna_contract_renegotiate_async = rtep_fna_contract_renegotiate_async,
-    .fna_vres_get_renegotiation_status = rtep_fna_vres_get_renegotiation_status,
-    .fna_vres_destroy = rtep_fna_vres_destroy,
-    .fna_vres_get_contract = rtep_fna_vres_get_contract,
-    .fna_vres_get_usage = rtep_fna_vres_get_usage,
-    .fna_vres_get_remaining_budget = rtep_fna_vres_get_remaining_budget,
-    .fna_vres_get_budget_and_period = rtep_fna_vres_get_budget_and_period,
-    .fna_resource_get_capacity = rtep_fna_resource_get_capacity,
-    .fna_resource_get_total_weight = rtep_fna_resource_get_total_weight,
-    .fna_vres_decrease_capacity = rtep_fna_vres_decrease_capacity,
-    .fna_send_sync = rtep_fna_send_sync,
-    .fna_send_async = rtep_fna_send_async,
-    .fna_receive_sync = rtep_fna_receive_sync,
-    .fna_receive_async = rtep_fna_receive_async,
-    .fna_send_endpoint_get_status = rtep_fna_send_endpoint_get_status,
-    .fna_receive_endpoint_created = rtep_fna_receive_endpoint_created,
-    .fna_receive_endpoint_get_status = rtep_fna_receive_endpoint_get_status,
-    .fna_network_get_max_message_size = rtep_fna_network_get_max_message_size,
-    .fna_network_bytes_to_budget = rtep_fna_network_bytes_to_budget,
-    .fna_network_budget_to_bytes = rtep_fna_network_budget_to_bytes,
-    .fna_network_get_min_eff_budget = rtep_fna_network_get_min_eff_budget
+#ifdef CONFIG_FNA_RTEP_CONNECTED
+        .fna_init = rtep_fna_init,
+        .fna_contract_negotiate = rtep_fna_contract_negotiate,
+        .fna_contract_renegotiate_sync = rtep_fna_contract_renegotiate_sync,
+        .fna_contract_renegotiate_async = rtep_fna_contract_renegotiate_async,
+        .fna_vres_get_renegotiation_status = rtep_fna_vres_get_renegotiation_status,
+        .fna_vres_destroy = rtep_fna_vres_destroy,
+        .fna_vres_get_contract = rtep_fna_vres_get_contract,
+        .fna_vres_get_usage = rtep_fna_vres_get_usage,
+        .fna_vres_get_remaining_budget = rtep_fna_vres_get_remaining_budget,
+        .fna_vres_get_budget_and_period = rtep_fna_vres_get_budget_and_period,
+        .fna_resource_get_capacity = rtep_fna_resource_get_capacity,
+        .fna_resource_get_total_weight = rtep_fna_resource_get_total_weight,
+        .fna_vres_decrease_capacity = rtep_fna_vres_decrease_capacity,
+        .fna_send_sync = rtep_fna_send_sync,
+        .fna_send_async = rtep_fna_send_async,
+        .fna_receive_sync = rtep_fna_receive_sync,
+        .fna_receive_async = rtep_fna_receive_async,
+        .fna_send_endpoint_get_status = rtep_fna_send_endpoint_get_status,
+        .fna_receive_endpoint_created = rtep_fna_receive_endpoint_created,
+        .fna_receive_endpoint_get_status = rtep_fna_receive_endpoint_get_status,
+#endif
+        .fna_network_get_max_message_size = rtep_fna_network_get_max_message_size,
+        .fna_network_bytes_to_budget = rtep_fna_network_bytes_to_budget,
+        .fna_network_budget_to_bytes = rtep_fna_network_budget_to_bytes,
+        .fna_network_get_min_eff_budget = rtep_fna_network_get_min_eff_budget
 };