]> rtime.felk.cvut.cz Git - frescor/fwp.git/blob - fwp/lib/fwp.h
15a745a253bc3f76bf720cb0a13334b44d72a931
[frescor/fwp.git] / fwp / lib / fwp.h
1 #ifndef _FWP_H
2 #define _FWP_H
3
4 #include "fwp_conf.h"
5 #include "fwp_vres.h"
6 #include "fwp_endpoint.h"
7 #include "fwp_mngt.h"
8 #include "fwp_contract.h"
9 #include "fwp_contract_table.h"
10
11 /**
12  * FWP initialisation
13  *  1. endpoint table init
14  *  2. vres table init
15  *  3. mngt_init
16  *  4. mngt connect
17  *
18  *  fwp mngr does not call 3., 4.
19  */
20
21 static inline int fwp_init()
22 {
23         int rv;
24
25         if ((rv = fwp_endpoint_table_init(fwp_configuration.max_endpoints)) ||
26             (rv = fwp_vres_table_init(fwp_configuration.max_vres)) ||
27             (rv = fwp_mngt_init()) ) 
28                 return rv;
29
30         return 0;
31 }
32
33 #endif /* _FWP_H */