OpenSDN source code
session_stats_collector.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef vnsw_agent_session_stats_collector_h
7 #define vnsw_agent_session_stats_collector_h
8 
10 // Forward declaration
11 class FlowStatsManager;
12 class SessionStatsReq;
13 class FlowToSessionMap;
14 struct SessionSloRuleEntry;
15 class SessionSloState;
16 
18 
19 #define SESSION_STATS_TRACE(obj, ...)\
20 do {\
21  SessionStats##obj::TraceMsg(SessionStatsTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
22 } while (false)
23 
25 public:
26  std::string vmi_cfg_name;
27  std::string local_vn;
28  std::string remote_vn;
31  std::string remote_prefix;
32  std::string match_policy;
34  bool is_si;
36 
37  void Reset();
38  bool IsLess(const SessionEndpointKey &rhs) const;
39  bool IsEqual(const SessionEndpointKey &rhs) const;
40 };
41 
42 struct SessionAggKey {
43 public:
45  uint16_t server_port;
46  uint16_t proto;
48  void Reset();
49  bool IsLess(const SessionAggKey &rhs) const;
50  bool IsEqual(const SessionAggKey &rhs) const;
51 };
52 
53 struct SessionKey {
54 public:
56  uint16_t client_port;
58  SessionKey() { Reset(); }
59 
60  void Reset();
61  bool IsLess(const SessionKey &rhs) const;
62  bool IsEqual(const SessionKey &rhs) const;
63 };
64 
65 struct SessionKeyCmp {
66  bool operator()(const SessionKey &lhs, const SessionKey &rhs) const {
67  return lhs.IsLess(rhs);
68  }
69 };
70 
72 public:
74  uint8_t gen_id;
75  uint32_t flow_handle;
77  uint64_t total_bytes;
78  uint64_t total_packets;
79 };
80 
82  std::string sg_rule_uuid;
83  std::string nw_ace_uuid;
84  std::string aps_rule_uuid;
85  std::string action;
86  std::string drop_reason;
88  aps_rule_uuid(""), action(""), drop_reason("") {
89  }
90 };
91 
93  bool valid;
94  std::string vm_cfg_name;
95  std::string other_vrouter;
96  uint16_t underlay_proto;
102  underlay_proto(0) {}
103 };
104 
106  uint64_t diff_bytes;
107  uint64_t diff_packets;
109  uint16_t tcp_flags;
110  bool valid;
112  underlay_src_port(0), tcp_flags(0), valid(false) {
113  }
114 };
115 
117  bool sampled;
121 };
122 
124 public:
125  uint64_t setup_time;
126  uint64_t teardown_time;
128  bool deleted;
130  bool evicted;
136  exported_atleast_once(false), deleted(false), del_stats(),
137  evicted(false), evict_stats(), export_info(), fwd_flow(), rev_flow() {}
138 };
139 
141 public:
142  typedef std::map<const SessionKey, SessionStatsInfo,
145 };
146 
148  bool operator()(const SessionAggKey &lhs, const SessionAggKey &rhs) const {
149  return lhs.IsLess(rhs);
150  }
151 };
152 
154 public:
155  typedef std::map<const SessionAggKey, SessionPreAggInfo,
158 };
159 
162  const SessionEndpointKey &rhs) const {
163  return lhs.IsLess(rhs);
164  }
165 };
166 
168 public:
169  typedef std::map<const SessionEndpointKey, SessionEndpointInfo,
172  typedef std::map<FlowEntryPtr, FlowToSessionMap> FlowSessionMap;
173  typedef std::map<std::string, SessionSloRuleEntry> SessionSloRuleMap;
174 
175  static const uint32_t kSessionStatsTimerInterval = 1000;
176  static const uint32_t kSessionsPerTask = 256;
177 
178  uint32_t RunSessionEndpointStats(uint32_t max_count);
179 
180  class SessionTask : public Task {
181  public:
183  virtual ~SessionTask();
184  std::string Description() const;
185  bool Run();
186  private:
188  };
189 
190 
191  SessionStatsCollector(boost::asio::io_context &io, AgentUveBase *uve,
192  uint32_t instance_id, FlowStatsManager *fsm,
194  virtual ~SessionStatsCollector();
195  bool Run();
196 
197  int task_id() const { return task_id_; }
198  uint32_t instance_id() const { return instance_id_; }
199  const Queue *queue() const { return &request_queue_; }
200  size_t Size() const { return session_endpoint_map_.size(); }
201  friend class FlowStatsManager;
203 protected:
204  virtual void DispatchSessionMsg(const std::vector<SessionEndpoint> &lst);
205 private:
206  #define CheckFlowLogging(logged) { \
207  if (logged) { \
208  return true; \
209  } \
210  }
211  int ComputeSloRate(int rate, SecurityLoggingObject *slo) const;
213  SessionFlowStatsParams *params) const;
214  uint64_t threshold() const;
215  bool IsSamplingEnabled() const;
216  bool SampleSession(SessionPreAggInfo::SessionMap::iterator session_map_iter,
217  SessionStatsParams *params) const;
219  (SessionPreAggInfo::SessionMap::iterator session_map_iter,
220  SessionStatsParams *params) const;
222  (SessionPreAggInfo::SessionMap::iterator session_map_iter,
223  SessionStatsParams *params) const;
224  bool ProcessSessionEndpoint(const SessionEndpointMap::iterator &it);
225  uint64_t GetUpdatedSessionFlowBytes(uint64_t info_bytes,
226  uint64_t k_flow_bytes) const;
227  uint64_t GetUpdatedSessionFlowPackets(uint64_t info_packets,
228  uint64_t k_flow_pkts) const;
230  (SessionPreAggInfo::SessionMap::iterator session_map_iter,
231  SessionInfo *session_info, bool is_sampling, bool is_logging) const;
233  SessionFlowInfo *flow_info,
234  bool is_sampling,
235  bool is_logging) const;
236  void FillSessionFlowInfo(const SessionFlowStatsInfo &session_flow,
237  const SessionStatsInfo &sinfo,
238  const SessionFlowExportInfo &einfo,
239  SessionFlowInfo *flow_info) const;
241  const boost::uuids::uuid &u,
242  FlowEntry *fe) const;
243  void CopyFlowInfo(SessionStatsInfo &session,
244  const RevFlowDepParams *params);
245  void UpdateAggregateStats(const SessionInfo &sinfo,
246  SessionAggInfo *agg_info,
247  bool is_sampling, bool is_logging) const;
249  (SessionPreAggInfo::SessionMap::iterator session_map_iter,
250  const SessionStatsParams &stats, SessionInfo *session_info,
251  SessionIpPort *session_key, bool is_sampling, bool is_logging) const;
253  (SessionPreAggInfo::SessionMap::iterator session_map_iter,
254  const SessionStatsParams &stats, SessionInfo *session_info,
255  SessionIpPort *session_key,
256  const RevFlowDepParams *params,
257  bool read_flow, bool is_sampling, bool is_logging) const;
258  void FillSessionAggInfo(SessionEndpointInfo::SessionAggMap::iterator it,
259  SessionIpPortProtocol *session_agg_key) const;
260  void FillSessionEndpoint(SessionEndpointMap::iterator it,
261  SessionEndpoint *session_ep) const;
262  void FillSessionTags(const TagList &list, SessionEndpoint *ep) const;
263  void FillSessionRemoteTags(const TagList &list, SessionEndpoint *ep) const;
264  static uint64_t GetCurrentTime();
266  SessionFlowStatsInfo *session_flow) const;
267  void UpdateSessionStatsInfo(FlowEntry* fe, uint64_t setup_time,
268  SessionStatsInfo *session) const;
269  void AddSession(FlowEntry* fe, uint64_t setup_time);
270  void DeleteSession(FlowEntry* fe, const boost::uuids::uuid &del_uuid,
271  uint64_t teardown_time,
272  const RevFlowDepParams *params);
273  void EvictedSessionStatsUpdate(const FlowEntryPtr &flow,
274  uint32_t bytes,
275  uint32_t packets,
276  uint32_t oflow_bytes,
277  const boost::uuids::uuid &u);
278  bool GetSessionKey(FlowEntry* fe, SessionAggKey &session_agg_key,
279  SessionKey &session_key,
280  SessionEndpointKey &session_endpoint_key);
282  SessionKey session_key,
283  SessionAggKey session_agg_key,
284  SessionEndpointKey session_endpoint_key);
286  void Shutdown();
287  void RegisterDBClients();
288  void AddEvent(const FlowEntryPtr &flow);
289  void DeleteEvent(const FlowEntryPtr &flow, const RevFlowDepParams &params);
290  void UpdateSessionStatsEvent(const FlowEntryPtr &flow,
291  uint32_t bytes,
292  uint32_t packets,
293  uint32_t oflow_bytes,
294  const boost::uuids::uuid &u);
295  bool RequestHandlerEntry();
296  void RequestHandlerExit(bool done);
297  bool RequestHandler(boost::shared_ptr<SessionStatsReq> req);
298  void EnqueueSessionMsg();
300  uint8_t GetSessionMsgIdx();
301 
302  bool UpdateSloMatchRuleEntry(const boost::uuids::uuid &slo_uuid,
303  const std::string &match_uuid,
304  bool *match);
305  bool CheckPolicyMatch(const SessionSloRuleMap &map,
306  const std::string &policy_uuid,
307  const bool &deleted_flag,
308  bool *match,
309  const bool &exported_once);
310  bool FindSloMatchRule(const SessionSloRuleMap &map,
311  const std::string &fw_policy_uuid,
312  const std::string &nw_policy_uuid,
313  const std::string &sg_policy_uuid,
314  const bool &deleted_flag,
315  bool *match,
316  const bool &exported_once);
317 
318  void GetPolicyIdFromFlow(const FlowEntry *fe,
319  std::string &fw_policy_uuid,
320  std::string &nw_policy_uuid,
321  std::string &sg_policy_uuid);
322 
324  std::string& fw_policy_uuid,
325  std::string& nw_policy_uuid,
326  std::string& sg_policy_uuid);
327 
328  bool MatchSloForFlow(const SessionStatsInfo &stats_info,
329  const FlowEntry *fe,
330  const std::string& fw_policy_uuid,
331  const std::string& nw_policy_uuid,
332  const std::string& sg_policy_uuid,
333  const bool &deleted_flag,
334  bool *logged,
335  const bool &exported_once);
336 
337  void BuildSloList(const SessionStatsInfo &stats_info,
338  const FlowEntry *fe,
339  SessionSloRuleMap *global_session_slo_rule_map,
340  SessionSloRuleMap *vmi_session_slo_rule_map,
341  SessionSloRuleMap *vn_session_slo_rule_map);
342  void MakeSloList(const FlowEntry *fe,
343  SessionSloRuleMap *vmi_session_slo_rule_map,
344  SessionSloRuleMap *vn_session_slo_rule_map);
345 
346  bool FlowLogging(const SessionStatsInfo &stats_info,
347  const FlowEntry *fe,
348  bool *logged,
349  const bool &exported_once);
350 
351  bool DeletedFlowLogging(const SessionStatsInfo &stats_info,
352  const SessionFlowExportInfo &flow_info,
353  bool *logged,
354  const bool &exported_once);
355 
356  bool HandleDeletedFlowLogging(const SessionStatsInfo &stats_info);
357  bool HandleFlowLogging(const SessionStatsInfo &stats_info);
358  bool CheckSessionLogging(const SessionStatsInfo &stats_info);
359  void AddSloList(const UuidList &slo_list, SessionSloRuleMap *slo_rule_map);
360  void AddSloEntry(const boost::uuids::uuid &uuid,
361  SessionSloRuleMap *slo_rule_map);
363  SessionSloRuleMap *slo_rule_map);
365  SessionSloRuleMap *r_map);
367  SessionSloRuleMap *rule_map);
368  void AddSloRules(
369  const std::vector<autogen::SecurityLoggingObjectRuleEntryType> &list,
371  SessionSloRuleMap *slo_rule_map);
372  void AddSessionSloRuleEntry(const std::string &uuid, int rate,
374  SessionSloRuleMap *slo_rule_map);
375  void SloNotify(DBTablePartBase *partition, DBEntryBase *e);
377  SessionSloState *state);
379  SessionPreAggInfo::SessionMap::iterator session_map_iter);
380 
382  int task_id_;
389  std::vector<SessionEndpoint> session_msg_list_;
391  uint32_t instance_id_;
395  // Cached UTC Time stamp
396  // The timestamp is taken once on SessionStatsCollector::RequestHandlerEntry()
397  // and used for all requests in current run
398  uint64_t current_time_;
403 };
404 
406 public:
407  static const int kMaxSessionCollectors = 1;
408  typedef boost::shared_ptr<SessionStatsCollector> SessionStatsCollectorPtr;
410  SessionStatsCollector* GetCollector(uint8_t idx) const;
411  void SetExpiryTime(int time);
412  int GetExpiryTime() const;
414  void Shutdown();
415  size_t Size() const;
416  void RegisterDBClients();
417 private:
420 };
421 
423 public:
424  enum Event {
429  };
430 
431  SessionStatsReq(Event ev, const FlowEntryPtr &flow, uint64_t time):
432  event_(ev), flow_(flow), time_(time) {
433  }
435  const RevFlowDepParams &p) :
436  event_(ev), flow_(flow), time_(time), params_(p) {
437  }
439  uint32_t packets, uint32_t oflow_bytes,
440  const boost::uuids::uuid &u) :
443  }
444 
446 
447  Event event() const { return event_; }
448  FlowEntry* flow() const { return flow_.get(); }
449  FlowEntry* reverse_flow() const;
450  uint64_t time() const { return time_; }
451  const RevFlowDepParams& params() const { return params_; }
452  uint32_t bytes() const { return bytes_;}
453  uint32_t packets() const { return packets_;}
454  uint32_t oflow_bytes() const { return oflow_bytes_;}
455  boost::uuids::uuid uuid() const { return uuid_; }
456 
457 private:
460  uint64_t time_;
462  uint32_t bytes_;
463  uint32_t packets_;
464  uint32_t oflow_bytes_;
467 };
468 
470 public:
477  }
478  bool IsEqual(FlowToSessionMap &rhs);
482 private:
486 };
487 
489 public:
491  rate(rate), slo_uuid(uuid) {}
492 
493  int rate;
495 };
496 
498 public:
499  int rate;
501 };
502 
503 class SessionSloState : public DBState {
504 public:
505  typedef std::map<std::string, SessionSloRuleState> SessionSloRuleStateMap;
506  void DeleteSessionSloStateRuleEntry(std::string uuid);
507  void UpdateSessionSloStateRuleEntry(std::string uuid, int rate);
508  bool UpdateSessionSloStateRuleRefCount(const std::string &uuid, bool *matc);
511  session_rule_state_map_.clear();
512  }
513 private:
515 };
516 
517 #endif //vnsw_agent_session_stats_collector_h
boost::asio::ip::address IpAddress
Definition: address.h:14
std::vector< boost::uuids::uuid > UuidList
Definition: agent.h:204
std::vector< uint64_t > TagList
Definition: agent.h:203
Definition: agent.h:361
int ListenerId
Definition: db_table.h:63
SessionEndpointKey session_endpoint_key_
SessionEndpointKey session_endpoint_key()
SessionAggKey session_agg_key()
SessionAggKey session_agg_key_
bool IsEqual(FlowToSessionMap &rhs)
FlowToSessionMap(SessionKey &session_key, SessionAggKey &session_agg_key, SessionEndpointKey &session_endpoint_key)
void DeleteSessionSloStateRuleEntry(std::string uuid)
std::map< std::string, SessionSloRuleState > SessionSloRuleStateMap
SessionSloRuleStateMap session_rule_state_map_
bool UpdateSessionSloStateRuleRefCount(const std::string &uuid, bool *matc)
void UpdateSessionSloStateRuleEntry(std::string uuid, int rate)
SessionStatsCollectorPtr collectors[kMaxSessionCollectors]
SessionStatsCollector * FlowToCollector(const FlowEntry *flow)
SessionStatsCollectorObject(Agent *agent, FlowStatsManager *mgr)
SessionStatsCollector * GetCollector(uint8_t idx) const
boost::shared_ptr< SessionStatsCollector > SessionStatsCollectorPtr
DISALLOW_COPY_AND_ASSIGN(SessionStatsCollectorObject)
std::string Description() const
Gives a description of the task.
bool Run()
Code to execute in a task. Returns true if task is completed. Return false to reschedule the task.
void FillSessionEvictStats(SessionPreAggInfo::SessionMap::iterator session_map_iter, SessionInfo *session_info, bool is_sampling, bool is_logging) const
void AddFlowToSessionMap(FlowEntry *fe, SessionKey session_key, SessionAggKey session_agg_key, SessionEndpointKey session_endpoint_key)
void FillSessionRemoteTags(const TagList &list, SessionEndpoint *ep) const
void GetPolicyIdFromFlow(const FlowEntry *fe, std::string &fw_policy_uuid, std::string &nw_policy_uuid, std::string &sg_policy_uuid)
bool SessionStatsChangedLocked(SessionPreAggInfo::SessionMap::iterator session_map_iter, SessionStatsParams *params) const
void FillSessionInfoLocked(SessionPreAggInfo::SessionMap::iterator session_map_iter, const SessionStatsParams &stats, SessionInfo *session_info, SessionIpPort *session_key, bool is_sampling, bool is_logging) const
void FillSessionFlowStats(const SessionFlowStatsParams &stats, SessionFlowInfo *flow_info, bool is_sampling, bool is_logging) const
void AddSloFirewallPolicies(SecurityLoggingObject *slo, SessionSloRuleMap *r_map)
bool MatchSloForFlow(const SessionStatsInfo &stats_info, const FlowEntry *fe, const std::string &fw_policy_uuid, const std::string &nw_policy_uuid, const std::string &sg_policy_uuid, const bool &deleted_flag, bool *logged, const bool &exported_once)
static const uint32_t kSessionStatsTimerInterval
void AddSloEntry(const boost::uuids::uuid &uuid, SessionSloRuleMap *slo_rule_map)
WorkQueue< boost::shared_ptr< SessionStatsReq > > Queue
void AddSloEntryRules(SecurityLoggingObject *slo, SessionSloRuleMap *slo_rule_map)
SessionAggKey session_agg_iteration_key_
void BuildSloList(const SessionStatsInfo &stats_info, const FlowEntry *fe, SessionSloRuleMap *global_session_slo_rule_map, SessionSloRuleMap *vmi_session_slo_rule_map, SessionSloRuleMap *vn_session_slo_rule_map)
SessionEndpointKey session_ep_iteration_key_
std::map< std::string, SessionSloRuleEntry > SessionSloRuleMap
void FillSessionTags(const TagList &list, SessionEndpoint *ep) const
std::vector< SessionEndpoint > session_msg_list_
void CopyFlowInfoInternal(SessionFlowExportInfo *info, const boost::uuids::uuid &u, FlowEntry *fe) const
void FillSessionFlowInfo(const SessionFlowStatsInfo &session_flow, const SessionStatsInfo &sinfo, const SessionFlowExportInfo &einfo, SessionFlowInfo *flow_info) const
bool CheckSessionLogging(const SessionStatsInfo &stats_info)
bool SessionStatsChangedUnlocked(SessionPreAggInfo::SessionMap::iterator session_map_iter, SessionStatsParams *params) const
void UpdateAggregateStats(const SessionInfo &sinfo, SessionAggInfo *agg_info, bool is_sampling, bool is_logging) const
void UpdateSloStateRules(SecurityLoggingObject *slo, SessionSloState *state)
bool RequestHandler(boost::shared_ptr< SessionStatsReq > req)
void UpdateSessionStatsInfo(FlowEntry *fe, uint64_t setup_time, SessionStatsInfo *session) const
bool SampleSession(SessionPreAggInfo::SessionMap::iterator session_map_iter, SessionStatsParams *params) const
static const uint32_t kSessionsPerTask
void CopyFlowInfo(SessionStatsInfo &session, const RevFlowDepParams *params)
bool FetchFlowStats(SessionFlowStatsInfo *info, SessionFlowStatsParams *params) const
void UpdateSessionStatsEvent(const FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u)
void AddSloFirewallRules(SecurityLoggingObject *slo, SessionSloRuleMap *rule_map)
void EvictedSessionStatsUpdate(const FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u)
void MakeSloList(const FlowEntry *fe, SessionSloRuleMap *vmi_session_slo_rule_map, SessionSloRuleMap *vn_session_slo_rule_map)
void UpdateSessionFlowStatsInfo(FlowEntry *fe, SessionFlowStatsInfo *session_flow) const
bool CheckPolicyMatch(const SessionSloRuleMap &map, const std::string &policy_uuid, const bool &deleted_flag, bool *match, const bool &exported_once)
uint32_t RunSessionEndpointStats(uint32_t max_count)
void FillSessionInfoUnlocked(SessionPreAggInfo::SessionMap::iterator session_map_iter, const SessionStatsParams &stats, SessionInfo *session_info, SessionIpPort *session_key, const RevFlowDepParams *params, bool read_flow, bool is_sampling, bool is_logging) const
void DeleteFlowToSessionMap(FlowEntry *fe)
void AddSloRules(const std::vector< autogen::SecurityLoggingObjectRuleEntryType > &list, SecurityLoggingObject *slo, SessionSloRuleMap *slo_rule_map)
bool DeletedFlowLogging(const SessionStatsInfo &stats_info, const SessionFlowExportInfo &flow_info, bool *logged, const bool &exported_once)
static uint64_t GetCurrentTime()
const Queue * queue() const
DISALLOW_COPY_AND_ASSIGN(SessionStatsCollector)
void FillSessionEndpoint(SessionEndpointMap::iterator it, SessionEndpoint *session_ep) const
bool CheckAndDeleteSessionStatsFlow(SessionPreAggInfo::SessionMap::iterator session_map_iter)
SessionStatsCollector(boost::asio::io_context &io, AgentUveBase *uve, uint32_t instance_id, FlowStatsManager *fsm, SessionStatsCollectorObject *obj)
void AddSession(FlowEntry *fe, uint64_t setup_time)
void DeleteSession(FlowEntry *fe, const boost::uuids::uuid &del_uuid, uint64_t teardown_time, const RevFlowDepParams *params)
SessionEndpointMap session_endpoint_map_
void FillSessionAggInfo(SessionEndpointInfo::SessionAggMap::iterator it, SessionIpPortProtocol *session_agg_key) const
SessionStatsCollectorObject * parent_
void DeleteEvent(const FlowEntryPtr &flow, const RevFlowDepParams &params)
int ComputeSloRate(int rate, SecurityLoggingObject *slo) const
bool FindSloMatchRule(const SessionSloRuleMap &map, const std::string &fw_policy_uuid, const std::string &nw_policy_uuid, const std::string &sg_policy_uuid, const bool &deleted_flag, bool *match, const bool &exported_once)
virtual void DispatchSessionMsg(const std::vector< SessionEndpoint > &lst)
bool HandleFlowLogging(const SessionStatsInfo &stats_info)
void AddEvent(const FlowEntryPtr &flow)
uint64_t GetUpdatedSessionFlowPackets(uint64_t info_packets, uint64_t k_flow_pkts) const
bool ProcessSessionEndpoint(const SessionEndpointMap::iterator &it)
std::map< FlowEntryPtr, FlowToSessionMap > FlowSessionMap
void GetPolicyIdFromDeletedFlow(const SessionFlowExportInfo &flow_info, std::string &fw_policy_uuid, std::string &nw_policy_uuid, std::string &sg_policy_uuid)
void SloNotify(DBTablePartBase *partition, DBEntryBase *e)
bool GetSessionKey(FlowEntry *fe, SessionAggKey &session_agg_key, SessionKey &session_key, SessionEndpointKey &session_endpoint_key)
DBTable::ListenerId slo_listener_id_
void AddSessionSloRuleEntry(const std::string &uuid, int rate, SecurityLoggingObject *slo, SessionSloRuleMap *slo_rule_map)
FlowStatsManager * flow_stats_manager_
void AddSloList(const UuidList &slo_list, SessionSloRuleMap *slo_rule_map)
bool HandleDeletedFlowLogging(const SessionStatsInfo &stats_info)
uint64_t GetUpdatedSessionFlowBytes(uint64_t info_bytes, uint64_t k_flow_bytes) const
bool FlowLogging(const SessionStatsInfo &stats_info, const FlowEntry *fe, bool *logged, const bool &exported_once)
bool UpdateSloMatchRuleEntry(const boost::uuids::uuid &slo_uuid, const std::string &match_uuid, bool *match)
std::map< const SessionEndpointKey, SessionEndpointInfo, SessionEndpointKeyCmp > SessionEndpointMap
boost::uuids::uuid uuid() const
SessionStatsReq(Event ev, const FlowEntryPtr &flow, uint64_t time)
SessionStatsReq(Event event, const FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u)
const RevFlowDepParams & params() const
boost::uuids::uuid uuid_
DISALLOW_COPY_AND_ASSIGN(SessionStatsReq)
uint32_t bytes() const
uint32_t oflow_bytes() const
FlowEntry * flow() const
RevFlowDepParams params_
uint32_t packets() const
FlowEntry * reverse_flow() const
SessionStatsReq(Event ev, const FlowEntryPtr &flow, uint64_t time, const RevFlowDepParams &p)
Task is a class to describe a computational task within OpenSDN control plane applications....
Definition: task.h:82
boost::intrusive_ptr< FlowEntry > FlowEntryPtr
Definition: flow_entry.h:126
Definition: io_utils.cc:12
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
Definition: sandesh_trace.h:19
SandeshTraceBufferPtr SessionStatsTraceBuf
bool operator()(const SessionAggKey &lhs, const SessionAggKey &rhs) const
bool IsEqual(const SessionAggKey &rhs) const
bool IsLess(const SessionAggKey &rhs) const
std::map< const SessionAggKey, SessionPreAggInfo, SessionAggKeyCmp > SessionAggMap
bool operator()(const SessionEndpointKey &lhs, const SessionEndpointKey &rhs) const
bool IsEqual(const SessionEndpointKey &rhs) const
bool IsLess(const SessionEndpointKey &rhs) const
SessionFlowExportInfo fwd_flow
SessionFlowExportInfo rev_flow
bool operator()(const SessionKey &lhs, const SessionKey &rhs) const
bool IsEqual(const SessionKey &rhs) const
boost::uuids::uuid uuid
bool IsLess(const SessionKey &rhs) const
std::map< const SessionKey, SessionStatsInfo, SessionKeyCmp > SessionMap
boost::uuids::uuid slo_uuid
SessionSloRuleEntry(int rate, const boost::uuids::uuid &uuid)
SessionStatsParams evict_stats
SessionExportInfo export_info
SessionFlowStatsInfo fwd_flow
SessionFlowStatsInfo rev_flow
SessionStatsParams del_stats
SessionFlowStatsParams rev_flow
SessionFlowStatsParams fwd_flow
boost::uuids::uuid uuid