OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
icmp_handler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef vnsw_agent_icmp_handler_h_
6 #define vnsw_agent_icmp_handler_h_
7 
8 #include "pkt/proto_handler.h"
9 
10 // ICMP protocol handler
11 class IcmpHandler : public ProtoHandler {
12 public:
13  IcmpHandler(Agent *agent, boost::shared_ptr<PktInfo> info,
14  boost::asio::io_context &io);
15  virtual ~IcmpHandler();
16 
17  bool Run();
18 
19 private:
20  bool CheckPacket();
21  void SendResponse(VmInterface *vm_intf);
22 
23  struct icmp *icmp_;
24  uint16_t icmp_len_;
26 };
27 
28 #endif // vnsw_agent_icmp_handler_h_
Agent * agent() const
Definition: proto_handler.h:80
IcmpHandler(Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
Definition: icmp_handler.cc:14
struct icmp * icmp_
Definition: icmp_handler.h:23
Definition: agent.h:358
bool CheckPacket()
Definition: icmp_handler.cc:52
void SendResponse(VmInterface *vm_intf)
Definition: icmp_handler.cc:64
virtual ~IcmpHandler()
Definition: icmp_handler.cc:20
uint16_t icmp_len_
Definition: icmp_handler.h:24
DISALLOW_COPY_AND_ASSIGN(IcmpHandler)