[olsr-dev] Fetch the routing table from a plugin

Andrea Sini (spam-protected)
Mon Feb 21 23:11:10 CET 2005


Hello,

I'm trying to fetch the routing table from a plugin, using Unik OLSR 0.4.8.

I've in olsrd_plugin.h the routing table data structure (

/**
  * A struct describing an entry in the OLSRD internal routing table
  */
struct rt_entry
{
    union olsr_ip_addr rt_dst;
    union olsr_ip_addr rt_router;
    union hna_netmask rt_mask;
    olsr_u8_t rt_flags;
    olsr_u16_t rt_metric;
    struct interface* rt_if;
    struct rt_entry* prev;
    struct rt_entry* next;
};

struct rt_entry table[HASHSIZE];

I try to fetch the routing table with:

                olsr_plugin_io(GETD__ROUTINGTABLE, table,sizeof(table))

but it always seems that there are no elements (while route -n gives the 
right routing table on the node).

I mean, I can't use table as if it was the internal routing table.

What could I do ?

Thanks in advance for the answer

Andrea Sini





More information about the Olsr-dev mailing list