OpenSDN source code
icmp_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_icmp_handler_h_
7 #define vnsw_agent_icmp_handler_h_
8 
9 #include "pkt/proto_handler.h"
10 
11 // ICMP protocol handler
12 class IcmpHandler : public ProtoHandler {
13 public:
14  IcmpHandler(Agent *agent, boost::shared_ptr<PktInfo> info,
15  boost::asio::io_context &io);
16  virtual ~IcmpHandler();
17 
18  bool Run();
19 
20 private:
21  bool CheckPacket();
22  void SendResponse(VmInterface *vm_intf);
23 
24  struct icmp *icmp_;
25  uint16_t icmp_len_;
27 };
28 
29 #endif // vnsw_agent_icmp_handler_h_
Definition: agent.h:361
IcmpHandler(Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
Definition: icmp_handler.cc:15
uint16_t icmp_len_
Definition: icmp_handler.h:25
virtual ~IcmpHandler()
Definition: icmp_handler.cc:21
void SendResponse(VmInterface *vm_intf)
Definition: icmp_handler.cc:65
struct icmp * icmp_
Definition: icmp_handler.h:24
bool CheckPacket()
Definition: icmp_handler.cc:53
DISALLOW_COPY_AND_ASSIGN(IcmpHandler)
Agent * agent() const
Definition: proto_handler.h:81
Definition: io_utils.cc:12