--- /dev/null
+#include <stdio.h> // perror
+#include <stdlib.h> // exit
+#include <unistd.h> // sleep
+
+#include "frescan.h"
+#include "frescan_bandwidth_reservation.h"
+
+#define ERROR(s) {perror (s); exit (-1);}
+
+#define NETWORK 0
+#define LOCAL_NODE 0
+
+int main ()
+{
+ int ret;
+ frescan_init_params_t init_params;
+
+ init_params.net = NETWORK;
+ init_params.node = LOCAL_NODE;
+ init_params.tx_fp_max_prio = 10;
+ init_params.rx_num_of_channels = 5;
+ init_params.rx_channel_max_prio = NULL;
+
+ printf("Initializing FRESCAN\n");
+ ret = frescan_init(&init_params);
+ if (ret != 0) ERROR ("could not init FRESCAN");
+
+ printf("Initializing BWRES\n");
+ ret = frescan_bwres_init(NETWORK);
+ if (ret != 0) ERROR ("could not init BWRES");
+
+ while (1) {
+ sleep(1);
+ }
+
+ return 0;
+}
+
+
--- /dev/null
+#include <stdio.h> // perror
+#include <stdlib.h> // exit
+#include <unistd.h> // sleep
+
+#include "frescan.h"
+#include "frescan_bandwidth_reservation.h"
+
+#define ERROR(s) {perror (s); exit (-1);}
+
+#define NETWORK 0
+#define LOCAL_NODE 0
+
+int main ()
+{
+ int ret;
+ frescan_init_params_t init_params;
+ frescan_ss_t ss;
+ frescan_contract_t contract;
+
+ init_params.net = NETWORK;
+ init_params.node = LOCAL_NODE;
+ init_params.tx_fp_max_prio = 10;
+ init_params.rx_num_of_channels = 5;
+ init_params.rx_channel_max_prio = NULL;
+
+ printf("Initializing FRESCAN\n");
+ ret = frescan_init(&init_params);
+ if (ret != 0) ERROR ("could not init FRESCAN");
+
+ printf("Initializing BWRES\n");
+ ret = frescan_bwres_init(NETWORK);
+ if (ret != 0) ERROR ("could not init BWRES");
+
+ ret = frescan_bwres_negotiate(NETWORK, &contract, &ss);
+ if (ret != 0) ERROR ("could not negotiate succesfully");
+
+ while (1) {
+ sleep(1);
+ }
+
+ return 0;
+}
+
+
#include <stdlib.h> // exit
#include <unistd.h> // sleep
-#include <drivers/frescan.h>
+#include "frescan.h"
#define ERROR(s) {perror (s); exit (-1);}
#include <stdlib.h> // exit
#include <unistd.h> // sleep
-#include <drivers/frescan.h>
+#include "frescan.h"
#define ERROR(s) {perror (s); exit (-1);}
#include <stdlib.h> // exit
#include <unistd.h> // sleep
-#include <drivers/frescan.h>
+#include "frescan.h"
#include "frescan_servers.h"
#define ERROR(s) {perror (s); exit (-1);}