[Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.c,1.7,1.8
Bernd Petrovitsch
(spam-protected)
Wed Sep 5 18:11:12 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18959/lib/txtinfo/src
Modified Files:
olsrd_txtinfo.c
Log Message:
* applied rt-refactoring-6.diff from Hannes Gredler <(spam-protected)>
Index: olsrd_txtinfo.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/src/olsrd_txtinfo.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** olsrd_txtinfo.c 15 Jul 2007 19:29:37 -0000 1.7
--- olsrd_txtinfo.c 5 Sep 2007 16:11:10 -0000 1.8
***************
*** 310,344 ****
static void ipc_print_routes(void)
{
! int size = 0, index;
! struct rt_entry *routes;
! ipc_sendf("Table: Routes\nDestination\tGateway\tMetric\tETX\tInterface\tType\n");
! /* Neighbors */
! for(index = 0;index < HASHSIZE; index++) {
! for(routes = routingtable[index].next;
! routes != &routingtable[index];
! routes = routes->next) {
! size = 0;
! ipc_sendf( "%s\t%s\t%d\t%.2f\t%s\tHOST\n",
! olsr_ip_to_string(&routes->rt_dst),
! olsr_ip_to_string(&routes->rt_router),
! routes->rt_metric,
! routes->rt_etx,
! routes->rt_if->int_name);
! }
! }
- /* HNA */
- for(index = 0;index < HASHSIZE;index++) {
- for(routes = hna_routes[index].next;
- routes != &hna_routes[index];
- routes = routes->next) {
- ipc_sendf("%s\t%s\t%d\t%s\t\tHNA\n",
- olsr_ip_to_string(&routes->rt_dst),
- olsr_ip_to_string(&routes->rt_router),
- routes->rt_metric,
- routes->rt_if->int_name);
- }
}
ipc_sendf("\n");
--- 310,333 ----
static void ipc_print_routes(void)
{
! struct rt_entry *rt;
! struct avl_node *rt_tree_node;
! ipc_sendf("Table: Routes\nDestination\tGateway\tMetric\tETX\tInterface\n");
! /* Walk the route table */
! for (rt_tree_node = avl_walk_first(&routingtree);
! rt_tree_node;
! rt_tree_node = avl_walk_next(rt_tree_node)) {
!
! rt = rt_tree_node->data;
!
! ipc_sendf( "%s/%d\t%s\t%d\t%.3f\t%s\t\n",
! olsr_ip_to_string(&rt->rt_dst.prefix),
! rt->rt_dst.prefix_len,
! olsr_ip_to_string(&rt->rt_best->rtp_nexthop.gateway),
! rt->rt_best->rtp_metric.hops,
! rt->rt_best->rtp_metric.etx,
! rt->rt_best->rtp_nexthop.iface->int_name);
}
ipc_sendf("\n");
More information about the Olsr-cvs
mailing list