Line data Source code
1 : /* 2 : * Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : 6 : #ifndef __AGENT_PKT_FLOW_ENTRY_INFO_H__ 7 : #define __AGENT_PKT_FLOW_ENTRY_INFO_H__ 8 : 9 : #include <pkt/flow_mgmt/flow_mgmt_tree.h> 10 : 11 : //////////////////////////////////////////////////////////////////////////// 12 : // Per flow information stored in flow-mgmt module. Holds a reference to 13 : // flow so that flow active till flow-mgmt processing is done 14 : //////////////////////////////////////////////////////////////////////////// 15 : class FlowEntryInfo { 16 : public: 17 144 : FlowEntryInfo(FlowEntry *flow) : 18 144 : flow_(flow), tree_(), count_(0), ingress_(false), local_flow_(false) { 19 144 : } 20 288 : virtual ~FlowEntryInfo() { assert(tree_.size() == 0); } 21 0 : const FlowMgmtKeyTree &tree() const { return tree_; } 22 : 23 : private: 24 : friend class FlowMgmtManager; 25 : FlowEntryPtr flow_; 26 : FlowMgmtKeyTree tree_; 27 : uint32_t count_; // Number of times tree modified 28 : bool ingress_; 29 : bool local_flow_; 30 : DISALLOW_COPY_AND_ASSIGN(FlowEntryInfo); 31 : }; 32 : 33 : #endif // __AGENT_PKT_FLOW_ENTRY_INFO_H__