Line data Source code
1 : #include <vrouter/flow_stats/flow_stats_collector.h> 2 : #include <pkt/flow_table.h> 3 : 4 0 : FlowExportInfo::FlowExportInfo() : 5 0 : flow_(), teardown_time_(0), last_modified_time_(0), 6 0 : bytes_(0), packets_(0), 7 0 : delete_enqueue_time_(0), evict_enqueue_time_(0), 8 0 : gen_id_(0), 9 0 : flow_handle_(FlowEntry::kInvalidFlowHandle) { 10 0 : } 11 : 12 12 : FlowExportInfo::FlowExportInfo(const FlowEntryPtr &fe) : 13 12 : flow_(fe), teardown_time_(0), last_modified_time_(0), 14 12 : bytes_(0), packets_(0), 15 12 : delete_enqueue_time_(0), evict_enqueue_time_(0), 16 12 : gen_id_(0), 17 12 : flow_handle_(FlowEntry::kInvalidFlowHandle) { 18 12 : } 19 : 20 12 : FlowExportInfo::FlowExportInfo(const FlowEntryPtr &fe, uint64_t setup_time) : 21 12 : flow_(fe), 22 12 : teardown_time_(0), last_modified_time_(setup_time), 23 12 : bytes_(0), packets_(0), 24 12 : delete_enqueue_time_(0), evict_enqueue_time_(0), 25 12 : gen_id_(0), 26 12 : flow_handle_(FlowEntry::kInvalidFlowHandle) { 27 12 : } 28 : 29 24 : FlowEntry* FlowExportInfo::reverse_flow() const { 30 24 : FlowEntry *rflow = NULL; 31 24 : if (flow_.get()) { 32 24 : rflow = flow_->reverse_flow_entry(); 33 : } 34 24 : return rflow; 35 : } 36 : 37 12 : void FlowExportInfo::CopyFlowInfo(FlowEntry *fe) { 38 12 : gen_id_ = fe->gen_id(); 39 12 : flow_handle_ = fe->flow_handle(); 40 12 : uuid_ = fe->uuid(); 41 12 : } 42 : 43 0 : void FlowExportInfo::ResetStats() { 44 0 : bytes_ = packets_ = 0; 45 0 : }