HEAD: rearrange things a bit so we can have a libwvbase.so, which contains
[wvapps.git] / wvipsec / wvipsecguide.h
blob9b8b7a2ccddb35d4c573dbd0baa9504d80da7a57
1 /*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 2003 Net Integration Technologies, Inc.
5 * WvIpSecGuide to control all the routes through a given WvIsaKmp/WvEsp pair
6 */
9 #ifndef __WVIPSECGUIDE_H
10 #define __WVIPSECGUIDE_H
12 #include "wvngroute.h"
13 #include "wvngroutecontainer.h"
14 #include "wvlog.h"
15 #include "wvconf.h"
16 #include "wvistreamlist.h"
17 #include "wvipseckeeper.h"
18 #include "wvisakmp.h"
20 class WvTunDev;
21 class WvEsp;
22 class WvCryptoEncoder;
24 class WvIpSecGuide : public WvNGRouteContainer
26 public:
27 WvConf &cfg;
28 WvIpSecKeeper &keeper;
29 WvIStreamList selectlist;
31 private:
32 WvTunDev *tundev;
33 WvEsp *esp;
34 WvIsaKmp *isakmp;
35 time_t last_probe_time;
37 WvLog log;
39 public:
40 WvIpSecGuide(WvIpSecKeeper *_parent, const WvIPAddr &_gateway);
41 virtual ~WvIpSecGuide();
43 // Security Association changed callback
44 void changed_sa(int spi, WvCryptoEncoder *enc,
45 WvCryptoEncoder *dec, WvIsaKmp::actions action);
47 // create routes through this gateway
48 void create_routes();
50 // forget all routes through this gateway
51 void forget_my_routes();
53 // start up an WvIsaKmp session
54 void start_isakmp();
58 #endif // __WVIPSECGUIDE_H