OpenSDN source code
igmp_handler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef vnsw_agent_igmp_handler_h_
7 #define vnsw_agent_igmp_handler_h_
8 
9 #include "pkt/proto_handler.h"
11 
12 // IGMP protocol handler
13 class IgmpHandler : public ProtoHandler {
14 public:
15  IgmpHandler(Agent *agent, boost::shared_ptr<PktInfo> info,
16  boost::asio::io_context &io);
17  virtual ~IgmpHandler();
18 
19  bool Run();
20 
21 private:
22  bool HandleVmIgmpPacket();
23  bool CheckPacket() const;
24  void SendPacket(const VmInterface *vm_itf, const VrfEntry *vrf,
25  const IpAddress& gmp_addr, GmpPacket *packet);
26 
27  struct igmp *igmp_;
28  uint16_t igmp_len_;
29 
30  friend class IgmpProto;
31 
33 };
34 
35 #endif // vnsw_agent_igmp_handler_h_
boost::asio::ip::address IpAddress
Definition: address.h:14
Definition: agent.h:361
bool CheckPacket() const
struct igmp * igmp_
Definition: igmp_handler.h:27
DISALLOW_COPY_AND_ASSIGN(IgmpHandler)
virtual ~IgmpHandler()
Definition: igmp_handler.cc:26
void SendPacket(const VmInterface *vm_itf, const VrfEntry *vrf, const IpAddress &gmp_addr, GmpPacket *packet)
bool HandleVmIgmpPacket()
Definition: igmp_handler.cc:39
IgmpHandler(Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
Definition: igmp_handler.cc:16
uint16_t igmp_len_
Definition: igmp_handler.h:28
Agent * agent() const
Definition: proto_handler.h:81
Definition: vrf.h:90
Definition: io_utils.cc:12