OpenSDN source code
vn_uve_table.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_vn_uve_table_h
6 #define vnsw_agent_vn_uve_table_h
7 
8 #include <string>
9 #include <set>
10 #include <map>
11 #include <vector>
12 #include <virtual_network_types.h>
13 #include <oper/vn.h>
14 #include "pkt/flow_proto.h"
15 #include "pkt/flow_table.h"
16 #include <uve/l4_port_bitmap.h>
17 #include <uve/vn_uve_entry.h>
18 #include <uve/vn_uve_table_base.h>
20 
21 //The container class for objects representing VirtualNetwork UVEs
22 //Defines routines for storing and managing (add, delete, change and send)
23 //VirtualNetwork UVEs
24 class VnUveTable : public VnUveTableBase {
25 public:
26  VnUveTable(Agent *agent, uint32_t default_intvl);
27  virtual ~VnUveTable();
28 
29  void UpdateBitmap(const std::string &vn, uint8_t proto, uint16_t sport,
30  uint16_t dport);
31  void SendVnStats();
32  void UpdateInterVnStats(const std::string &src, const std::string &dst,
33  uint64_t bytes, uint64_t pkts, bool outgoing);
34  void IncrVnAceStats(const FlowUveVnAcePolicyInfo &info);
35 
36 protected:
37  //The following API is made protected for UT.
38  void SendVnStatsMsg(const VnEntry *vn);
39  void SendVnAceStats(VnUveEntryBase *entry, const VnEntry *vn);
40 private:
41  virtual VnUveEntryPtr Allocate(const VnEntry *vn);
42  virtual VnUveEntryPtr Allocate();
43  bool SendUnresolvedVnMsg(const std::string &vn, UveVirtualNetworkAgent &u);
44 
48 };
49 
50 #endif // vnsw_agent_vn_uve_table_h
Definition: agent.h:360
int ListenerId
Definition: db_table.h:62
Definition: vn.h:151
boost::shared_ptr< VnUveEntryBase > VnUveEntryPtr
void UpdateInterVnStats(const std::string &src, const std::string &dst, uint64_t bytes, uint64_t pkts, bool outgoing)
Definition: vn_uve_table.cc:99
void IncrVnAceStats(const FlowUveVnAcePolicyInfo &info)
DBTableBase::ListenerId intf_listener_id_
Definition: vn_uve_table.h:46
void UpdateBitmap(const std::string &vn, uint8_t proto, uint16_t sport, uint16_t dport)
Definition: vn_uve_table.cc:87
VnUveTable(Agent *agent, uint32_t default_intvl)
Definition: vn_uve_table.cc:9
DBTableBase::ListenerId vn_listener_id_
Definition: vn_uve_table.h:45
bool SendUnresolvedVnMsg(const std::string &vn, UveVirtualNetworkAgent &u)
Definition: vn_uve_table.cc:26
virtual ~VnUveTable()
Definition: vn_uve_table.cc:13
DISALLOW_COPY_AND_ASSIGN(VnUveTable)
virtual VnUveEntryPtr Allocate()
Definition: vn_uve_table.cc:21
void SendVnAceStats(VnUveEntryBase *entry, const VnEntry *vn)
void SendVnStatsMsg(const VnEntry *vn)
Definition: vn_uve_table.cc:71
void SendVnStats()
Definition: vn_uve_table.cc:50