Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : #include <cmn/agent_cmn.h> 6 : #include <route/route.h> 7 : 8 : #include <vnc_cfg_types.h> 9 : #include <agent_types.h> 10 : 11 : #include <cmn/agent_db.h> 12 : 13 : #include <oper/agent_route_walker.h> 14 : #include <oper/agent_route_resync.h> 15 : #include <oper/vrf.h> 16 : #include <oper/agent_route.h> 17 : #include <oper/agent_path.h> 18 : 19 145 : AgentRouteResync::AgentRouteResync(const std::string &name, Agent *agent) : 20 145 : AgentRouteWalker(name, agent) { 21 145 : } 22 : 23 290 : AgentRouteResync::~AgentRouteResync() { 24 290 : } 25 : 26 721 : bool AgentRouteResync::RouteWalkNotify(DBTablePartBase *partition, 27 : DBEntryBase *e) { 28 721 : AgentRoute *route = static_cast<AgentRoute *>(e); 29 721 : route->EnqueueRouteResync(); 30 721 : return true; 31 : } 32 : 33 2 : void AgentRouteResync::Update() { 34 2 : StartVrfWalk(); 35 2 : } 36 : 37 68 : void AgentRouteResync::UpdateRoutesInVrf(VrfEntry *vrf) { 38 68 : StartRouteWalk(vrf); 39 68 : }