[Xorp-hackers] adding a function to eventloop

Selçuk Cevher cevhers at gmail.com
Thu Jun 19 13:40:11 PDT 2008


Hi All,

I have a problem regarding xorp eventloop mechanism.

I am trying to add a function called pname of a new xorp process called
pname to the same process's eventloop.

The function is supposed to periodically obtain the link state database from
ospfV2.

I used the following function to add the function to the eventloop:

void
XrlpnameNode::add_to_eventloop()
{
    XorpTimer get_LSD_timer;
    get_LSD_timer.unschedule();
    get_LSD_timer = _eventloop.new_periodic_ms(10000, callback(this,
&XrlpnameNode::function_to_be_added_to_eventloop));
}

XrlpnameNode::add_to_eventloop() is called by the main function of the
process, right before entering the main loop of the process. (_eventloop is
set properly within the constructor of XrlpnameNode). As can be seen,
function_to_be_added_to_eventloop is also defined in XrlpnameNode class.

The problem is that the function function_to_be_added_to_eventloop is not
executed by the eventloop of the process pname.

Anyone has an idea what I am missing ?

Thanks,
Selcuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20080619/265e6c70/attachment.html 


More information about the Xorp-hackers mailing list