added 2nd part (SATP) of acn presentation
[anytun.git] / src / syncRouteCommand.h
blobe8d1550edb47f1c66022d8a1dcf2a01dcfe3e7a3
1 #ifndef _SYNCROUTECOMMAND_H
2 #define _SYNCROUTECOMMAND_H
3 #include <boost/archive/text_oarchive.hpp>
4 #include <boost/archive/text_iarchive.hpp>
6 #include "threadUtils.hpp"
7 #include "networkPrefix.h"
8 #include "routingTable.h"
10 class SyncRouteCommand
12 public:
13 SyncRouteCommand(const NetworkPrefix & );
14 SyncRouteCommand();
15 NetworkPrefix getPrefix() const;
17 private:
18 SyncRouteCommand(const SyncRouteCommand &);
19 uint16_t count_;
20 NetworkPrefix addr_;
21 friend class boost::serialization::access;
22 template<class Archive>
23 void serialize(Archive & ar, const unsigned int version)
25 Lock lock(gRoutingTable.getMutex());
26 ar & addr_;
27 // u_int16_t & mux (gRoutingTable.getOrNewRoutingTEUnlocked(addr_));
28 // ar & mux;
29 ar & (*(gRoutingTable.getOrNewRoutingTEUnlocked(addr_)));
34 #endif // _SYNCCOMMAND_H