[Xorp-hackers] Problems with new versions of XORP

Pavlin Radoslavov pavlin@icir.org
Mon, 17 Jan 2005 11:09:39 -0800


> I have migrated a routing protocol successfully to the XORP platform. 
> However, now I am intending to use this routing protocol along with XORP 
> and Click as the forwading engine. Well, I have downloaded a recent 
> version of XORP (which supports click) and I have noticed some changes 
> regarding adding new routes. Now, I am supposed to provide an additional 
> argument for the XRL call, which is the a list of policies (XrlAtomList 
> object). What does it represent?
> Since my original protocol does not care about this, what I did was to 
> send an "empty" object (created with default constructor), but now my 
> protocol calls the XRL to add a route but does not receive a reply 
> (through callback) from XORP. How can I do this in the right way?

It is fine for the list of policies to be empty (as you have done in
your code). E.g., see the corresponding code in static_routes
(method XrlStaticRoutesNode::send_rib_route_change() inside file
static_routes/xrl_static_routes_node.cc). If that code is working
for static_routes, then the callback problem you have is somewhere
else. Try to debug the problem by adding printf() to the appropriate
RIB XRL handler.

Regards,
Pavlin

> 
> What I did:
> 
> 
> void
> XrlTestNode::send_rib_route_change()
> {
>      bool success = true;
>      XrlAtomList _xrl_atom_list;
> 
>      (...)  ---> Code to get next route from the list and
>                  check if routing tables were registered
> 
>      //
>      // Send the appropriate XRL
>      //
>      if (test_route.is_add_route()) {
>          if (test_route.is_ipv4()) {
>              if (test_route.is_interface_route()) {
>                  success = _xrl_rib_client.send_add_interface_route4(
>                      _rib_target.c_str(),
>                      TestProtocolNode::protocol_name(),
>                      true /* unicast */,
>                      false /* multicast */,
>                      test_route.network().get_ipv4net(),
>                      test_route.nexthop().get_ipv4(),
>                      test_route.ifname(),
>                      test_route.vifname(),
>                      test_route.metric(),
>                      _xrl_atom_list,
>                      callback(this, 
> &XrlTestNode::send_rib_route_change_cb));
>                  if (success)
>                      return;
>              } else {
> (...)
> 
> Should this work? Why is this not working?