[Xorp-hackers] creating a RoutingTable object

Selçuk Cevher cevhers at gmail.com
Wed Jul 2 12:40:04 PDT 2008


Hi All,



I added a new process into xorp in which a RoutingTable object is created in
the same way as ospf does. Then, the entries in the table are populated by
this new process without any dependency on ospf.



It seems that a RoutingTable object should take an ospf object as input in
its constructor while being created. Hence, I just created an ospf object in
the new process's main function as follows which exists only to allow the
creation of the RoutingTable object (ospf object is not used for anything
else including route calculation):



    EventLoop eventloop;



    //EventLoop fakeEventloop;



    string feaname = "fea";

    string ribname = "rib";



    XrlStdRouter xrl_router(eventloop, "ospfv2");



    XrlIO<IPv4> io(eventloop, xrl_router, feaname, ribname);



    Ospf<IPv4> ospf(OspfTypes::V2, eventloop, &io);



The variable eventloop is the main event loop of the new process. After
creating an ospf object this way which is later on inputted to the
constructor of my own RoutingTable object, I observed that the new process
successfully computes the routes. However, I am not sure that using the
primary event loop of the new process for the purpose of creating an useless
ospf object has some side-effects even though I did not observe any.



First, I had created a "fake" event loop before as can be seen from
commented out line above, but it gave me some timer errors. Hence, I began
to use the primary event loop of the new process, which worked fine.



Does anyone have an idea creation of an ospf object this way has any
side-effects ?



Thanks,

Selcuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20080702/125a5b35/attachment.html 


More information about the Xorp-hackers mailing list