]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Futher include file cleaning
authorMartin Molnar <molnar@sum.(none)>
Thu, 19 Jun 2008 15:45:38 +0000 (17:45 +0200)
committerMartin Molnar <molnar@sum.(none)>
Thu, 19 Jun 2008 15:45:38 +0000 (17:45 +0200)
14 files changed:
fwp/lib/core/fwp_endpoint.c
fwp/lib/core/fwp_endpoint.h
fwp/lib/core/fwp_vres.c
fwp/lib/core/fwp_vres.h
fwp/lib/mngt/fwp_contract.c
fwp/lib/mngt/fwp_contract.h
fwp/lib/mngt/fwp_contract_table.h
fwp/lib/mngt/fwp_mngt.c
fwp/lib/mngt/fwp_mngt.h
fwp/lib/mngt/fwp_msg.h
fwp/lib/mngt/fwp_participant.h
fwp/mngr/fwp_admctrl.c
fwp/mngr/fwp_mngr.c
fwp/mngr/fwp_participant_table.c

index b43abce893a49556477529042bfaa41dee975ed0..1866e32e84848fa3cda52faf15b1005832a47862 100644 (file)
@@ -1,7 +1,8 @@
 #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,
@@ -22,6 +23,7 @@ static fwp_endpoint_attr_t fwp_epoint_attr_default ={
 /**
  * Structure of FWP endpoint.
  */
+typedef
 struct fwp_endpoint{
        fwp_endpoint_type_t     type;
        /**< endpoint attributes */
@@ -47,7 +49,7 @@ struct fwp_endpoint{
        /**< specific operation options*/
        int                     flags;  
        fwp_endpoint_status_t   status;
-};
+} fwp_endpoint_t;
 
 typedef
 struct fwp_endpoint_table {
index ac8ee62f423446448f7cc97cff165d0240167b04..f9e1baca051670619105d084900c46a41c012cdf 100644 (file)
@@ -8,10 +8,7 @@ typedef enum {
        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;
 
@@ -22,14 +19,9 @@ struct fwp_endpoint_attr {
        /* 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);
@@ -59,5 +51,9 @@ static inline int fwp_endpoint_attr_setreliability(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 */ 
index 0da3d4a23eb0008d86e2878906a9e1f7a6acff3c..b8912369572bba3857ce427246cb328cae7589c4 100644 (file)
@@ -1,8 +1,12 @@
 #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 ,
index 5ddc40cfcf3c7a97d191a63b69353171334b8fd8..f81cad895615ddd6c72cc0d9d6909d7bfb840f26 100644 (file)
@@ -1,21 +1,17 @@
 #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  {
@@ -58,5 +54,4 @@ int _fwp_vres_bind(fwp_vres_d_t vresd, int sockd);
 int _fwp_vres_unbind(fwp_vres_d_t vresd);
 
 #endif /* _FWP_INTERNALS_ */
-
 #endif /* _FWP_VRES_H */
index 7388e7075f87acea640a4f01f4ae3a4a13daf8a2..a05a9c77941dfda4c9c4189af755f89b897c4b3d 100644 (file)
@@ -3,8 +3,6 @@
 #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);
index 8ad6ec094ce11ac4d289db54b9c6713ebb28aa39..ea15d3847c60225667b095144a01a491f0a86c1c 100644 (file)
@@ -2,10 +2,7 @@
 #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 
@@ -47,10 +29,35 @@ struct fwp_contract {
 } 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;
 
 /**
@@ -74,8 +81,7 @@ struct fwp_contract_data {
 
        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()
 {
@@ -86,11 +92,5 @@ 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 */ 
index 08fd6b649107894a66e6e6a920cb352063eab3da..ff2d91a655cd7dc9f03a7c002a179a4160f39714 100644 (file)
@@ -2,10 +2,6 @@
 #define _FWP_CONTRACT_TABLE_H
 
 #include "fwp_contract.h"
-#include "fwp_vres.h"
-
-#include <string.h>
-
 #include "ul_list.h"
 #include "ul_gavlcust.h"
 
index 5ba0e7a747b649d7937f19370e536898afe2495c..fe1db15ec0832f37982e0462dfd9439bf5460405 100644 (file)
@@ -1,11 +1,7 @@
 #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
  */
index 03fdae61d7675324ab6cd23bc3465b0ea0ad9ff4..3d47740372b500e02c3acbb2a20fe9f8280d8bef 100644 (file)
@@ -5,8 +5,6 @@
 #ifdef _FWP_INTERNALS_
 
 #include "fwp_vres.h"
-#include "fwp_endpoint.h"
-
 #include "fwp_msg.h"
 #include "fwp_participant.h"
 
@@ -26,7 +24,7 @@ int fwp_mngt_recv(fwp_msg_type_t *type, fwp_participant_id_t *participant_id,
 
 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();
index 98bc68846ebc78290ddb8045ffaae0ba3beac8ca..ede4948e8428adc1d6e0d28cd8835ed84bce6e5b 100644 (file)
@@ -3,8 +3,6 @@
 
 #include <stdint.h>
 
-#ifdef _FWP_INTERNALS_
-
 #include "fwp_contract.h"
 #include "fwp_vres.h"
 #include "fwp_participant.h"
@@ -64,6 +62,4 @@ void fwp_msg_hello_in(unsigned char *data,
 void fwp_msg_hello_out(unsigned char *data,
                        fwp_participant_info_t *participant_info);
 
-#endif
-
 #endif /* _FWP_MSG_H */
index ab5d37491b494d60db035bc6afb8144c1d1e34ca..5ff5aaf13b7a286d0d95eeb3583ef67c1dc2e2e5 100644 (file)
@@ -2,6 +2,7 @@
 #define _FWP_PARTICIPANT_H
 
 #include "fwp_contract_table.h"
+#include "fwp_endpoint.h"
 #include "ul_gavlcust.h"
 
 typedef 
index 155407b068b49f9f6cf258b6a5c64dd3e8df77f4..def2faaa8abb46595d31fef9ecaca305be22cbd0 100644 (file)
@@ -1,5 +1,5 @@
 #include "fwp_admctrl.h"
-#include "fwp.h"
+#include "fwp_vres.h"
 
 static int nr_negotiated =0;
 /***/
index 6971679051596bcabc643c062ec556876271c047..0565991fd160c83639f7f8bad0e7ea6a85434d66 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "fwp_confdefs.h"
 #include "fwp.h"
+
 #include "fwp_contract_table.h"
 #include "fwp_participant_table.h"
 #include "fwp_admctrl.h"
index 1a9906f1d01256437c40bfe681fb7ffdd77fb3f2..5ca7cfe0c007b3b70e499022c698a0da7cbf68ea 100644 (file)
@@ -1,8 +1,5 @@
-//#include "ul_list.h"
-//#include "ul_gavlcust.h"
 #include "fwp_participant_table.h"
 #include <pthread.h>
-//#include <stdlib.h>
 
 typedef
 struct {