Line data Source code
1 : /* 2 : * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. 3 : */ 4 : 5 : #include "mac_learning_proto_handler.h" 6 : #include "mac_learning_mgmt.h" 7 : #include "mac_learning_init.h" 8 : 9 : SandeshTraceBufferPtr MacLearningTraceBuf(SandeshTraceBufferCreate("MacLearning", 10 : 5000)); 11 : 12 3 : MacLearningModule::MacLearningModule(Agent *agent): 13 3 : agent_(agent), mac_learning_proto_(NULL) { 14 3 : } 15 : 16 3 : void MacLearningModule::Init() { 17 3 : EventManager *event = agent_->event_manager(); 18 3 : boost::asio::io_context &io = *event->io_service(); 19 : 20 3 : mac_learning_proto_.reset(new MacLearningProto(agent_, io)); 21 3 : agent_->set_mac_learning_proto(mac_learning_proto_.get()); 22 : 23 3 : mac_learning_mgmt_.reset(new MacLearningMgmtManager(agent_)); 24 : 25 3 : mac_learning_db_client_.reset(new MacLearningDBClient(agent_)); 26 3 : mac_learning_db_client_->Init(); 27 3 : } 28 : 29 3 : void MacLearningModule::Shutdown() { 30 3 : mac_learning_db_client_->Shutdown(); 31 3 : }