[Xorp-hackers] Problem with writing a xorp process

Nguyen Van Nam van_nam_78 at yahoo.com
Wed Jul 30 03:14:17 PDT 2008


Hi,
I have changed many ways to fix the errors.
Firstly, if i place : wait_until_xrl_router_is_ready(...), it produces the errors: Assertion ..._cb==true failed.
Secondly, not using  wait_until_xrl_router_is_ready(...), i have called only _ospf.get_eventloop().run() and next the xrl command (_xrl_ospf_loopfree.send_notify_lsdb_change). The following errors occur: [xrl_router.cc send ] NO FINDER.
More than that, I have placed the code source not only in area_router.cc but also in xrl_io.cc and xrl_target.cc (in these cases, i want to use XrlRouter and EventLoop of the two classes). The result is: error NO FINDER.
I don't really understand why?
Thank you  so much for explaining me
NGuyen Van Nam

///----------------------------------------------------------------------
try
    {
    //EventLoop eventloop;

    
    XrlStdRouter xrl_router(_ospf.get_eventloop(), "area_router");
    
        //debug_msg("Waiting for router");
        xrl_router.finalize();

    XrlOspfLoopfreeV0p1Client xrl_ospf_loopfree_client(&xrl_router);
    
    
    //cout<<"Test"<<endl;
        //wait_until_xrl_router_is_ready(_ospf.get_eventloop(), xrl_router);
        //debug_msg("\n");
    //event loop run
    //cout<<"Test1"<<endl;
    
    bool success=false;
     
    while (!success)
        {

        _ospf.get_eventloop().run();        
         success=xrl_ospf_loopfree_client.send_reveive_lsdb_change("ospf_loopfree",
                            callback(this,&AreaRouter::send_reveive_lsdb_change_cb ));
        
         
        }

    //if (success) cout<< "LSDB change"<<endl;
    //}
    //success=false;
    }
        catch (...) {
    xorp_catch_standard_exceptions(); }
//----------------------------------------------------------------------------------------------------------------------------------


----- Original Message ----
From: Bruce M Simpson <bms at incunabulum.net>
To: Nguyen Van Nam <van_nam_78 at yahoo.com>
Cc: xorp-hackers <xorp-hackers at icir.org>
Sent: Tuesday, July 29, 2008 10:54:56 PM
Subject: Re: [Xorp-hackers] Problem with writing a xorp process

Hi,

Please ignore my earlier comment about multiple callbacks, as it doesn't 
apply here.

Nguyen Van Nam wrote:
> Hi,
> I use telnet localhost 19999 to verify xorp_finder. It is running. But 
> the error still occurs.
> Note that: my source code is place at the module area_router.cc.
> So what should I do now?

Based on the screenshot you've posted,and the data so far, it seems as 
though the xorp_ospfv2 process is either not processing event callbacks 
or is not returning from them.

Could you have introduced anything into the code which results in the 
EventLoop not being called? This seems to be the most likely root cause 
of the problem you're seeing.

thanks,
BMS



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20080730/5cfa1a31/attachment.html 


More information about the Xorp-hackers mailing list