OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
icmpv6_error_proto.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 #ifndef VNSW_AGENT_SERVICES_ICMPV6_ERROR_PROTO_H_
5 #define VNSW_AGENT_SERVICES_ICMPV6_ERROR_PROTO_H_
6 
7 #include <boost/asio.hpp>
8 #include "pkt/proto.h"
9 
10 class Icmpv6ErrorProto : public Proto {
11  public:
12  struct Stats {
13  Stats() { Reset(); }
14  ~Stats() { }
15  void Reset() {
16  drops = 0;
17  interface_errors = 0;
18  }
19 
20  uint32_t drops;
21  uint32_t interface_errors;
22  };
23 
24  Icmpv6ErrorProto(Agent *agent, boost::asio::io_context &io);
25  virtual ~Icmpv6ErrorProto();
26  ProtoHandler *AllocProtoHandler(boost::shared_ptr<PktInfo> info,
27  boost::asio::io_context &io);
28 
31  const Stats &GetStats() const { return stats_; }
32  void ClearStats() { stats_.Reset(); }
33 
34  private:
37 };
38 
39 #endif // VNSW_AGENT_SERVICES_ICMPV6_ERROR_PROTO_H_
ProtoHandler * AllocProtoHandler(boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
DISALLOW_COPY_AND_ASSIGN(Icmpv6ErrorProto)
void increment_interface_errors()
Definition: agent.h:358
Icmpv6ErrorProto(Agent *agent, boost::asio::io_context &io)
const Stats & GetStats() const