[Xorp-hackers] get_neighbour_info()

Ben Greear greearb at candelatech.com
Tue Jul 8 08:42:50 PDT 2008


Selçuk Cevher wrote:
> Hi All,
>  
> I need the uint32_t value of rid argument (router ID) of type IPv4* 
> returned by get_neighbour_info() xrl interface of ospfv2.
>  
> I noticed that rid's uint32_t value shows up in reverse order when 
> used IPv4::addr() (if the address is 10.10.1.2 <http://10.10.1.2>, it 
> shows up as 2.1.10.10 <http://2.1.10.10>).
It's probably in network byte order...try:  u32 v = ntohl(rid) before 
passing it to IPv4::addr()
>  
> The second issue is that what is the proper way of reseting a 
> RoutingTable object (removing all the entries in it) other than 
> iterating over all the items ?
No idea...what's wrong with iterating over all of the items?

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com




More information about the Xorp-hackers mailing list