--- On Mon, 10/12/09, Ben Greear <[email protected]> wrote:
From: Ben Greear <[email protected]> Subject: Re: [Xorp-hackers] static xrl interface calls To: "Li Zhao" <[email protected]> Cc: [email protected] Date: Monday, October 12, 2009, 11:44 AM Li Zhao wrote: > > I have used gdb and cscope to trace the code flow as > following: > > commit_changes -> send_apply_config_change -> | > rtrmgr_0_1_apply_config_change ->apply_config_change > -> change_config -> commit_change_pass1 -> > commit_change_pass2 -> commit_changes. > > > > But i still can not find the code in rtrmgr explicitly > calling (ANY) xrl interface functions to any target module. > > On the other hand the target mudule did receive STCP > ios and the corresponding target functions were called. > > > > I do not think in the case of adding static route > rtrmgr can talk to fea directly. The only puzzle was how on > the earth rtrmgr called the function > xrlStaticRouteV0p1Client::send_add_route4. > > > > Thanks for you reply. > > > Damn...what complicated code. Just spent an hours trying to follow the commit logic. Anyway, I think it comes down to TaskXrlItem An entry point to this code might be: template_commands.cc: int XrlAction::execute(const MasterConfigTreeNode& ctn, TaskManager& task_manager, XrlRouter::XrlCallback cb) const called from: module_command.cc: void ModuleCommand::add_action(const list<string>& action, const XRLdb& xrldb) throw (ParseError) { I cannot figure exactly how this ties back in, but I think all of this must be called from: master_conf_tree_node.cc: bool MasterConfigTreeNode::commit_changes(TaskManager& task_manager, bool do_commit, int depth, int last_depth, string& error_msg, bool& needs_activate, bool& needs_update) { Commands are added directly by some parser, probably of the .xif files or something like that. Probably would take enabling logging and then reading the logs very carefully to figure out exactly how it actually works. Thanks, Ben -- Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
