[Xorp-hackers] pointer to ospf area router instance ?

Atanu Ghosh atanu at ICSI.Berkeley.EDU
Thu May 15 14:02:58 PDT 2008


Hi,

Comments inline.

Selçuk Cevher <cevhers at gmail.com> wrote:


>    Hi All,
> 
> 
> 
>    I am trying to access one of the member functions of current
>    AreaRouter instance from within xrl_target.cc in xorp/ospf folder.
>    (ospfv2)
> 

In general all accessing of internal OSPF state should be performed
through the OSPF class, although this principle is violated in a few
places in xrl_target.cc.

> 
>    By the way, it seems like every ospf router is created as an area
>    router (?)
> 

OSPF partitions its world into areas, the name of the class happens to
be AreaRouter, this does not imply that the router is an area border router.
 
>    I try to use following command within a function in xrl_target.cc to
>    get a reference to the current AreaRouter instance:
> 
> 
> 
>     _ospf.get_peer_manager().get_area_router(area);
> 
> 
> 
>    However, how can I find the area router ID (area) to give
>    get_area_router() function as a parameter ?
> 

Provide the area ID for the area that you are interested in, if you are
adding an interface that requires an area ID then provide it as an
argument to the XRL.

The PeerManager class has a method "get_area_list" that will provide a
list of all the configured areas.

> 
>    or
> 
> 
> 
>    Is there any other way to do that ?
> 
> 
> 
>    Thanks.
> 
>    Selcuk
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

  Atanu.



More information about the Xorp-hackers mailing list