[Xorp-hackers] Fw: Re: static xrl interface calls
Li Zhao
lizhaous2000 at yahoo.com
Mon Oct 12 12:55:04 PDT 2009
--- On Mon, 10/12/09, Ben Greear <greearb at candelatech.com> wrote:
From: Ben Greear <greearb at candelatech.com>
Subject: Re: [Xorp-hackers] static xrl interface calls
To: "Li Zhao" <lizhaous2000 at yahoo.com>
Cc: xorp-hackers at icir.org
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 <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-hackers
mailing list