OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
flow_export_info.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
3  */
4 #ifndef __AGENT_FLOW_EXPORT_INFO_H__
5 #define __AGENT_FLOW_EXPORT_INFO_H__
6 
7 #include <pkt/flow_entry.h>
8 #include <filter/acl.h>
9 
10 class FlowExportInfo : public boost::intrusive::list_base_hook<> {
11 public:
13  FlowExportInfo(const FlowEntryPtr &fe, uint64_t setup_time);
14  FlowExportInfo(const FlowEntryPtr &fe);
16 
17  FlowEntry* flow() const { return flow_.get(); }
18  FlowEntry* reverse_flow() const;
19  uint64_t teardown_time() const { return teardown_time_; }
20  void set_teardown_time(uint64_t time) { teardown_time_ = time; }
21  uint64_t last_modified_time() const { return last_modified_time_; }
22  void set_last_modified_time(uint64_t time) { last_modified_time_ = time; }
23 
24  uint64_t bytes() const { return bytes_; }
25  void set_bytes(uint64_t value) { bytes_ = value; }
26  uint64_t packets() const { return packets_; }
27  void set_packets(uint64_t value) { packets_ = value; }
28 
29  void set_delete_enqueue_time(uint64_t value) { delete_enqueue_time_ = value; }
30  uint64_t delete_enqueue_time() const { return delete_enqueue_time_; }
31  void set_evict_enqueue_time(uint64_t value) { evict_enqueue_time_ = value; }
32  uint64_t evict_enqueue_time() const { return evict_enqueue_time_; }
33 
34  uint8_t gen_id() const { return gen_id_; }
35  void set_gen_id(uint8_t value) { gen_id_ = value; }
36  uint32_t flow_handle() const { return flow_handle_; }
37  void set_flow_handle(uint32_t value) { flow_handle_ = value; }
38  const boost::uuids::uuid &uuid() const { return uuid_; }
39  void CopyFlowInfo(FlowEntry *fe);
40  void ResetStats();
41 
42 private:
44  uint64_t teardown_time_;
45  uint64_t last_modified_time_; //used for aging
46  uint64_t bytes_;
47  uint64_t packets_;
50  uint8_t gen_id_;
51  uint32_t flow_handle_;
53 };
54 
55 typedef boost::intrusive::list<FlowExportInfo> FlowExportInfoList;
56 #endif // __AGENT_FLOW_EXPORT_INFO_H__
void set_flow_handle(uint32_t value)
void set_packets(uint64_t value)
uint8_t gen_id() const
void set_teardown_time(uint64_t time)
uint64_t evict_enqueue_time() const
void set_last_modified_time(uint64_t time)
boost::intrusive::list< FlowExportInfo > FlowExportInfoList
uint64_t delete_enqueue_time_
void CopyFlowInfo(FlowEntry *fe)
boost::uuids::uuid uuid
uint64_t last_modified_time() const
void set_evict_enqueue_time(uint64_t value)
uint64_t teardown_time_
FlowEntry * flow() const
uint32_t flow_handle_
const boost::uuids::uuid & uuid() const
uint64_t last_modified_time_
FlowEntryPtr flow_
void set_gen_id(uint8_t value)
uint64_t delete_enqueue_time() const
boost::uuids::uuid uuid_
uint32_t flow_handle() const
uint64_t evict_enqueue_time_
uint64_t packets() const
void set_bytes(uint64_t value)
uint64_t bytes() const
uint64_t teardown_time() const
FlowEntry * reverse_flow() const
boost::intrusive_ptr< FlowEntry > FlowEntryPtr
Definition: flow_entry.h:125
void set_delete_enqueue_time(uint64_t value)