blob: e8d1550edb47f1c66022d8a1dcf2a01dcfe3e7a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef _SYNCROUTECOMMAND_H
#define _SYNCROUTECOMMAND_H
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include "threadUtils.hpp"
#include "networkPrefix.h"
#include "routingTable.h"
class SyncRouteCommand
{
public:
SyncRouteCommand(const NetworkPrefix & );
SyncRouteCommand();
NetworkPrefix getPrefix() const;
private:
SyncRouteCommand(const SyncRouteCommand &);
uint16_t count_;
NetworkPrefix addr_;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
Lock lock(gRoutingTable.getMutex());
ar & addr_;
// u_int16_t & mux (gRoutingTable.getOrNewRoutingTEUnlocked(addr_));
// ar & mux;
ar & (*(gRoutingTable.getOrNewRoutingTEUnlocked(addr_)));
};
};
#endif // _SYNCCOMMAND_H
|