OpenSDN source code
vxlan_ksync.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3
*/
4
5
#ifndef vnsw_agent_vxlan_ksync_h
6
#define vnsw_agent_vxlan_ksync_h
7
8
#include <boost/asio.hpp>
9
#include <boost/bind/bind.hpp>
10
11
#include <
db/db_entry.h
>
12
#include <
db/db_table.h
>
13
#include <
db/db_table_partition.h
>
14
#include <
ksync/ksync_entry.h
>
15
#include <
ksync/ksync_object.h
>
16
#include <
ksync/ksync_netlink.h
>
17
#include "
oper/nexthop.h
"
18
#include "
oper/vxlan.h
"
19
#include "vrouter/ksync/agent_ksync_types.h"
20
21
using namespace
boost::placeholders;
22
23
class
VxLanKSyncObject
;
24
25
class
VxLanIdKSyncEntry
:
public
KSyncNetlinkDBEntry
{
26
public
:
27
VxLanIdKSyncEntry
(
VxLanKSyncObject
*obj,
const
VxLanIdKSyncEntry
*entry,
28
uint32_t index);
29
VxLanIdKSyncEntry
(
VxLanKSyncObject
*obj,
const
VxLanId
*label);
30
virtual
~
VxLanIdKSyncEntry
();
31
32
NHKSyncEntry
*
nh
()
const
{
33
return
static_cast<
NHKSyncEntry
*
>
(nh_.get());
34
}
35
KSyncDBObject
*GetObject()
const
;
36
37
virtual
bool
IsLess
(
const
KSyncEntry
&rhs)
const
;
38
virtual
std::string
ToString
()
const
;
39
virtual
KSyncEntry
*UnresolvedReference();
40
virtual
bool
Sync(
DBEntry
*e);
41
virtual
int
AddMsg(
char
*buf,
int
buf_len);
42
virtual
int
ChangeMsg(
char
*buf,
int
buf_len);
43
virtual
int
DeleteMsg(
char
*buf,
int
buf_len);
44
void
FillObjectLog(
sandesh_op::type
op, KSyncVxLanInfo &info)
const
;
45
private
:
46
int
Encode(
sandesh_op::type
op,
char
*buf,
int
buf_len);
47
VxLanKSyncObject
*
ksync_obj_
;
48
uint32_t
label_
;
49
KSyncEntryPtr
nh_
;
50
DISALLOW_COPY_AND_ASSIGN
(
VxLanIdKSyncEntry
);
51
};
52
53
class
VxLanKSyncObject
:
public
KSyncDBObject
{
54
public
:
55
static
const
int
kVxLanIndexCount = 10000;
56
VxLanKSyncObject
(
KSync
*ksync);
57
virtual
~
VxLanKSyncObject
();
58
KSync
*
ksync
()
const
{
return
ksync_; }
59
virtual
KSyncEntry
*Alloc(
const
KSyncEntry
*entry, uint32_t index);
60
virtual
KSyncEntry
*DBToKSyncEntry(
const
DBEntry
*e);
61
void
RegisterDBClients();
62
private
:
63
KSync
*
ksync_
;
64
DISALLOW_COPY_AND_ASSIGN
(
VxLanKSyncObject
);
65
};
66
67
#endif
// vnsw_agent_vxlan_ksync_h
IsLess
static bool IsLess(const ShowRoute &lhs, const ShowRoute &rhs, const BgpSandeshContext *bsc, const string &table_name)
Definition:
bgp_show_route.cc:23
DBEntry
Definition:
db_entry.h:96
KSyncDBObject
Definition:
ksync_object.h:208
KSyncEntry
Definition:
ksync_entry.h:33
KSyncEntry::KSyncEntryPtr
boost::intrusive_ptr< KSyncEntry > KSyncEntryPtr
Definition:
ksync_entry.h:68
KSyncNetlinkDBEntry
Definition:
ksync_netlink.h:50
KSync
Definition:
ksync_init.h:27
NHKSyncEntry
Definition:
nexthop_ksync.h:27
VxLanIdKSyncEntry
Definition:
vxlan_ksync.h:25
VxLanIdKSyncEntry::ksync_obj_
VxLanKSyncObject * ksync_obj_
Definition:
vxlan_ksync.h:47
VxLanIdKSyncEntry::DISALLOW_COPY_AND_ASSIGN
DISALLOW_COPY_AND_ASSIGN(VxLanIdKSyncEntry)
VxLanIdKSyncEntry::nh_
KSyncEntryPtr nh_
Definition:
vxlan_ksync.h:49
VxLanIdKSyncEntry::label_
uint32_t label_
Definition:
vxlan_ksync.h:48
VxLanIdKSyncEntry::nh
NHKSyncEntry * nh() const
Definition:
vxlan_ksync.h:32
VxLanId
Definition:
vxlan.h:14
VxLanKSyncObject
Definition:
vxlan_ksync.h:53
VxLanKSyncObject::ksync_
KSync * ksync_
Definition:
vxlan_ksync.h:63
VxLanKSyncObject::DISALLOW_COPY_AND_ASSIGN
DISALLOW_COPY_AND_ASSIGN(VxLanKSyncObject)
VxLanKSyncObject::ksync
KSync * ksync() const
Definition:
vxlan_ksync.h:58
db_entry.h
db_table.h
db_table_partition.h
ksync_entry.h
ksync_netlink.h
ksync_object.h
type
uint8_t type
Definition:
load_balance.h:2
nexthop.h
ToString
static string ToString(PhysicalDevice::ManagementProtocol proto)
Definition:
physical_device.cc:33
vxlan.h
contrail
controller
src
vnsw
agent
vrouter
ksync
vxlan_ksync.h
Generated by
1.9.1