OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
flow_export_info.cc
Go to the documentation of this file.
2 #include <pkt/flow_table.h>
3 
5  flow_(), teardown_time_(0), last_modified_time_(0),
6  bytes_(0), packets_(0),
7  delete_enqueue_time_(0), evict_enqueue_time_(0),
8  gen_id_(0),
9  flow_handle_(FlowEntry::kInvalidFlowHandle) {
10 }
11 
13  flow_(fe), teardown_time_(0), last_modified_time_(0),
14  bytes_(0), packets_(0),
15  delete_enqueue_time_(0), evict_enqueue_time_(0),
16  gen_id_(0),
17  flow_handle_(FlowEntry::kInvalidFlowHandle) {
18 }
19 
20 FlowExportInfo::FlowExportInfo(const FlowEntryPtr &fe, uint64_t setup_time) :
21  flow_(fe),
22  teardown_time_(0), last_modified_time_(setup_time),
23  bytes_(0), packets_(0),
24  delete_enqueue_time_(0), evict_enqueue_time_(0),
25  gen_id_(0),
26  flow_handle_(FlowEntry::kInvalidFlowHandle) {
27 }
28 
30  FlowEntry *rflow = NULL;
31  if (flow_.get()) {
32  rflow = flow_->reverse_flow_entry();
33  }
34  return rflow;
35 }
36 
38  gen_id_ = fe->gen_id();
39  flow_handle_ = fe->flow_handle();
40  uuid_ = fe->uuid();
41 }
42 
44  bytes_ = packets_ = 0;
45 }
void CopyFlowInfo(FlowEntry *fe)
uint32_t flow_handle_
const boost::uuids::uuid & uuid() const
Definition: flow_entry.h:631
FlowEntryPtr flow_
boost::uuids::uuid uuid_
uint32_t flow_handle() const
Definition: flow_entry.h:600
uint8_t gen_id() const
Definition: flow_entry.h:599
FlowEntry * reverse_flow() const
boost::intrusive_ptr< FlowEntry > FlowEntryPtr
Definition: flow_entry.h:125