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