Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : */ 4 : 5 : #ifndef vnsw_agent_flow_kstate_h 6 : #define vnsw_agent_flow_kstate_h 7 : 8 : class FlowKState : public Task { 9 : public: 10 : FlowKState(Agent *agent, const std::string &resp_ctx, int idx); 11 : FlowKState(Agent *agent, const std::string &resp_ctx, 12 : const std::string &iter_idx); 13 : virtual void SendResponse(KFlowResp *resp) const; 14 : 15 : virtual bool Run(); 16 0 : std::string Description() const { return "FlowKState"; } 17 : void SetFlowData(std::vector<KFlowInfo> &list, const vr_flow_entry *k_flow, 18 : int index) const; 19 0 : void set_evicted_flag(bool show_evicted) { evicted_ = show_evicted;} 20 : protected: 21 : std::string response_context_; 22 : int flow_idx_; 23 : bool evicted_; 24 : uint32_t flow_iteration_key_; 25 : private: 26 : Agent *agent_; 27 : void UpdateFlagStr(std::string &str, bool &set, bool tcp, unsigned sflag, 28 : unsigned cflag) const; 29 : const std::string FlagToStr(unsigned int flag) const; 30 : const std::string TcpFlagToStr(unsigned int flag) const; 31 : const std::string DropCodeToStr(uint8_t drop_code) const; 32 : void SetFlowHandle(KFlowResp *resp, const uint32_t idx) const; 33 : }; 34 : #endif