Line data Source code
1 : /* 2 : * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : 6 : #ifndef SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_PROTO_HANDLER_H_ 7 : #define SRC_VNSW_AGENT_MAC_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_learning.h" 16 : 17 : class MacLearningProtoHandler : public ProtoHandler { 18 : public: 19 : MacLearningProtoHandler(Agent *agent, 20 : boost::shared_ptr<PktInfo> info, 21 : boost::asio::io_context &io); 22 0 : virtual ~MacLearningProtoHandler() {} 23 : bool Run(); 24 : private: 25 : void IngressPktHandler(); 26 : void EgressPktHandler(); 27 : void Log(std::string str); 28 : const Interface *intf_; 29 : const VrfEntry *vrf_; 30 : MacLearningPartition *table_; 31 : MacLearningEntryPtr entry_; 32 : DISALLOW_COPY_AND_ASSIGN(MacLearningProtoHandler); 33 : }; 34 : #endif