#include "fwp_endpoint.h"
-
#include "fwp_msgb.h"
+typedef unsigned int fwp_endpoint_id_t;
+
typedef enum {
FWP_SEND_EPOINT = 0,
FWP_RECV_EPOINT = 1,
/**
* Structure of FWP endpoint.
*/
+typedef
struct fwp_endpoint{
fwp_endpoint_type_t type;
/**< endpoint attributes */
/**< specific operation options*/
int flags;
fwp_endpoint_status_t status;
-};
+} fwp_endpoint_t;
typedef
struct fwp_endpoint_table {
FWP_EPOINT_RELIABLE = 1,
} fwp_endpoint_reliability_t;
-typedef unsigned int fwp_endpoint_id_t;
-
struct fwp_endpoint;
-typedef struct fwp_endpoint fwp_endpoint_t;
/* fwp endpoint descriptor type */
typedef struct fwp_endpoint* fwp_endpoint_d_t;
/* queueing policy*/
} fwp_endpoint_attr_t;
-#include "fwp_util.h"
+/*TODO: extract FWP_DEBUG from fwp_util.h */
#include "fwp_util.h"
#include "fwp_vres.h"
-#include <string.h>
-
-#ifdef _FWP_INTERNALS_
-int fwp_endpoint_table_init(unsigned int nr_endpoints);
-#endif
int fwp_endpoint_get_params(fwp_endpoint_d_t epointd, unsigned int *node,
unsigned int *port, fwp_endpoint_attr_t *attr);
/* Sets queueing policy */
/*int fwp_endpoint_attr_setqpolicy(fwp_endpoint_attr_t *attr);*/
+#ifdef _FWP_INTERNALS_
+
+int fwp_endpoint_table_init(unsigned int nr_endpoints);
+#endif /*_FWP_INTERNALS_*/
#endif /*_FWP_ENDPOINT_H */
#include "fwp_util.h"
#include "fwp_vres.h"
-static void* fwp_vres_tx_thread(void *_vres);
+#include "fwp_msgq.h"
+#include "fwp_endpoint.h"
+
+#include <string.h>
+static void* fwp_vres_tx_thread(void *_vres);
typedef enum {
FWP_VRES_FREE = 0 ,
#ifndef _FWP_VRES_H
#define _FWP_VRES_H
-
-typedef unsigned int fwp_vres_id_t;
-
struct fwp_vres;
-typedef struct fwp_vres fwp_vres_t;
typedef struct fwp_vres* fwp_vres_d_t;
#ifdef _FWP_INTERNALS_
-typedef unsigned int fwp_vparam_id_t;
+#include "fwp_msgb.h"
-#include "fwp_msgq.h"
-#include <string.h>
+typedef struct fwp_vres fwp_vres_t;
-#include "fwp_endpoint.h"
+typedef unsigned int fwp_vres_id_t;
+typedef unsigned int fwp_vparam_id_t;
/**< WMM defines 4 queues */
typedef enum {
int _fwp_vres_unbind(fwp_vres_d_t vresd);
#endif /* _FWP_INTERNALS_ */
-
#endif /* _FWP_VRES_H */
#include "fwp_contract_table.h"
#include "fwp_mngt.h"
-#include <stdlib.h>
-
static int fwp_contract_is_reserved(fwp_contract_d_t contract)
{
return (contract->status == FWP_CONT_RESERVED);
#define _FWP_CONTRACT_H
#include "fwp_vres.h"
-#include "ul_list.h"
-#include "ul_gavlcust.h"
-#include <stdlib.h>
/*
*typedef struct mfrsh_contract_ops{
* fwp_contract_d_t (*create)(fwp_contract_t *contract);
*}
*/
-/**< Contract Status */
-/*typedef enum {
- FWP_CONT_INVALID = 0,
- FWP_CONT_REQUESTED = 1,
- FWP_CONT_REJECTED = 2,
- FWP_CONT_NEGOTIATED = 3,
- FWP_CONT_ACCEPTED = 4
-} fwp_contract_status_t;*/
-
-typedef enum {
- FWP_CONT_NOTNEGOTIATED = 0,
- FWP_CONT_RESERVED = 1,
- FWP_CONT_NEGOTIATED = 2
-} fwp_contract_status_t;
-
/**
* FWP contract.
* It is an external representation of contract intented for application
} fwp_contract_t;
struct fwp_contract_data;
-//typedef struct fwp_contract_data fwp_contract_data_t;
typedef struct fwp_contract_data* fwp_contract_d_t;
+fwp_contract_d_t fwp_contract_create(fwp_contract_t *contract);
+int fwp_contract_negotiate(fwp_contract_d_t contract, fwp_vres_d_t *vresdp);
+int fwp_contract_is_negotiated(fwp_contract_d_t contract);
+
+
#ifdef _FWP_INTERNALS_
+
+#include "ul_gavlcust.h"
+#include "ul_list.h"
+#include <stdlib.h>
+
+/**< Contract Status */
+/*typedef enum {
+ FWP_CONT_INVALID = 0,
+ FWP_CONT_REQUESTED = 1,
+ FWP_CONT_REJECTED = 2,
+ FWP_CONT_NEGOTIATED = 3,
+ FWP_CONT_ACCEPTED = 4
+} fwp_contract_status_t;*/
+
+typedef enum {
+ FWP_CONT_NOTNEGOTIATED = 0,
+ FWP_CONT_RESERVED = 1,
+ FWP_CONT_NEGOTIATED = 2
+} fwp_contract_status_t;
+
+typedef struct fwp_contract_data fwp_contract_data_t;
typedef fwp_vres_id_t fwp_contract_id_t;
/**
ul_list_node_t list_node;
gavl_node_t tree_node;
-} fwp_contract_data_t;
-
+};
static inline fwp_contract_data_t* fwp_contract_data_new()
{
int fwp_contract_reserve(fwp_contract_d_t contractd);
int fwp_contract_commit(fwp_contract_d_t contractd, fwp_vres_d_t *vresdp);
-#endif
-
-fwp_contract_d_t fwp_contract_create(fwp_contract_t *contract);
-int fwp_contract_negotiate(fwp_contract_d_t contract, fwp_vres_d_t *vresdp);
-int fwp_contract_is_negotiated(fwp_contract_d_t contract);
-
-
+#endif /*_FWP_INTERNALS_ */
#endif /*_FWP_CONTRACT_H */
#define _FWP_CONTRACT_TABLE_H
#include "fwp_contract.h"
-#include "fwp_vres.h"
-
-#include <string.h>
-
#include "ul_list.h"
#include "ul_gavlcust.h"
#include "fwp_conf.h"
#include "fwp_mngt.h"
+#include "fwp_endpoint.h"
-#include "fwp_msg.h"
-//#include "fwp_util.h"
-#include "fwp_contract_table.h"
-
-#include <stdlib.h>
/**
* Global mngt variables
*/
#ifdef _FWP_INTERNALS_
#include "fwp_vres.h"
-#include "fwp_endpoint.h"
-
#include "fwp_msg.h"
#include "fwp_participant.h"
int fwp_mngt_service_vres_create(fwp_vres_d_t* fwp_service_vresd);
-#endif
+#endif /* _FWP_INTERNALS_ */
int fwp_mngt_init();
int fwp_mngt_connect();
#include <stdint.h>
-#ifdef _FWP_INTERNALS_
-
#include "fwp_contract.h"
#include "fwp_vres.h"
#include "fwp_participant.h"
void fwp_msg_hello_out(unsigned char *data,
fwp_participant_info_t *participant_info);
-#endif
-
#endif /* _FWP_MSG_H */
#define _FWP_PARTICIPANT_H
#include "fwp_contract_table.h"
+#include "fwp_endpoint.h"
#include "ul_gavlcust.h"
typedef
#include "fwp_admctrl.h"
-#include "fwp.h"
+#include "fwp_vres.h"
static int nr_negotiated =0;
/***/
#include "fwp_confdefs.h"
#include "fwp.h"
+
#include "fwp_contract_table.h"
#include "fwp_participant_table.h"
#include "fwp_admctrl.h"
-//#include "ul_list.h"
-//#include "ul_gavlcust.h"
#include "fwp_participant_table.h"
#include <pthread.h>
-//#include <stdlib.h>
typedef
struct {