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