OpenSDN source code
flow_handler.h
Go to the documentation of this file.
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  FlowHandler(Agent *agent, boost::shared_ptr<PktInfo> info,
19  boost::asio::io_context &io, FlowProto *proto, uint16_t index) :
20  ProtoHandler(agent, info, io), flow_proto_(proto),
21  flow_table_index_(index) {
22  }
23  virtual ~FlowHandler() {}
24 
25  bool Run();
26 
27  static const std::string UnknownVn() { return unknown_vn_; }
28  static const VnListType UnknownVnList() {
29  VnListType unknown_vn_list;
30  unknown_vn_list.insert(unknown_vn_);
31  return unknown_vn_list;
32  }
33  static const std::string LinkLocalVn() {
35  }
36  bool IsL3ModeFlow() const;
37 
38 private:
41 };
42 
43 #endif // vnsw_agent_flow_handler_hpp
std::set< std::string > VnListType
Definition: agent.h:213
Definition: agent.h:361
static Agent * GetInstance()
Definition: agent.h:439
const std::string & linklocal_vn_name()
Definition: agent.h:923
virtual ~FlowHandler()
Definition: flow_handler.h:23
static const std::string LinkLocalVn()
Definition: flow_handler.h:33
FlowHandler(Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io, FlowProto *proto, uint16_t index)
Definition: flow_handler.h:18
uint16_t flow_table_index_
Definition: flow_handler.h:40
FlowProto * flow_proto_
Definition: flow_handler.h:39
static const VnListType UnknownVnList()
Definition: flow_handler.h:28
bool IsL3ModeFlow() const
Definition: flow_handler.cc:30
static const std::string UnknownVn()
Definition: flow_handler.h:27
Agent * agent() const
Definition: proto_handler.h:81
static const std::string unknown_vn_
Definition: flow_handler.h:11
Definition: io_utils.cc:12