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 1 : MacLearningModule::MacLearningModule(Agent *agent): 13 1 : agent_(agent), mac_learning_proto_(NULL) { 14 1 : } 15 : 16 1 : void MacLearningModule::Init() { 17 1 : EventManager *event = agent_->event_manager(); 18 1 : boost::asio::io_context &io = *event->io_service(); 19 : 20 1 : mac_learning_proto_.reset(new MacLearningProto(agent_, io)); 21 1 : agent_->set_mac_learning_proto(mac_learning_proto_.get()); 22 : 23 1 : mac_learning_mgmt_.reset(new MacLearningMgmtManager(agent_)); 24 : 25 1 : mac_learning_db_client_.reset(new MacLearningDBClient(agent_)); 26 1 : mac_learning_db_client_->Init(); 27 1 : } 28 : 29 1 : void MacLearningModule::Shutdown() { 30 1 : mac_learning_db_client_->Shutdown(); 31 1 : }