Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : 6 : #ifndef vnsw_agent_flow_handler_hpp 7 : #define vnsw_agent_flow_handler_hpp 8 : 9 : #include "pkt/proto_handler.h" 10 : 11 : static const std::string unknown_vn_ = "__UNKNOWN__"; 12 : 13 : struct PktInfo; 14 : class PktFlowInfo; 15 : 16 : class FlowHandler : public ProtoHandler { 17 : public: 18 50 : FlowHandler(Agent *agent, boost::shared_ptr<PktInfo> info, 19 50 : boost::asio::io_context &io, FlowProto *proto, uint16_t index) : 20 50 : ProtoHandler(agent, info, io), flow_proto_(proto), 21 50 : flow_table_index_(index) { 22 50 : } 23 100 : virtual ~FlowHandler() {} 24 : 25 : bool Run(); 26 : 27 45 : static const std::string UnknownVn() { return unknown_vn_; } 28 44 : static const VnListType UnknownVnList() { 29 44 : VnListType unknown_vn_list; 30 44 : unknown_vn_list.insert(unknown_vn_); 31 44 : return unknown_vn_list; 32 0 : } 33 1 : static const std::string LinkLocalVn() { 34 1 : return Agent::GetInstance()->linklocal_vn_name(); 35 : } 36 : bool IsL3ModeFlow() const; 37 : 38 : private: 39 : FlowProto *flow_proto_; 40 : uint16_t flow_table_index_; 41 : }; 42 : 43 : #endif // vnsw_agent_flow_handler_hpp