Line data Source code
1 : /* 2 : * Copyright (c) 2020 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : 6 : #ifndef SRC_VNSW_AGENT_MAC_IP_LEARNING_MAC_LEARNING_PROTO_HANDLER_H_ 7 : #define SRC_VNSW_AGENT_MAC_IP_LEARNING_MAC_LEARNING_PROTO_HANDLER_H_ 8 : 9 : #include <net/if.h> 10 : #include "cmn/agent.h" 11 : #include "cmn/agent_cmn.h" 12 : #include "base/queue_task.h" 13 : #include "pkt/proto.h" 14 : #include "pkt/proto_handler.h" 15 : #include "mac_learning/mac_ip_learning.h" 16 : 17 : class MacIpLearningProtoHandler : public ProtoHandler { 18 : public: 19 : MacIpLearningProtoHandler(Agent *agent, 20 : boost::shared_ptr<PktInfo> info, 21 : boost::asio::io_context &io); 22 0 : virtual ~MacIpLearningProtoHandler() {} 23 : bool Run(); 24 : private: 25 : void PktHandler(); 26 : void Log(std::string str); 27 : const Interface *intf_; 28 : const VrfEntry *vrf_; 29 : MacIpLearningTable *table_; 30 : MacLearningEntryPtr entry_; 31 : DISALLOW_COPY_AND_ASSIGN(MacIpLearningProtoHandler); 32 : }; 33 : #endif