From (spam-protected) Sun Dec 2 20:00:31 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:31 +0000 Subject: [Olsr-cvs] olsrd-current/lib/dyn_gw/src olsrd_dyn_gw.c,1.27,1.28 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/dyn_gw/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/dyn_gw/src Modified Files: olsrd_dyn_gw.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_dyn_gw.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/dyn_gw/src/olsrd_dyn_gw.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** olsrd_dyn_gw.c 29 Nov 2007 00:49:40 -0000 1.27 --- olsrd_dyn_gw.c 2 Dec 2007 19:00:29 -0000 1.28 *************** *** 2,6 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 2,6 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:31 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:31 +0000 Subject: [Olsr-cvs] olsrd-current/lib/dot_draw/src olsrd_dot_draw.c, 1.35, 1.36 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/dot_draw/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/dot_draw/src Modified Files: olsrd_dot_draw.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_dot_draw.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/dot_draw/src/olsrd_dot_draw.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** olsrd_dot_draw.c 29 Nov 2007 00:49:40 -0000 1.35 --- olsrd_dot_draw.c 2 Dec 2007 19:00:29 -0000 1.36 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * includes code by Bruno Randolf * All rights reserved. --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * includes code by Bruno Randolf * All rights reserved. From (spam-protected) Sun Dec 2 20:00:31 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:31 +0000 Subject: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.55,1.56 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/unix In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/src/unix Modified Files: ifnet.c Log Message: * ISO8859-1 -> UTF-8 Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** ifnet.c 29 Nov 2007 18:10:17 -0000 1.55 --- ifnet.c 2 Dec 2007 19:00:28 -0000 1.56 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:31 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:31 +0000 Subject: [Olsr-cvs] olsrd-current/lib/dyn_gw_plain/src olsrd_dyn_gw_plain.c, 1.7, 1.8 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/dyn_gw_plain/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/dyn_gw_plain/src Modified Files: olsrd_dyn_gw_plain.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_dyn_gw_plain.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/dyn_gw_plain/src/olsrd_dyn_gw_plain.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** olsrd_dyn_gw_plain.c 29 Nov 2007 00:49:40 -0000 1.7 --- olsrd_dyn_gw_plain.c 2 Dec 2007 19:00:29 -0000 1.8 *************** *** 1,5 **** /* * Copyright (c) 2006, Sven-Ola Tuecke ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * Copyright (c) 2006, Sven-Ola Tuecke ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:30 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:30 +0000 Subject: [Olsr-cvs] olsrd-current/src/olsr_switch main.c, 1.34, 1.35 olsr_host_switch.h, 1.12, 1.13 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/olsr_switch In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/src/olsr_switch Modified Files: main.c olsr_host_switch.h Log Message: * ISO8859-1 -> UTF-8 Index: olsr_host_switch.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/olsr_host_switch.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** olsr_host_switch.h 29 Nov 2007 17:56:57 -0000 1.12 --- olsr_host_switch.h 2 Dec 2007 19:00:28 -0000 1.13 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2005, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2005, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: main.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/main.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** main.c 29 Nov 2007 17:56:57 -0000 1.34 --- main.c 2 Dec 2007 19:00:28 -0000 1.35 *************** *** 2,6 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2005, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 2,6 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2005, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:32 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:32 +0000 Subject: [Olsr-cvs] olsrd-current/lib/secure/src olsrd_secure.c,1.31,1.32 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/secure/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/secure/src Modified Files: olsrd_secure.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_secure.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/secure/src/olsrd_secure.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** olsrd_secure.c 29 Nov 2007 00:49:42 -0000 1.31 --- olsrd_secure.c 2 Dec 2007 19:00:30 -0000 1.32 *************** *** 4,8 **** * http://www.olsr.org * ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 4,8 ---- * http://www.olsr.org * ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:30 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:30 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser cfgfile_gen.c, 1.13, 1.14 olsrd_conf.c, 1.64, 1.65 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/src/cfgparser Modified Files: cfgfile_gen.c olsrd_conf.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_conf.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** olsrd_conf.c 29 Nov 2007 22:21:26 -0000 1.64 --- olsrd_conf.c 2 Dec 2007 19:00:28 -0000 1.65 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * *************** *** 61,65 **** extern int yyparse(void); ! static char copyright_string[] __attribute__((unused)) = "The olsr.org Optimized Link-State Routing daemon(olsrd) Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) All rights reserved."; int current_line; --- 61,65 ---- extern int yyparse(void); ! static char copyright_string[] __attribute__((unused)) = "The olsr.org Optimized Link-State Routing daemon(olsrd) Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) All rights reserved."; int current_line; Index: cfgfile_gen.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cfgfile_gen.c 29 Nov 2007 00:49:40 -0000 1.13 --- cfgfile_gen.c 2 Dec 2007 19:00:28 -0000 1.14 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2005, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2005, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:30 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:30 +0000 Subject: [Olsr-cvs] olsrd-current/src/linux kernel_routes.c, 1.33, 1.34 net.c, 1.36, 1.37 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/linux In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/src/linux Modified Files: kernel_routes.c net.c Log Message: * ISO8859-1 -> UTF-8 Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/net.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** net.c 29 Nov 2007 00:49:40 -0000 1.36 --- net.c 2 Dec 2007 19:00:28 -0000 1.37 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/kernel_routes.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** kernel_routes.c 29 Nov 2007 22:21:26 -0000 1.33 --- kernel_routes.c 2 Dec 2007 19:00:28 -0000 1.34 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * Copyright (c) 2007, Sven-Ola for the policy routing stuff * All rights reserved. --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * Copyright (c) 2007, Sven-Ola for the policy routing stuff * All rights reserved. From (spam-protected) Sun Dec 2 20:00:32 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:32 +0000 Subject: [Olsr-cvs] olsrd-current/lib/nameservice/src nameservice.c, 1.40, 1.41 nameservice.h, 1.17, 1.18 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/nameservice/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/nameservice/src Modified Files: nameservice.c nameservice.h Log Message: * ISO8859-1 -> UTF-8 Index: nameservice.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** nameservice.h 29 Nov 2007 00:26:16 -0000 1.17 --- nameservice.h 2 Dec 2007 19:00:29 -0000 1.18 *************** *** 1,5 **** /* * Copyright (c) 2005, Bruno Randolf ! * Copyright (c) 2004, Andreas T�nnesen(andreto-at-olsr.org) * All rights reserved. * --- 1,5 ---- /* * Copyright (c) 2005, Bruno Randolf ! * Copyright (c) 2004, Andreas Tønnesen(andreto-at-olsr.org) * All rights reserved. * Index: nameservice.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** nameservice.c 29 Nov 2007 00:49:41 -0000 1.40 --- nameservice.c 2 Dec 2007 19:00:29 -0000 1.41 *************** *** 2,6 **** * Copyright (c) 2006, Jens Nachtigall * Copyright (c) 2005, Bruno Randolf ! * Copyright (c) 2004, Andreas T�nnesen(andreto-at-olsr.org) * Copyright (c) 2007, Sven-Ola * All rights reserved. --- 2,6 ---- * Copyright (c) 2006, Jens Nachtigall * Copyright (c) 2005, Bruno Randolf ! * Copyright (c) 2004, Andreas Tønnesen(andreto-at-olsr.org) * Copyright (c) 2007, Sven-Ola * All rights reserved. From (spam-protected) Sun Dec 2 20:00:32 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:32 +0000 Subject: [Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.c, 1.17, 1.18 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/txtinfo/src Modified Files: olsrd_txtinfo.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_txtinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/src/olsrd_txtinfo.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** olsrd_txtinfo.c 29 Nov 2007 00:49:42 -0000 1.17 --- olsrd_txtinfo.c 2 Dec 2007 19:00:30 -0000 1.18 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * includes code by Bruno Randolf * includes code by Andreas Lopatic --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * includes code by Bruno Randolf * includes code by Andreas Lopatic From (spam-protected) Sun Dec 2 20:00:32 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:32 +0000 Subject: [Olsr-cvs] olsrd-current/lib/pgraph/src olsrd_pgraph.c,1.11,1.12 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/pgraph/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/pgraph/src Modified Files: olsrd_pgraph.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_pgraph.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/pgraph/src/olsrd_pgraph.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** olsrd_pgraph.c 29 Nov 2007 00:49:42 -0000 1.11 --- olsrd_pgraph.c 2 Dec 2007 19:00:30 -0000 1.12 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * includes code by Bruno Randolf * All rights reserved. --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * includes code by Bruno Randolf * All rights reserved. From (spam-protected) Sun Dec 2 20:00:31 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:31 +0000 Subject: [Olsr-cvs] olsrd-current/lib/httpinfo/src admin_interface.c, 1.14, 1.15 olsrd_httpinfo.c, 1.88, 1.89 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/lib/httpinfo/src Modified Files: admin_interface.c olsrd_httpinfo.c Log Message: * ISO8859-1 -> UTF-8 Index: olsrd_httpinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** olsrd_httpinfo.c 29 Nov 2007 00:49:41 -0000 1.88 --- olsrd_httpinfo.c 2 Dec 2007 19:00:29 -0000 1.89 *************** *** 1,5 **** /* * HTTP Info plugin for the olsr.org OLSR daemon ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * HTTP Info plugin for the olsr.org OLSR daemon ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * *************** *** 88,92 **** #endif ! static char copyright_string[] __attribute__((unused)) = "olsr.org HTTPINFO plugin Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) All rights reserved."; #define MAX_CLIENTS 3 --- 88,92 ---- #endif ! static char copyright_string[] __attribute__((unused)) = "olsr.org HTTPINFO plugin Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) All rights reserved."; #define MAX_CLIENTS 3 Index: admin_interface.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/admin_interface.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** admin_interface.c 29 Nov 2007 01:38:36 -0000 1.14 --- admin_interface.c 2 Dec 2007 19:00:29 -0000 1.15 *************** *** 2,6 **** /* * HTTP Info plugin for the olsr.org OLSR daemon ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 2,6 ---- /* * HTTP Info plugin for the olsr.org OLSR daemon ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:30 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:30 +0000 Subject: [Olsr-cvs] olsrd-current/src/bsd net.c,1.42,1.43 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/bsd In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/src/bsd Modified Files: net.c Log Message: * ISO8859-1 -> UTF-8 Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** net.c 29 Nov 2007 18:20:45 -0000 1.42 --- net.c 2 Dec 2007 19:00:28 -0000 1.43 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Sun Dec 2 20:00:30 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 02 Dec 2007 19:00:30 +0000 Subject: [Olsr-cvs] olsrd-current/src build_msg.c, 1.42, 1.43 duplicate_set.c, 1.22, 1.23 hna_set.c, 1.28, 1.29 hna_set.h, 1.17, 1.18 hysteresis.c, 1.23, 1.24 interfaces.c, 1.38, 1.39 ipc_frontend.c, 1.43, 1.44 ipcalc.c, 1.1, 1.2 ipcalc.h, 1.1, 1.2 link_set.c, 1.79, 1.80 lq_packet.c, 1.35, 1.36 main.c, 1.107, 1.108 mid_set.c, 1.26, 1.27 mpr.c, 1.21, 1.22 mpr_selector_set.c, 1.22, 1.23 neighbor_table.c, 1.37, 1.38 net_olsr.c, 1.37, 1.38 net_olsr.h, 1.19, 1.20 olsr.c, 1.64, 1.65 olsr_types.h, 1.13, 1.14 packet.c, 1.29, 1.30 packet.h, 1.20, 1.21 parser.c, 1.39, 1.40 print_packet.c, 1.14, 1.15 process_package.c, 1.50, 1.51 process_routes.c, 1.41, 1.42 process_routes.h, 1.14, 1.15 rebuild_packet.c, 1.28, 1.29 rebuild_packet.h, 1.11, 1.12 two_hop_neighbor_table.c, 1.21, 1.22 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6185/src Modified Files: build_msg.c duplicate_set.c hna_set.c hna_set.h hysteresis.c interfaces.c ipc_frontend.c ipcalc.c ipcalc.h link_set.c lq_packet.c main.c mid_set.c mpr.c mpr_selector_set.c neighbor_table.c net_olsr.c net_olsr.h olsr.c olsr_types.h packet.c packet.h parser.c print_packet.c process_package.c process_routes.c process_routes.h rebuild_packet.c rebuild_packet.h two_hop_neighbor_table.c Log Message: * ISO8859-1 -> UTF-8 Index: rebuild_packet.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/rebuild_packet.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** rebuild_packet.h 29 Nov 2007 23:03:07 -0000 1.11 --- rebuild_packet.h 2 Dec 2007 19:00:28 -0000 1.12 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: process_routes.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** process_routes.h 29 Nov 2007 00:18:53 -0000 1.14 --- process_routes.h 2 Dec 2007 19:00:28 -0000 1.15 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: rebuild_packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/rebuild_packet.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** rebuild_packet.c 29 Nov 2007 23:03:07 -0000 1.28 --- rebuild_packet.c 2 Dec 2007 19:00:28 -0000 1.29 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: hna_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hna_set.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** hna_set.c 29 Nov 2007 18:10:12 -0000 1.28 --- hna_set.c 2 Dec 2007 19:00:27 -0000 1.29 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: two_hop_neighbor_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/two_hop_neighbor_table.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** two_hop_neighbor_table.c 29 Nov 2007 00:49:39 -0000 1.21 --- two_hop_neighbor_table.c 2 Dec 2007 19:00:28 -0000 1.22 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: link_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.c,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** link_set.c 29 Nov 2007 18:10:13 -0000 1.79 --- link_set.c 2 Dec 2007 19:00:27 -0000 1.80 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: process_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** process_routes.c 29 Nov 2007 00:49:39 -0000 1.41 --- process_routes.c 2 Dec 2007 19:00:28 -0000 1.42 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * RIB implementation (c) 2007, Hannes Gredler (hannes at gredler.at) * All rights reserved. --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * RIB implementation (c) 2007, Hannes Gredler (hannes at gredler.at) * All rights reserved. Index: neighbor_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/neighbor_table.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** neighbor_table.c 29 Nov 2007 18:10:14 -0000 1.37 --- neighbor_table.c 2 Dec 2007 19:00:27 -0000 1.38 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: hna_set.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hna_set.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** hna_set.h 29 Nov 2007 00:49:38 -0000 1.17 --- hna_set.h 2 Dec 2007 19:00:27 -0000 1.18 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: ipcalc.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipcalc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ipcalc.h 29 Nov 2007 00:49:38 -0000 1.1 --- ipcalc.h 2 Dec 2007 19:00:27 -0000 1.2 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2007, Bernd Petrovitsch * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2007, Bernd Petrovitsch * All rights reserved. * Index: interfaces.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** interfaces.c 29 Nov 2007 00:49:38 -0000 1.38 --- interfaces.c 2 Dec 2007 19:00:27 -0000 1.39 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: print_packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/print_packet.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** print_packet.c 29 Nov 2007 00:49:39 -0000 1.14 --- print_packet.c 2 Dec 2007 19:00:28 -0000 1.15 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: ipcalc.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipcalc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ipcalc.c 29 Nov 2007 00:49:38 -0000 1.1 --- ipcalc.c 2 Dec 2007 19:00:27 -0000 1.2 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2007, Bernd Petrovitsch * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2007, Bernd Petrovitsch * All rights reserved. * Index: olsr_types.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_types.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** olsr_types.h 29 Nov 2007 00:49:38 -0000 1.13 --- olsr_types.h 2 Dec 2007 19:00:27 -0000 1.14 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: duplicate_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/duplicate_set.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** duplicate_set.c 29 Nov 2007 22:59:50 -0000 1.22 --- duplicate_set.c 2 Dec 2007 19:00:27 -0000 1.23 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: process_package.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_package.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** process_package.c 29 Nov 2007 23:40:08 -0000 1.50 --- process_package.c 2 Dec 2007 19:00:28 -0000 1.51 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: packet.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/packet.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** packet.h 29 Nov 2007 23:03:07 -0000 1.20 --- packet.h 2 Dec 2007 19:00:28 -0000 1.21 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: net_olsr.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** net_olsr.h 29 Nov 2007 00:49:38 -0000 1.19 --- net_olsr.h 2 Dec 2007 19:00:27 -0000 1.20 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/packet.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** packet.c 29 Nov 2007 23:03:07 -0000 1.29 --- packet.c 2 Dec 2007 19:00:28 -0000 1.30 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: lq_packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_packet.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** lq_packet.c 29 Nov 2007 22:59:50 -0000 1.35 --- lq_packet.c 2 Dec 2007 19:00:27 -0000 1.36 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2003, Andreas T�nnesen (andreto at olsr.org) * 2004, Thomas Lopatic (thomas at lopatic.de) * 2006, for some fixups, sven-ola(gmx.de) --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2003, Andreas Tønnesen (andreto at olsr.org) * 2004, Thomas Lopatic (thomas at lopatic.de) * 2006, for some fixups, sven-ola(gmx.de) Index: mid_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mid_set.c 29 Nov 2007 18:10:13 -0000 1.26 --- mid_set.c 2 Dec 2007 19:00:27 -0000 1.27 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: hysteresis.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hysteresis.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** hysteresis.c 29 Nov 2007 00:49:38 -0000 1.23 --- hysteresis.c 2 Dec 2007 19:00:27 -0000 1.24 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: net_olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** net_olsr.c 29 Nov 2007 00:49:38 -0000 1.37 --- net_olsr.c 2 Dec 2007 19:00:27 -0000 1.38 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: build_msg.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/build_msg.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** build_msg.c 29 Nov 2007 22:59:50 -0000 1.42 --- build_msg.c 2 Dec 2007 19:00:27 -0000 1.43 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: ipc_frontend.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipc_frontend.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ipc_frontend.c 29 Nov 2007 22:21:26 -0000 1.43 --- ipc_frontend.c 2 Dec 2007 19:00:27 -0000 1.44 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: main.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** main.c 29 Nov 2007 22:21:26 -0000 1.107 --- main.c 2 Dec 2007 19:00:27 -0000 1.108 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * *************** *** 102,106 **** #endif ! static char copyright_string[] __attribute__((unused)) = "The olsr.org Optimized Link-State Routing daemon(olsrd) Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) All rights reserved."; --- 102,106 ---- #endif ! static char copyright_string[] __attribute__((unused)) = "The olsr.org Optimized Link-State Routing daemon(olsrd) Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) All rights reserved."; Index: olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** olsr.c 29 Nov 2007 00:24:00 -0000 1.64 --- olsr.c 2 Dec 2007 19:00:27 -0000 1.65 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: mpr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mpr.c 29 Nov 2007 00:49:38 -0000 1.21 --- mpr.c 2 Dec 2007 19:00:27 -0000 1.22 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: mpr_selector_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr_selector_set.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mpr_selector_set.c 29 Nov 2007 18:10:13 -0000 1.22 --- mpr_selector_set.c 2 Dec 2007 19:00:27 -0000 1.23 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * Index: parser.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/parser.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** parser.c 29 Nov 2007 18:10:17 -0000 1.39 --- parser.c 2 Dec 2007 19:00:28 -0000 1.40 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas T�nnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * From (spam-protected) Thu Dec 6 19:17:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 18:17:38 +0000 Subject: [Olsr-cvs] olsrd-current gcc-warnings,1.6,1.7 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15089 Modified Files: gcc-warnings Log Message: * make it work with gcc-3.2.3 and beautified it Index: gcc-warnings =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gcc-warnings,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gcc-warnings 12 Nov 2007 00:12:15 -0000 1.6 --- gcc-warnings 6 Dec 2007 18:17:35 -0000 1.7 *************** *** 1,6 **** #!/bin/sh # ! # We expect warning options for gcc as argumenst and return the ones which are accepted ! # by the given gcc. # # $Id$ --- 1,6 ---- #!/bin/sh # ! # We expect warning options for gcc as arguments and return the ones which are ! # accepted by the given gcc. # # $Id$ *************** *** 21,25 **** testcompile() { ! $CC $OPTS -E - 2>&1 <<- EOF int main(void) { return 0; --- 21,25 ---- testcompile() { ! $CC $OPTS -x c - 2>&1 <<- EOF int main(void) { return 0; *************** *** 30,44 **** parsetest() { while read error; do ! case "$error" in ! *error:\ unrecognized\ *option\ \"*) ! opt="${error#*\"}" ! opt="${opt%\"*}" ! OPTS="${OPTS//$opt}" ! ;; ! *error:\ unrecognized\ *option\ \`*) ! opt="${error#*\`}" ! opt="${opt%\'*}" ! OPTS="${OPTS//$opt}" ! ;; esac done --- 30,44 ---- parsetest() { while read error; do ! case "$error" in ! *:\ unrecognized\ *option\ \"*) ! opt="${error#*\"}" ! opt="${opt%\"*}" ! OPTS="${OPTS//$opt}" ! ;; ! *:\ unrecognized\ *option\ \`*) ! opt="${error#*\`}" ! opt="${opt%\'*}" ! OPTS="${OPTS//$opt}" ! ;; esac done From (spam-protected) Thu Dec 6 21:10:21 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:10:21 +0000 Subject: [Olsr-cvs] olsrd-current ld-warnings,NONE,1.1 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27948 Added Files: ld-warnings Log Message: * similar to gcc-warnings but for linker options --- NEW FILE: ld-warnings --- #!/bin/sh # # We expect warning options for gcc as arguments and return the ones which are # accepted by the given gcc. # # $Id: ld-warnings,v 1.1 2007/12/06 20:10:19 bernd67 Exp $ set -ue #set -vx # make sure we do not use some locale .... export LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_NUMERIC=C OPTS="" for param; do case "$param" in -[fWm]?*) OPTS="$OPTS $param";; *) echo "Ignoring $param" >&2 esac done testcompile() { $CC $OPTS -x c - 2>&1 <<- EOF int main(void) { return 0; } EOF } parsetest() { while read error; do case "$error" in *ld:\ unrecognized\ *option\ \'*) opt="${error#*\'}" opt="${opt%\'*}" OPTS="${OPTS//-Wl,$opt}" ;; esac done echo $OPTS } testcompile | parsetest exit 0 From (spam-protected) Thu Dec 6 21:12:49 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:12:49 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.104,1.105 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28461 Modified Files: Makefile Log Message: - adding $(OS_LIB_PTHREAD) once in Makefile.inc is enough - removed an superflous dependency Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** Makefile 4 Nov 2007 23:34:57 -0000 1.104 --- Makefile 6 Dec 2007 20:12:47 -0000 1.105 *************** *** 46,53 **** MAKECMD = $(MAKE) OS="$(OS)" WARNINGS="$(WARNINGS)" ! LIBS += $(OS_LIB_DYNLOAD) $(OS_LIB_PTHREAD) ifeq ($(OS), win32) ! LDFLAGS += -Wl,--out-implib=libolsrd.a -Wl,--export-all-symbols endif --- 46,54 ---- MAKECMD = $(MAKE) OS="$(OS)" WARNINGS="$(WARNINGS)" ! LIBS += $(OS_LIB_DYNLOAD) ifeq ($(OS), win32) ! LDFLAGS += -Wl,--out-implib=libolsrd.a ! LDFLAGS += -Wl,--export-all-symbols endif *************** *** 191,195 **** ! build_all: all $(EXENAME) switch libs install_all: install install_libs clean_all: uberclean clean_libs --- 192,196 ---- ! build_all: all switch libs install_all: install install_libs clean_all: uberclean clean_libs From (spam-protected) Thu Dec 6 21:13:58 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:13:58 +0000 Subject: [Olsr-cvs] olsrd-current Makefile.inc,1.47,1.48 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28859 Modified Files: Makefile.inc Log Message: - added "-ffunction-sections -fdata-sections -Wl,--print-gc-sections" and comnmented them out: These tell gcc to put each function and global variable in a separate section. The linker can than remove all unreferenced section. But in the olsrd binary unused doesn't imply unused at all since the function may be used by plugins, e.g. the ones in src/plugin_utils.c. So we can use that featuer at most to identify unused functions and remove them from the source by hand. Index: Makefile.inc =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile.inc,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Makefile.inc 29 Nov 2007 23:03:48 -0000 1.47 --- Makefile.inc 6 Dec 2007 20:13:56 -0000 1.48 *************** *** 78,82 **** WARNINGS += -Wpointer-arith WARNINGS += -Wcast-qual ! # the following 5 do not work yet #WARNINGS += -Wshadow #WARNINGS += -Wpointer-arith --- 78,82 ---- WARNINGS += -Wpointer-arith WARNINGS += -Wcast-qual ! # the following 5 do not work yet and need more work on it #WARNINGS += -Wshadow #WARNINGS += -Wpointer-arith *************** *** 100,103 **** --- 100,111 ---- # we have small inline functions in src/lq_route.c which should always be inlined WARNINGS += -finline-limit=50 + # These tell gcc to put each function and global variable in a separate section. + # The linker can than remove all unreferenced section. But in the olsrd binary + # unused doesn't imply unused at all since the function may be used by plugins, + # e.g. the ones in src/plugin_utils.c. + # So we can use that featuer at most to identify unused functions and remove them + # from the source by hand. + #WARNINGS += -ffunction-sections + #WARNINGS += -fdata-sections WARNINGS := $(shell CC="$(CC)" $(TOPDIR)/gcc-warnings $(WARNINGS)) endif *************** *** 122,125 **** --- 130,139 ---- LDFLAGS += -Wl,-export-dynamic endif + # LDFLAGS for all + LDFLAGS += -Wl,--warn-common + # See above at "-ffunction-sections" for an explanation (and why it is disabled). + #LDOPTS += -Wl,--gc-sections + #LDOPTS += -Wl,--print-gc-sections + #LDFLAGS += $(shell CC="$(CC)" $(TOPDIR)/ld-warnings $(LDOPTS)) ifneq ($(MUDFLAP),0) LIBS += -lmudflapth From (spam-protected) Thu Dec 6 21:22:39 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:22:39 +0000 Subject: [Olsr-cvs] olsrd-current/src/olsr_switch Makefile,1.13,1.14 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/olsr_switch In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv447/src/olsr_switch Modified Files: Makefile Log Message: adding $(OS_LIB_PTHREAD) once in Makefile.inc is enough Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile 16 Nov 2007 22:56:54 -0000 1.13 --- Makefile 6 Dec 2007 20:22:37 -0000 1.14 *************** *** 10,14 **** default_target: $(OBJS) ! $(CC) $(LDFLAGS) -o $(TOPDIR)/$(BINNAME) $(OBJS) $(LIBS) $(OS_LIB_PTHREAD) ohs_cmd.o: CFLAGS += -Wno-cast-qual --- 10,14 ---- default_target: $(OBJS) ! $(CC) $(LDFLAGS) -o $(TOPDIR)/$(BINNAME) $(OBJS) $(LIBS) ohs_cmd.o: CFLAGS += -Wno-cast-qual From (spam-protected) Thu Dec 6 21:25:49 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:25:49 +0000 Subject: [Olsr-cvs] olsrd-current/src mpr_selector_set.c, 1.23, 1.24 mpr_selector_set.h, 1.14, 1.15 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1740/src Modified Files: mpr_selector_set.c mpr_selector_set.h Log Message: * commented out unused functions Index: mpr_selector_set.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr_selector_set.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mpr_selector_set.h 21 Oct 2007 20:55:11 -0000 1.14 --- mpr_selector_set.h 6 Dec 2007 20:25:47 -0000 1.15 *************** *** 54,59 **** --- 54,61 ---- + #if 0 olsr_bool olsr_is_mpr(void); + #endif olsr_u16_t *************** *** 82,88 **** olsr_time_out_mprs_set(void); ! void olsr_print_mprs_set(void); #endif --- 84,91 ---- olsr_time_out_mprs_set(void); ! #if 0 void olsr_print_mprs_set(void); + #endif #endif Index: mpr_selector_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr_selector_set.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mpr_selector_set.c 2 Dec 2007 19:00:27 -0000 1.23 --- mpr_selector_set.c 6 Dec 2007 20:25:47 -0000 1.24 *************** *** 83,86 **** --- 83,87 ---- } + #if 0 /** * Check if we(this node) is selected as a MPR by any *************** *** 92,95 **** --- 93,97 ---- return ((mprs_list.next == &mprs_list) ? OLSR_FALSE : OLSR_TRUE); } + #endif /** *************** *** 219,222 **** --- 221,225 ---- } + #if 0 /** *Print the current MPR selector set to STDOUT *************** *** 235,236 **** --- 238,241 ---- OLSR_PRINTF(1, "\n"); } + #endif + From (spam-protected) Thu Dec 6 21:41:53 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:41:53 +0000 Subject: [Olsr-cvs] olsrd-current/src net_os.h,1.14,1.15 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8537/src Modified Files: net_os.h Log Message: * added niclude files needed by this header file Index: net_os.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_os.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** net_os.h 29 Nov 2007 18:09:11 -0000 1.14 --- net_os.h 6 Dec 2007 20:41:51 -0000 1.15 *************** *** 52,57 **** #define _OLSR_NET_OS_H ! /* OS dependent functions */ ssize_t olsr_sendto(int, --- 52,59 ---- #define _OLSR_NET_OS_H ! #include "olsr_types.h" ! #include "interfaces.h" + /* OS dependent functions */ ssize_t olsr_sendto(int, *************** *** 102,109 **** int ! getsocket(struct sockaddr *, int, char *); int ! getsocket6(struct sockaddr_in6 *, int, char *); int --- 104,111 ---- int ! getsocket(int, char *); int ! getsocket6(int, char *); int From (spam-protected) Thu Dec 6 21:43:17 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 20:43:17 +0000 Subject: [Olsr-cvs] olsrd-current/src/linux net.c,1.37,1.38 net.h,1.9,NONE Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/linux In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8923/src/linux Modified Files: net.c Removed Files: net.h Log Message: * src/linux/net.h is used by one .c file only. No need for a separate file. * removed an "extern" declaration which doesn't belong here * removed superflous #include's Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/net.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** net.c 2 Dec 2007 19:00:28 -0000 1.37 --- net.c 6 Dec 2007 20:43:15 -0000 1.38 *************** *** 45,56 **** */ - #include "net.h" - #include "../ipcalc.h" - #include "../defs.h" #include "../net_os.h" ! #include "../parser.h" ! #include "../net_olsr.h" /* *Wireless definitions for ioctl calls --- 45,67 ---- */ #include "../net_os.h" ! #include "../ipcalc.h" ! ! #include ! ! #include ! ! #include ! #include ! #include ! #include + /* Redirect proc entry */ + #define REDIRECT_PROC "/proc/sys/net/ipv4/conf/%s/send_redirects" + + /* IP spoof proc entry */ + #define SPOOF_PROC "/proc/sys/net/ipv4/conf/%s/rp_filter" + /* *Wireless definitions for ioctl calls *************** *** 395,404 **** */ int ! getsocket(struct sockaddr *sa, int bufspace, char *int_name) { ! struct sockaddr_in *sin=(struct sockaddr_in *)sa; ! int sock, on = 1; ! ! if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { perror("socket"); --- 406,415 ---- */ int ! getsocket(int bufspace, char *int_name) { ! struct sockaddr_in sin; ! int on; ! int sock = socket(AF_INET, SOCK_DGRAM, 0); ! if (sock < 0) { perror("socket"); *************** *** 407,410 **** --- 418,422 ---- } + on = 1; #ifdef SO_BROADCAST if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) *************** *** 451,468 **** } ! if (bind(sock, (struct sockaddr *)sin, sizeof (*sin)) < 0) ! { perror("bind"); syslog(LOG_ERR, "bind: %m"); close(sock); return -1; ! } ! /* ! *FIXME: One should probably fetch the flags first ! *using F_GETFL.... ! */ ! if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) ! syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); return sock; } --- 463,485 ---- } ! memset(&sin, 0, sizeof (sin)); ! sin.sin_family = AF_INET; ! sin.sin_port = htons(OLSRPORT); ! sin.sin_addr.s_addr = INADDR_ANY; ! if (bind(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("bind"); syslog(LOG_ERR, "bind: %m"); close(sock); return -1; ! } + on = fcntl(sock, F_GETFL); + if (on == -1) { + syslog(LOG_ERR, "fcntl (F_GETFL): %m\n"); + } else { + if (fcntl(sock, F_SETFL, on|O_NONBLOCK) == -1) { + syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); + } + } return sock; } *************** *** 475,494 **** */ int ! getsocket6(struct sockaddr_in6 *sin, int bufspace, char *int_name) { ! int sock, on = 1; ! if ((sock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) ! { ! perror("socket"); ! syslog(LOG_ERR, "socket: %m"); ! return (-1); ! } #ifdef IPV6_V6ONLY ! if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) ! { ! perror("setsockopt(IPV6_V6ONLY)"); ! syslog(LOG_ERR, "setsockopt(IPV6_V6ONLY): %m"); ! } #endif --- 492,512 ---- */ int ! getsocket6(int bufspace, char *int_name) { ! struct sockaddr_in6 sin; ! int on; ! int sock = socket(AF_INET6, SOCK_DGRAM, 0); ! if (sock < 0) { ! perror("socket"); ! syslog(LOG_ERR, "socket: %m"); ! return (-1); ! } #ifdef IPV6_V6ONLY ! on = 1; ! if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) { ! perror("setsockopt(IPV6_V6ONLY)"); ! syslog(LOG_ERR, "setsockopt(IPV6_V6ONLY): %m"); ! } #endif *************** *** 540,544 **** } ! if (bind(sock, (struct sockaddr *)sin, sizeof (*sin)) < 0) { perror("bind"); --- 558,566 ---- } ! memset(&sin, 0, sizeof(sin)); ! sin.sin6_family = AF_INET6; ! sin.sin6_port = htons(OLSRPORT); ! //(addrsock6.sin6_addr).s_addr = IN6ADDR_ANY_INIT; ! if (bind(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("bind"); *************** *** 547,557 **** return (-1); } - /* - *One should probably fetch the flags first - *using F_GETFL.... - */ - if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) - syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); return sock; } --- 569,581 ---- return (-1); } + on = fcntl(sock, F_GETFL); + if (on == -1) { + syslog(LOG_ERR, "fcntl (F_GETFL): %m\n"); + } else { + if (fcntl(sock, F_SETFL, on|O_NONBLOCK) == -1) { + syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); + } + } return sock; } --- net.h DELETED --- From (spam-protected) Thu Dec 6 22:01:17 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 21:01:17 +0000 Subject: [Olsr-cvs] olsrd-current/src/bsd net.c,1.43,1.44 net.h,1.5,NONE Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/bsd In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16316/src/bsd Modified Files: net.c Removed Files: net.h Log Message: * src/linux/net.h is used by one .c file only. No need for a separate file. Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** net.c 2 Dec 2007 19:00:28 -0000 1.43 --- net.c 6 Dec 2007 21:01:14 -0000 1.44 *************** *** 40,52 **** */ ! #include "defs.h" ! #include "net_os.h" ! #include "parser.h" /* dnc: needed for call to packet_parser() */ ! #include "net.h" #include #ifdef __NetBSD__ - #include #include #endif --- 40,62 ---- */ ! #include "../defs.h" ! #include "../net_os.h" ! #include "../parser.h" /* dnc: needed for call to packet_parser() */ ! #include "../olsr_protocol.h" + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include #include #ifdef __NetBSD__ #include #endif *************** *** 306,321 **** int ! getsocket(struct sockaddr *sa, int bufspace, char *int_name) { ! struct sockaddr_in *sin = (struct sockaddr_in *)sa; ! int sock, on = 1; ! ! if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { perror("socket"); syslog(LOG_ERR, "socket: %m"); ! return (-1); } if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) { --- 316,332 ---- int ! getsocket(int bufspace, char *int_name) { ! struct sockaddr_in sin; ! int on; ! int sock = socket(AF_INET, SOCK_DGRAM, 0); ! if (sock < 0) { perror("socket"); syslog(LOG_ERR, "socket: %m"); ! return -1; } + on = 1; if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) { *************** *** 323,327 **** syslog(LOG_ERR, "setsockopt SO_BROADCAST: %m"); close(sock); ! return (-1); } --- 334,338 ---- syslog(LOG_ERR, "setsockopt SO_BROADCAST: %m"); close(sock); ! return -1; } *************** *** 330,334 **** perror("SO_REUSEADDR failed"); close(sock); ! return (-1); } --- 341,345 ---- perror("SO_REUSEADDR failed"); close(sock); ! return -1; } *************** *** 337,341 **** perror("SO_REUSEPORT failed"); close(sock); ! return (-1); } --- 348,352 ---- perror("SO_REUSEPORT failed"); close(sock); ! return -1; } *************** *** 344,354 **** perror("IP_RECVIF failed"); close(sock); ! return (-1); } for (on = bufspace; ; on -= 1024) { ! if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, ! &on, sizeof (on)) == 0) break; if (on <= 8*1024) --- 355,364 ---- perror("IP_RECVIF failed"); close(sock); ! return -1; } for (on = bufspace; ; on -= 1024) { ! if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &on, sizeof (on)) == 0) break; if (on <= 8*1024) *************** *** 360,374 **** } ! if (bind(sock, (struct sockaddr *)sin, sizeof (*sin)) < 0) { perror("bind"); syslog(LOG_ERR, "bind: %m"); close(sock); ! return (-1); } ! if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) ! syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); ! return (sock); } --- 370,393 ---- } ! memset(&sin, 0, sizeof (sin)); ! sin.sin_family = AF_INET; ! sin.sin_port = htons(OLSRPORT); ! sin.sin_addr.s_addr = INADDR_ANY; ! if (bind(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("bind"); syslog(LOG_ERR, "bind: %m"); close(sock); ! return -1; } ! on = fcntl(sock, F_GETFL); ! if (on == -1) { ! syslog(LOG_ERR, "fcntl (F_GETFL): %m\n"); ! } else { ! if (fcntl(sock, F_SETFL, on|O_NONBLOCK) == -1) { ! syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); ! } ! } return (sock); } *************** *** 376,393 **** int getsocket6(struct sockaddr_in6 *sin, int bufspace, char *int_name) { ! int sock, on = 1; ! if ((sock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { perror("socket"); syslog(LOG_ERR, "socket: %m"); ! return (-1); } for (on = bufspace; ; on -= 1024) { ! if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, ! &on, sizeof (on)) == 0) ! break; if (on <= 8*1024) { --- 395,412 ---- int getsocket6(struct sockaddr_in6 *sin, int bufspace, char *int_name) { ! int on; ! int sock = socket(AF_INET6, SOCK_DGRAM, 0); ! if (sock < 0) { perror("socket"); syslog(LOG_ERR, "socket: %m"); ! return -1; } for (on = bufspace; ; on -= 1024) { ! if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &on, sizeof (on)) == 0) ! break; if (on <= 8*1024) { *************** *** 402,406 **** perror("SO_REUSEADDR failed"); close(sock); ! return (-1); } --- 421,425 ---- perror("SO_REUSEADDR failed"); close(sock); ! return -1; } *************** *** 408,412 **** { perror("SO_REUSEPORT failed"); ! return (-1); } --- 427,432 ---- { perror("SO_REUSEPORT failed"); ! close(sock); ! return -1; } *************** *** 415,426 **** { perror("IPV6_RECVPKTINFO failed"); ! return (-1); } #elif defined IPV6_PKTINFO ! if (setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &on, sizeof(on)) < 0) ! { ! perror("IPV6_PKTINFO failed"); ! return (-1); ! } #endif --- 435,448 ---- { perror("IPV6_RECVPKTINFO failed"); ! close(sock); ! return -1; } #elif defined IPV6_PKTINFO ! if (setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &on, sizeof(on)) < 0) ! { ! perror("IPV6_PKTINFO failed"); ! close(sock); ! return -1; ! } #endif *************** *** 430,440 **** syslog(LOG_ERR, "bind: %m"); close(sock); ! return (-1); } ! if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) ! syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); ! ! return (sock); } --- 452,467 ---- syslog(LOG_ERR, "bind: %m"); close(sock); ! return -1; } ! on = fcntl(sock, F_GETFL); ! if (on == -1) { ! syslog(LOG_ERR, "fcntl (F_GETFL): %m\n"); ! } else { ! if (fcntl(sock, F_SETFL, on|O_NONBLOCK) == -1) { ! syslog(LOG_ERR, "fcntl O_NONBLOCK: %m\n"); ! } ! } ! return sock; } --- net.h DELETED --- From (spam-protected) Thu Dec 6 22:12:58 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 21:12:58 +0000 Subject: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.56,1.57 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/unix In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17207/src/unix Modified Files: ifnet.c Log Message: * removed the unused functions get_if_property_id(), add_if_geninfo(), get_if_geninfo(), del_if_geninfo() * if_ifwithindex() is used only locally: made it "static" * Simplified a little bit: addrsock and addrsock6 are defined and initialized in interfaces.c, used in src/*/net.c and passed as parameter to the functions getsocket{,6}() in src/*/ifnet.c. We now just define and initialize that locally. Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** ifnet.c 2 Dec 2007 19:00:28 -0000 1.56 --- ifnet.c 6 Dec 2007 21:12:55 -0000 1.57 *************** *** 961,965 **** */ ! ifp->olsr_socket = getsocket((struct sockaddr *)&addrsock, bufspace, ifp->int_name); if (ifp->olsr_socket < 0) --- 961,965 ---- */ ! ifp->olsr_socket = getsocket(bufspace, ifp->int_name); if (ifp->olsr_socket < 0) *************** *** 983,987 **** */ ! ifp->olsr_socket = getsocket6(&addrsock6, bufspace, ifp->int_name); join_mcast(ifp, ifp->olsr_socket); --- 983,987 ---- */ ! ifp->olsr_socket = getsocket6(bufspace, ifp->int_name); join_mcast(ifp, ifp->olsr_socket); From (spam-protected) Thu Dec 6 22:12:57 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 21:12:57 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 net.c,1.24,1.25 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17207/src/win32 Modified Files: net.c Log Message: * removed the unused functions get_if_property_id(), add_if_geninfo(), get_if_geninfo(), del_if_geninfo() * if_ifwithindex() is used only locally: made it "static" * Simplified a little bit: addrsock and addrsock6 are defined and initialized in interfaces.c, used in src/*/net.c and passed as parameter to the functions getsocket{,6}() in src/*/ifnet.c. We now just define and initialize that locally. Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/net.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** net.c 29 Nov 2007 18:10:18 -0000 1.24 --- net.c 6 Dec 2007 21:12:55 -0000 1.25 *************** *** 99,110 **** } ! int getsocket(struct sockaddr *Addr, int BuffSize, char *Int __attribute__((unused))) { ! int Sock; int On = 1; unsigned long Len; ! ! Sock = socket(AF_INET, SOCK_DGRAM, 0); ! if (Sock < 0) { --- 99,108 ---- } ! int getsocket(int BuffSize, char *Int __attribute__((unused))) { ! struct sockaddr_in Addr; int On = 1; unsigned long Len; ! int Sock = socket(AF_INET, SOCK_DGRAM, 0); if (Sock < 0) { *************** *** 133,137 **** fprintf(stderr, "Cannot set IPv4 socket receive buffer.\n"); ! if (bind(Sock, Addr, sizeof (struct sockaddr_in)) < 0) { WinSockPError("getsocket/bind()"); --- 131,139 ---- fprintf(stderr, "Cannot set IPv4 socket receive buffer.\n"); ! memset(&Addr, 0, sizeof (Addr)); ! Addr.sin_family = AF_INET; ! Addr.sin_port = htons(OLSRPORT); ! Addr.sin_addr.s_addr = INADDR_ANY; ! if (bind(Sock, (struct sockaddr *)&Addr, sizeof (Addr)) < 0) { WinSockPError("getsocket/bind()"); *************** *** 150,160 **** } ! int getsocket6(struct sockaddr_in6 *Addr, int BuffSize, char *Int __attribute__((unused))) { ! int Sock; int On = 1; ! ! Sock = socket(AF_INET6, SOCK_DGRAM, 0); ! if (Sock < 0) { --- 152,160 ---- } ! int getsocket6(int BuffSize, char *Int __attribute__((unused))) { ! struct sockaddr_in6 Addr; int On = 1; ! int Sock = socket(AF_INET6, SOCK_DGRAM, 0); if (Sock < 0) { *************** *** 183,187 **** fprintf(stderr, "Cannot set IPv6 socket receive buffer.\n"); ! if (bind(Sock, (struct sockaddr *)Addr, sizeof (struct sockaddr_in6)) < 0) { WinSockPError("getsocket6/bind()"); --- 183,191 ---- fprintf(stderr, "Cannot set IPv6 socket receive buffer.\n"); ! memset(&Addr6, 0, sizeof (Addr6)); ! Addr6.sin6_family = AF_INET6; ! Addr6.sin6_port = htons(OLSRPORT); ! //Addr6.sin6_addr.s_addr = IN6ADDR_ANY_INIT; ! if (bind(Sock, (struct sockaddr *)&Addr, sizeof (Addr)) < 0) { WinSockPError("getsocket6/bind()"); From (spam-protected) Thu Dec 6 22:12:58 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 21:12:58 +0000 Subject: [Olsr-cvs] olsrd-current/src interfaces.h, 1.49, 1.50 interfaces.c, 1.39, 1.40 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17207/src Modified Files: interfaces.h interfaces.c Log Message: * removed the unused functions get_if_property_id(), add_if_geninfo(), get_if_geninfo(), del_if_geninfo() * if_ifwithindex() is used only locally: made it "static" * Simplified a little bit: addrsock and addrsock6 are defined and initialized in interfaces.c, used in src/*/net.c and passed as parameter to the functions getsocket{,6}() in src/*/ifnet.c. We now just define and initialize that locally. Index: interfaces.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** interfaces.c 2 Dec 2007 19:00:27 -0000 1.39 --- interfaces.c 6 Dec 2007 21:12:56 -0000 1.40 *************** *** 48,60 **** #include "ipcalc.h" ! static olsr_u32_t if_property_id; /* The interface linked-list */ struct interface *ifnet; - /* Datastructures to use when creating new sockets */ - struct sockaddr_in addrsock; - struct sockaddr_in6 addrsock6; - /* Ifchange functions */ --- 48,56 ---- #include "ipcalc.h" ! static struct interface *if_ifwithindex(const int if_index); /* The interface linked-list */ struct interface *ifnet; /* Ifchange functions */ *************** *** 83,107 **** ifnet = NULL; - /* - *Initializing addrsock struct to be - *used on all the sockets - */ - if(olsr_cnf->ip_version == AF_INET) - { - /* IP version 4 */ - memset(&addrsock, 0, sizeof (addrsock)); - addrsock.sin_family = AF_INET; - addrsock.sin_port = htons(OLSRPORT); - (addrsock.sin_addr).s_addr = INADDR_ANY; - } - else - { - /* IP version 6 */ - memset(&addrsock6, 0, sizeof (addrsock6)); - addrsock6.sin6_family = AF_INET6; - addrsock6.sin6_port = htons(OLSRPORT); - //(addrsock6.sin6_addr).s_addr = IN6ADDR_ANY_INIT; - } - OLSR_PRINTF(1, "\n ---- Interface configuration ---- \n\n"); /* Run trough all interfaces immedeatly */ --- 79,82 ---- *************** *** 124,209 **** } - - olsr_u32_t - get_if_property_id(void) - { - return if_property_id++; - } - - olsr_bool - add_if_geninfo(struct interface *ifp, void *data, olsr_u32_t owner_id) - { - struct if_gen_property *igp; - - if(get_if_geninfo(ifp, owner_id) != NULL) - return OLSR_FALSE; - - igp = olsr_malloc(sizeof(struct if_gen_property), __func__); - - igp->owner_id = owner_id; - igp->data = data; - - /* queue */ - igp->next = ifp->gen_properties; - ifp->gen_properties = igp; - - return OLSR_TRUE; - } - - void * - get_if_geninfo(struct interface *ifp, olsr_u32_t owner_id) - { - struct if_gen_property *igp_list = ifp->gen_properties; - - - while(igp_list) - { - if(igp_list->owner_id == owner_id) - return igp_list->data; - - igp_list = igp_list->next; - } - - return NULL; - } - - void * - del_if_geninfo(struct interface *ifp, olsr_u32_t owner_id) - { - void *data = NULL; - struct if_gen_property *igp_list = ifp->gen_properties; - struct if_gen_property *igp_prev = NULL; - - - while(igp_list) - { - if(igp_list->owner_id == owner_id) - break; - - igp_prev = igp_list; - igp_list = igp_list->next; - } - - /* Not found */ - if(igp_list == NULL) - return NULL; - - /* Dequeue */ - if(igp_prev == NULL) - { - /* First elem */ - ifp->gen_properties = igp_list->next; - } - else - { - igp_prev->next = igp_list->next; - } - data = igp_list->data; - free(igp_list); - - return data; - } - - void run_ifchg_cbs(struct interface *ifp, int flag) --- 99,102 ---- *************** *** 297,315 **** if_ifwithname(const char *if_name) { ! struct interface *ifp; ! ifp = ifnet; ! ! while (ifp) ! { ! /* good ol' strcmp should be sufficcient here */ ! if (!strcmp(ifp->int_name, if_name)) ! return ifp; ! ifp = ifp->int_next; } ! return NULL; } - /** *Find the interface with a given interface index. --- 190,204 ---- if_ifwithname(const char *if_name) { ! struct interface *ifp = ifnet; ! while (ifp) { ! /* good ol' strcmp should be sufficcient here */ ! if (strcmp(ifp->int_name, if_name) == 0) { ! return ifp; } ! ifp = ifp->int_next; ! } return NULL; } /** *Find the interface with a given interface index. *************** *** 320,337 **** *that matched the iif_index. */ ! struct interface * if_ifwithindex(const int if_index) { struct interface *ifp = ifnet; ! while (ifp) ! { ! if (ifp->if_index == if_index) ! return ifp; ifp = ifp->int_next; ! } return NULL; } - /** *Get an interface name for a given interface index --- 209,225 ---- *that matched the iif_index. */ ! static struct interface * if_ifwithindex(const int if_index) { struct interface *ifp = ifnet; ! while (ifp != NULL) { ! if (ifp->if_index == if_index) { ! return ifp; ! } ifp = ifp->int_next; ! } return NULL; } /** *Get an interface name for a given interface index Index: interfaces.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** interfaces.h 29 Nov 2007 17:09:16 -0000 1.49 --- interfaces.h 6 Dec 2007 21:12:56 -0000 1.50 *************** *** 1,5 **** /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * --- 1,5 ---- /* * The olsr.org Optimized Link-State Routing daemon(olsrd) ! * Copyright (c) 2004, Andreas Tønnesen(andreto at olsr.org) * All rights reserved. * *************** *** 175,198 **** extern struct interface *ifnet; - /* Datastructures to use when creating new sockets */ - extern struct sockaddr_in addrsock; - extern struct sockaddr_in6 addrsock6; - - int ifinit(void); - olsr_u32_t - get_if_property_id(void); - - olsr_bool - add_if_geninfo(struct interface *, void *, olsr_u32_t); - - void * - get_if_geninfo(struct interface *, olsr_u32_t); - - void * - del_if_geninfo(struct interface *, olsr_u32_t); - void run_ifchg_cbs(struct interface *, int); --- 175,181 ---- *************** *** 207,213 **** if_ifwithname(const char *); - struct interface * - if_ifwithindex(const int if_index); - const char * if_ifwithindex_name(const int if_index); --- 190,193 ---- From (spam-protected) Thu Dec 6 22:46:09 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 21:46:09 +0000 Subject: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.57,1.58 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/unix In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2408/src/unix Modified Files: ifnet.c Log Message: * made a local never changed constant variable a #define Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** ifnet.c 6 Dec 2007 21:12:55 -0000 1.57 --- ifnet.c 6 Dec 2007 21:46:07 -0000 1.58 *************** *** 70,74 **** #include ! int bufspace = 127*1024; /* max. input buffer size to request */ --- 70,74 ---- #include ! #define BUFSPACE (127*1024) /* max. input buffer size to request */ *************** *** 629,633 **** */ ! ifp->olsr_socket = gethcsocket6(&addrsock6, bufspace, ifp->int_name); join_mcast(ifp, ifp->olsr_socket); --- 629,633 ---- */ ! ifp->olsr_socket = gethcsocket6(&addrsock6, BUFSPACE, ifp->int_name); join_mcast(ifp, ifp->olsr_socket); *************** *** 961,965 **** */ ! ifp->olsr_socket = getsocket(bufspace, ifp->int_name); if (ifp->olsr_socket < 0) --- 961,965 ---- */ ! ifp->olsr_socket = getsocket(BUFSPACE, ifp->int_name); if (ifp->olsr_socket < 0) *************** *** 983,987 **** */ ! ifp->olsr_socket = getsocket6(bufspace, ifp->int_name); join_mcast(ifp, ifp->olsr_socket); --- 983,987 ---- */ ! ifp->olsr_socket = getsocket6(BUFSPACE, ifp->int_name); join_mcast(ifp, ifp->olsr_socket); From (spam-protected) Thu Dec 6 23:07:31 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 06 Dec 2007 22:07:31 +0000 Subject: [Olsr-cvs] olsrd-current gcc-warnings,1.7,1.8 ld-warnings,1.1,1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11178 Modified Files: gcc-warnings ld-warnings Log Message: * avoid left over "a.out" Index: ld-warnings =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/ld-warnings,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ld-warnings 6 Dec 2007 20:10:19 -0000 1.1 --- ld-warnings 6 Dec 2007 22:07:29 -0000 1.2 *************** *** 21,25 **** testcompile() { ! $CC $OPTS -x c - 2>&1 <<- EOF int main(void) { return 0; --- 21,25 ---- testcompile() { ! $CC $OPTS -x c -o /dev/null - 2>&1 <<- EOF int main(void) { return 0; Index: gcc-warnings =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gcc-warnings,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gcc-warnings 6 Dec 2007 18:17:35 -0000 1.7 --- gcc-warnings 6 Dec 2007 22:07:29 -0000 1.8 *************** *** 21,25 **** testcompile() { ! $CC $OPTS -x c - 2>&1 <<- EOF int main(void) { return 0; --- 21,25 ---- testcompile() { ! $CC $OPTS -x c -o /dev/null - 2>&1 <<- EOF int main(void) { return 0; From (spam-protected) Tue Dec 11 18:16:05 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Tue, 11 Dec 2007 17:16:05 +0000 Subject: [Olsr-cvs] olsrd-current ld-warnings, 1.2, 1.3 gcc-warnings, 1.8, 1.9 Makefile.inc, 1.48, 1.49 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18098 Modified Files: ld-warnings gcc-warnings Makefile.inc Log Message: - Replaced "which" with a /bin/sh script snippet. - inspired by Sven-Ola Tücke: avoid a bash'ism (i.e. "OPTS="${OPTS//$opt}") in gcc-warnings and ld-warnings. But we do not replace it with `sed` (since it costs a fork(2) and an exec(3)) but also with shell code which doesn't use any external program. For a specification of /bin/sh: see http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02 Index: gcc-warnings =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gcc-warnings,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gcc-warnings 6 Dec 2007 22:07:29 -0000 1.8 --- gcc-warnings 11 Dec 2007 17:16:03 -0000 1.9 *************** *** 34,45 **** opt="${error#*\"}" opt="${opt%\"*}" - OPTS="${OPTS//$opt}" ;; *:\ unrecognized\ *option\ \`*) opt="${error#*\`}" opt="${opt%\'*}" ! OPTS="${OPTS//$opt}" ;; esac done echo $OPTS --- 34,55 ---- opt="${error#*\"}" opt="${opt%\"*}" ;; *:\ unrecognized\ *option\ \`*) opt="${error#*\`}" opt="${opt%\'*}" ! ;; ! *) continue ;; esac + # if we come here, we have in $opt the option to remove. and + # we remove all instances. And we save agoinst leading "-" + NEW_OPTS="" + for o in $OPTS; do + case "$o" in + $opt) : echo "Removed $o" >&2;; + *) NEW_OPTS="$NEW_OPTS $o";; + esac + done + OPTS="$NEW_OPTS" done echo $OPTS Index: Makefile.inc =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile.inc,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Makefile.inc 6 Dec 2007 20:13:56 -0000 1.48 --- Makefile.inc 11 Dec 2007 17:16:03 -0000 1.49 *************** *** 26,30 **** # programs ! CCACHE ?= $(shell which ccache 2> /dev/null) ifeq ($(origin CC),default) CC = $(CCACHE) gcc --- 26,30 ---- # programs ! CCACHE ?= $(shell IFS=:; for i in $$PATH;do test -x "$$i/ccache" && echo "$$i/ccache" && break; done) ifeq ($(origin CC),default) CC = $(CCACHE) gcc *************** *** 92,100 **** WARNINGS += -Winline WARNINGS += -Wdisabled-optimization ! #WARNINGS += -Werror WARNINGS += -finline-functions-called-once WARNINGS += -fearly-inlining ifeq ($(DEBUG),0) ! WARNINGS += -fomit-framepointers endif # we have small inline functions in src/lq_route.c which should always be inlined --- 92,100 ---- WARNINGS += -Winline WARNINGS += -Wdisabled-optimization ! #nnnWARNINGS += -Werror WARNINGS += -finline-functions-called-once WARNINGS += -fearly-inlining ifeq ($(DEBUG),0) ! WARNINGS += -fomit-frame-pointer endif # we have small inline functions in src/lq_route.c which should always be inlined *************** *** 124,128 **** # c and ld flags for libraries (plugins) CPPFLAGS += -DOLSR_PLUGIN ! LDFLAGS += -shared -Wl,-soname,$(PLUGIN_NAME) LDFLAGS += -Wl,--version-script=version-script.txt else --- 124,129 ---- # c and ld flags for libraries (plugins) CPPFLAGS += -DOLSR_PLUGIN ! LDFLAGS += -shared ! LDFLAGS += -Wl,-soname,$(PLUGIN_NAME) LDFLAGS += -Wl,--version-script=version-script.txt else Index: ld-warnings =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/ld-warnings,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ld-warnings 6 Dec 2007 22:07:29 -0000 1.2 --- ld-warnings 11 Dec 2007 17:16:02 -0000 1.3 *************** *** 34,40 **** opt="${error#*\'}" opt="${opt%\'*}" ! OPTS="${OPTS//-Wl,$opt}" ;; esac done echo $OPTS --- 34,51 ---- opt="${error#*\'}" opt="${opt%\'*}" ! ;; ! *) continue ;; esac + # if we come here, we have in $opt the option to remove. and + # we remove all instances. And we save agoinst leading "-" + NEW_OPTS="" + for o in $OPTS; do + case "$o" in + -Wl,$opt) : echo "Removed $o" >&2;; + *) NEW_OPTS="$NEW_OPTS $o";; + esac + done + OPTS="$NEW_OPTS" done echo $OPTS From (spam-protected) Tue Dec 11 18:20:08 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Tue, 11 Dec 2007 17:20:08 +0000 Subject: [Olsr-cvs] olsrd-current CHANGELOG,1.121,1.122 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19671 Modified Files: CHANGELOG Log Message: - Replaced "which" with a /bin/sh script snippet. - inspired by Sven-Ola Tücke: avoid a bash'ism (i.e. "OPTS="${OPTS//$opt}") in gcc-warnings and ld-warnings. But we do not replace it with `sed` (since it costs a fork(2) and an exec(3)) but also with shell code which doesn't use any external program. For a specification of /bin/sh: see http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02 Index: CHANGELOG =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/CHANGELOG,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** CHANGELOG 29 Nov 2007 22:40:11 -0000 1.121 --- CHANGELOG 11 Dec 2007 17:20:06 -0000 1.122 *************** *** 24,27 **** --- 24,28 ---- - 138-olsrd-fixdotdraw.patch: fix the dot_draw plugin (all to be found on http://download-master.berlin.freifunk.net/sven-ola/nylon/packages/olsrd/files/) + - Replaced "which" with a /bin/sh script snippet PATCHES and CLEANUPS by Bernd Petrovitsch *************** *** 153,156 **** --- 154,161 ---- - removed the superflous "open_ipc" field from the "struct olsrd_config" as it contains only the equivalent of "olsr_cnf->debug_level > 1". + - inspired by Sven-Ola Tücke: avoid a bash'ism (i.e. "OPTS="${OPTS//$opt}") in + gcc-warnings and ld-warnings. But we do not replace it with `sed` (since it + costs a fork(2) and an exec(3)) but also with shell code which doesn't use + any external program. 0.5.4 --------------------------------------------------------------------- From (spam-protected) Wed Dec 12 10:39:53 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 09:39:53 +0000 Subject: [Olsr-cvs] olsrd-current Makefile.inc,1.49,1.50 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5870 Modified Files: Makefile.inc Log Message: * ooops, fixed typo Index: Makefile.inc =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile.inc,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Makefile.inc 11 Dec 2007 17:16:03 -0000 1.49 --- Makefile.inc 12 Dec 2007 09:39:50 -0000 1.50 *************** *** 92,96 **** WARNINGS += -Winline WARNINGS += -Wdisabled-optimization ! #nnnWARNINGS += -Werror WARNINGS += -finline-functions-called-once WARNINGS += -fearly-inlining --- 92,96 ---- WARNINGS += -Winline WARNINGS += -Wdisabled-optimization ! #WARNINGS += -Werror WARNINGS += -finline-functions-called-once WARNINGS += -fearly-inlining *************** *** 98,102 **** WARNINGS += -fomit-frame-pointer endif ! # we have small inline functions in src/lq_route.c which should always be inlined WARNINGS += -finline-limit=50 # These tell gcc to put each function and global variable in a separate section. --- 98,102 ---- WARNINGS += -fomit-frame-pointer endif ! # we have small inline functions in src/lq_route.h which should always be inlined WARNINGS += -finline-limit=50 # These tell gcc to put each function and global variable in a separate section. From (spam-protected) Wed Dec 12 22:50:42 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 21:50:42 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser oparse.y,1.41,1.42 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13443/src/cfgparser Modified Files: oparse.y Log Message: * allow IPv6 HNA addresses only in IPv6 mode. The same for IPv4. Index: oparse.y =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oparse.y,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** oparse.y 29 Nov 2007 22:21:26 -0000 1.41 --- oparse.y 12 Dec 2007 21:50:40 -0000 1.42 *************** *** 128,131 **** --- 128,136 ---- PARSER_DEBUG_PRINTF("HNA IPv6 entry: %s/%d\n", ipaddr_arg->string, prefixlen_arg->integer); + if (olsr_cnf->ip_version != AF_INET6) { + fprintf(stderr, "IPv6 addresses can only be used if \"IpVersion\" == 6\n"); + return 1; + } + if(inet_pton(AF_INET6, ipaddr_arg->string, &ipaddr) <= 0) { fprintf(stderr, "ihna6entry: Failed converting IP address %s\n", ipaddr_arg->string); *************** *** 717,720 **** --- 722,730 ---- PARSER_DEBUG_PRINTF("HNA IPv4 entry: %s/%s\n", $1->string, $2->string); + if (olsr_cnf->ip_version != AF_INET) { + fprintf(stderr, "IPv4 addresses can only be used if \"IpVersion\" == 4\n"); + YYABORT; + } + if (inet_pton(AF_INET, $1->string, &ipaddr.v4) <= 0) { fprintf(stderr, "ihna4entry: Failed converting IP address %s\n", $1->string); From (spam-protected) Wed Dec 12 22:57:29 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 21:57:29 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser olsrd_conf.c,1.65,1.66 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15735/src/cfgparser Modified Files: olsrd_conf.c Log Message: applied patch by Hannes Gredler :: pls find attached a pointer for further CPU savings in olsrd. even in large networks (>250 nodes) the avg. CPU utilization does not get beyond 0.5% CPU load on standard 200Mhz WRT hardware. patch from http://gredler.at/download/olsrd/rib2-refactoring4.diff change-list: - avoid the periodical rib-tree insertion - add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks (or any parties who want to walk HNA entries). - add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE. this is as per sven-olas request who has expressed concerns that the current flap-metric style is a bit unpleasant for troubleshooting. note that i have not yet added the cfg file parser routine for that - just the required tweaks in the change-processing FIB code. Index: olsrd_conf.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** olsrd_conf.c 2 Dec 2007 19:00:28 -0000 1.65 --- olsrd_conf.c 12 Dec 2007 21:57:27 -0000 1.66 *************** *** 437,440 **** --- 437,441 ---- cnf->willingness_auto = DEF_WILL_AUTO; cnf->ipc_connections = DEF_IPC_CONNECTIONS; + cnf->flat_fib_metric = DEF_FLAT_FIB_METRIC; cnf->use_hysteresis = DEF_USE_HYST; From (spam-protected) Wed Dec 12 22:57:29 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 21:57:29 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 kernel_routes.c,1.26,1.27 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15735/src/win32 Modified Files: kernel_routes.c Log Message: applied patch by Hannes Gredler :: pls find attached a pointer for further CPU savings in olsrd. even in large networks (>250 nodes) the avg. CPU utilization does not get beyond 0.5% CPU load on standard 200Mhz WRT hardware. patch from http://gredler.at/download/olsrd/rib2-refactoring4.diff change-list: - avoid the periodical rib-tree insertion - add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks (or any parties who want to walk HNA entries). - add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE. this is as per sven-olas request who has expressed concerns that the current flap-metric style is a bit unpleasant for troubleshooting. note that i have not yet added the cfg file parser routine for that - just the required tweaks in the change-processing FIB code. Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** kernel_routes.c 29 Nov 2007 22:21:26 -0000 1.26 --- kernel_routes.c 12 Dec 2007 21:57:27 -0000 1.27 *************** *** 87,91 **** Row.dwForwardAge = INFINITE; Row.dwForwardNextHopAS = 0; ! Row.dwForwardMetric1 = RT_METRIC_DEFAULT; Row.dwForwardMetric2 = -1; Row.dwForwardMetric3 = -1; --- 87,91 ---- Row.dwForwardAge = INFINITE; Row.dwForwardNextHopAS = 0; ! Row.dwForwardMetric1 = olsr_fib_metric(&rt->rt_best->rtp_metric.hops); Row.dwForwardMetric2 = -1; Row.dwForwardMetric3 = -1; *************** *** 164,168 **** Row.dwForwardAge = INFINITE; Row.dwForwardNextHopAS = 0; ! Row.dwForwardMetric1 = RT_METRIC_DEFAULT; Row.dwForwardMetric2 = -1; Row.dwForwardMetric3 = -1; --- 164,168 ---- Row.dwForwardAge = INFINITE; Row.dwForwardNextHopAS = 0; ! Row.dwForwardMetric1 = olsr_fib_metric(&rt->rt_metric.hops); Row.dwForwardMetric2 = -1; Row.dwForwardMetric3 = -1; From (spam-protected) Wed Dec 12 22:57:29 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 21:57:29 +0000 Subject: [Olsr-cvs] olsrd-current/src/linux kernel_routes.c,1.34,1.35 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/linux In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15735/src/linux Modified Files: kernel_routes.c Log Message: applied patch by Hannes Gredler :: pls find attached a pointer for further CPU savings in olsrd. even in large networks (>250 nodes) the avg. CPU utilization does not get beyond 0.5% CPU load on standard 200Mhz WRT hardware. patch from http://gredler.at/download/olsrd/rib2-refactoring4.diff change-list: - avoid the periodical rib-tree insertion - add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks (or any parties who want to walk HNA entries). - add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE. this is as per sven-olas request who has expressed concerns that the current flap-metric style is a bit unpleasant for troubleshooting. note that i have not yet added the cfg file parser routine for that - just the required tweaks in the change-processing FIB code. Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/kernel_routes.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** kernel_routes.c 2 Dec 2007 19:00:28 -0000 1.34 --- kernel_routes.c 12 Dec 2007 21:57:27 -0000 1.35 *************** *** 88,94 **** 0 }; ! olsr_u32_t metric = 1; const struct rt_nexthop* nexthop = (RTM_NEWROUTE == cmd) ? &rt->rt_best->rtp_nexthop : &rt->rt_nexthop; memset(&req, 0, sizeof(req)); --- 88,96 ---- 0 }; ! olsr_u32_t metric = RT_METRIC_DEFAULT; const struct rt_nexthop* nexthop = (RTM_NEWROUTE == cmd) ? &rt->rt_best->rtp_nexthop : &rt->rt_nexthop; + const struct rt_metric* met = (RTM_NEWROUTE == cmd) ? + &rt->rt_best->rtp_metric : &rt->rt_metric; memset(&req, 0, sizeof(req)); *************** *** 109,113 **** olsr_netlink_addreq(&req, RTA_GATEWAY, &nexthop->gateway.v4, sizeof(nexthop->gateway.v4)); req.r.rtm_scope = RT_SCOPE_UNIVERSE; ! metric = RT_METRIC_DEFAULT; } olsr_netlink_addreq(&req, RTA_DST, &rt->rt_dst.prefix.v4, sizeof(rt->rt_dst.prefix.v4)); --- 111,115 ---- olsr_netlink_addreq(&req, RTA_GATEWAY, &nexthop->gateway.v4, sizeof(nexthop->gateway.v4)); req.r.rtm_scope = RT_SCOPE_UNIVERSE; ! metric = olsr_fib_metric(met); } olsr_netlink_addreq(&req, RTA_DST, &rt->rt_dst.prefix.v4, sizeof(rt->rt_dst.prefix.v4)); *************** *** 119,123 **** olsr_netlink_addreq(&req, RTA_GATEWAY, &nexthop->gateway.v6, sizeof(nexthop->gateway.v6)); req.r.rtm_scope = RT_SCOPE_UNIVERSE; ! metric = RT_METRIC_DEFAULT; } olsr_netlink_addreq(&req, RTA_DST, &rt->rt_dst.prefix.v6, sizeof(rt->rt_dst.prefix.v6)); --- 121,125 ---- olsr_netlink_addreq(&req, RTA_GATEWAY, &nexthop->gateway.v6, sizeof(nexthop->gateway.v6)); req.r.rtm_scope = RT_SCOPE_UNIVERSE; ! metric = olsr_fib_metric(met); } olsr_netlink_addreq(&req, RTA_DST, &rt->rt_dst.prefix.v6, sizeof(rt->rt_dst.prefix.v6)); *************** *** 204,208 **** kernel_route.rt_flags = olsr_rt_flags(rt); ! kernel_route.rt_metric = RT_METRIC_DEFAULT; /* --- 206,210 ---- kernel_route.rt_flags = olsr_rt_flags(rt); ! kernel_route.rt_metric = olsr_fib_metric(&rt->rt_best->rtp_metric.hops); /* *************** *** 269,273 **** kernel_route.rtmsg_flags = olsr_rt_flags(rt); ! kernel_route.rtmsg_metric = RT_METRIC_DEFAULT; /* --- 271,275 ---- kernel_route.rtmsg_flags = olsr_rt_flags(rt); ! kernel_route.rtmsg_metric = olsr_fib_metric(&rt->rt_best->rtp_metric.hops); /* *************** *** 333,337 **** kernel_route.rt_flags = olsr_rt_flags(rt); ! kernel_route.rt_metric = RT_METRIC_DEFAULT; /* --- 335,339 ---- kernel_route.rt_flags = olsr_rt_flags(rt); ! kernel_route.rt_metric = olsr_fib_metric(&rt->rt_metric.hops); /* *************** *** 389,393 **** kernel_route.rtmsg_flags = olsr_rt_flags(rt); ! kernel_route.rtmsg_metric = RT_METRIC_DEFAULT; if ((rslt = ioctl(olsr_cnf->ioctl_s, SIOCDELRT, &kernel_route) >= 0)) { --- 391,395 ---- kernel_route.rtmsg_flags = olsr_rt_flags(rt); ! kernel_route.rtmsg_metric = olsr_fib_metric(&rt->rt_best->rtp_metric.hops); if ((rslt = ioctl(olsr_cnf->ioctl_s, SIOCDELRT, &kernel_route) >= 0)) { From (spam-protected) Wed Dec 12 22:57:58 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 21:57:58 +0000 Subject: [Olsr-cvs] olsrd-current CHANGELOG,1.122,1.123 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16171 Modified Files: CHANGELOG Log Message: applied patch by Hannes Gredler :: pls find attached a pointer for further CPU savings in olsrd. even in large networks (>250 nodes) the avg. CPU utilization does not get beyond 0.5% CPU load on standard 200Mhz WRT hardware. patch from http://gredler.at/download/olsrd/rib2-refactoring4.diff change-list: - avoid the periodical rib-tree insertion - add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks (or any parties who want to walk HNA entries). - add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE. this is as per sven-olas request who has expressed concerns that the current flap-metric style is a bit unpleasant for troubleshooting. note that i have not yet added the cfg file parser routine for that - just the required tweaks in the change-processing FIB code. Index: CHANGELOG =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/CHANGELOG,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** CHANGELOG 11 Dec 2007 17:20:06 -0000 1.122 --- CHANGELOG 12 Dec 2007 21:57:56 -0000 1.123 *************** *** 9,12 **** --- 9,17 ---- - refactoring of TC parsing to kill another pile of malloc()/free()s saving (again) code and especially run.time performance. + - RIB Refactoring, Part 2: + - avoid the periodical rib-tree insertion + - add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks + (or any parties who want to walk HNA entries). + - add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE. PATCH by John Hay : From (spam-protected) Wed Dec 12 23:03:39 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:03:39 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_route.c,1.62,1.63 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18647/src Modified Files: lq_route.c Log Message: * added a missing variable definition Index: lq_route.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** lq_route.c 12 Dec 2007 21:57:27 -0000 1.62 --- lq_route.c 12 Dec 2007 22:03:37 -0000 1.63 *************** *** 443,446 **** --- 443,447 ---- */ if (tc != tc_myself) { + struct ipaddr_str buf; OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr)); } From (spam-protected) Wed Dec 12 23:04:10 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:04:10 +0000 Subject: [Olsr-cvs] olsrd-current/src routing_table.c,1.39,1.40 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19015/src Modified Files: routing_table.c Log Message: * fixed variable definitions Index: routing_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** routing_table.c 12 Dec 2007 21:57:27 -0000 1.39 --- routing_table.c 12 Dec 2007 22:04:08 -0000 1.40 *************** *** 489,494 **** union olsr_ip_addr *originator, int origin) { ! #if !defined(NODEBUG) && defined(DEBUG) ! struct ipaddr_str buf; #endif struct tc_entry *tc; --- 489,494 ---- union olsr_ip_addr *originator, int origin) { ! #if !defined(NODEBUG) ! struct ipaddr_str dstbuf, origbuf; #endif struct tc_entry *tc; *************** *** 505,510 **** OLSR_PRINTF(1, "RIB: add prefix %s/%u from %s\n", ! olsr_ip_to_string(&buf, dst), plen, ! olsr_ip_to_string(&buf, originator)); /* --- 505,510 ---- OLSR_PRINTF(1, "RIB: add prefix %s/%u from %s\n", ! olsr_ip_to_string(&dstbuf, dst), plen, ! olsr_ip_to_string(&origbuf, originator)); /* From (spam-protected) Wed Dec 12 23:05:55 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:05:55 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser cfgfile_gen.c,1.14,1.15 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19497/src/cfgparser Modified Files: cfgfile_gen.c Log Message: * do not generate netmasks and fixed up some comments Index: cfgfile_gen.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** cfgfile_gen.c 2 Dec 2007 19:00:28 -0000 1.14 --- cfgfile_gen.c 12 Dec 2007 22:05:53 -0000 1.15 *************** *** 84,88 **** fprintf(fd, "# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* HNA IPv4 */ fprintf(fd, "# HNA IPv%1$d routes\n# syntax: netaddr netmask\n\nHna1$d {\n", cnf->ip_version == AF_INET ? 4 : 6); while(h) { --- 84,88 ---- fprintf(fd, "# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* HNA IPv4/IPv6 */ fprintf(fd, "# HNA IPv%1$d routes\n# syntax: netaddr netmask\n\nHna1$d {\n", cnf->ip_version == AF_INET ? 4 : 6); while(h) { *************** *** 287,296 **** while (mult != NULL) { ! inet_ntop(cnf->ip_version, &mult->addr, ipv6_buf, ! sizeof (ipv6_buf)); ! ! fprintf(fd, " LinkQualityMult\t%s %0.2f\n", ! ipv6_buf, mult->val); ! mult = mult->next; } --- 287,291 ---- while (mult != NULL) { ! fprintf(fd, " LinkQualityMult\t%s %0.2f\n", inet_ntop(cnf->ip_version, &mult->addr, ipv6_buf, sizeof(ipv6_buf)), mult->val); mult = mult->next; } *************** *** 372,387 **** WRITE_TO_BUF("# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* HNA IPv4 and IPv6 */ WRITE_TO_BUF("# HNA IPv%1$d routes\n# syntax: netaddr netmask\n\nHna%1$d {\n", cnf->ip_version == AF_INET ? 4 : 6); while(h) { struct ipaddr_str strbuf; ! WRITE_TO_BUF(" %s ", olsr_ip_to_string(&strbuf, &h->net.prefix)); ! if (cnf->ip_version == AF_INET) { ! union olsr_ip_addr ip_addr; ! olsr_prefix_to_netmask(&ip_addr, h->net.prefix_len); ! WRITE_TO_BUF("%s\n", olsr_ip_to_string(&strbuf, &ip_addr)); ! } else { ! WRITE_TO_BUF("%d\n", h->net.prefix_len); ! } h = h->next; } --- 367,375 ---- WRITE_TO_BUF("# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* HNA IPv4/IPv6 */ WRITE_TO_BUF("# HNA IPv%1$d routes\n# syntax: netaddr netmask\n\nHna%1$d {\n", cnf->ip_version == AF_INET ? 4 : 6); while(h) { struct ipaddr_str strbuf; ! WRITE_TO_BUF(" %s/%d\n", olsr_ip_to_string(&strbuf, &h->net.prefix), h->net.prefix_len); h = h->next; } *************** *** 588,596 **** while (mult != NULL) { ! inet_ntop(cnf->ip_version, &mult->addr, ipv6_buf, ! sizeof (ipv6_buf)); ! ! WRITE_TO_BUF(" LinkQualityMult\t%s %0.2f\n", ipv6_buf, mult->val); ! mult = mult->next; } --- 576,580 ---- while (mult != NULL) { ! WRITE_TO_BUF(" LinkQualityMult\t%s %0.2f\n", inet_ntop(cnf->ip_version, &mult->addr, ipv6_buf, sizeof (ipv6_buf)), mult->val); mult = mult->next; } From (spam-protected) Wed Dec 12 23:06:26 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:06:26 +0000 Subject: [Olsr-cvs] olsrd-current/lib/httpinfo/src olsrd_httpinfo.c, 1.89, 1.90 admin_interface.c, 1.15, 1.16 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19885/lib/httpinfo/src Modified Files: olsrd_httpinfo.c admin_interface.c Log Message: * do not generate netmasks but the prefixlen Index: olsrd_httpinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** olsrd_httpinfo.c 2 Dec 2007 19:00:29 -0000 1.89 --- olsrd_httpinfo.c 12 Dec 2007 22:06:24 -0000 1.90 *************** *** 951,974 **** if (olsr_cnf->hna_entries) { struct ip_prefix_list *hna; ! if (olsr_cnf->ip_version == AF_INET) { ! size += snprintf(&buf[size], bufsize-size, "NetworkNetmask\n"); ! for (hna = olsr_cnf->hna_entries; hna; hna = hna->next) { ! union olsr_ip_addr netmask; ! struct ipaddr_str netbuf, maskbuf; ! olsr_prefix_to_netmask(&netmask, hna->net.prefix_len); ! size += snprintf(&buf[size], bufsize-size, ! "%s%s\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), ! olsr_ip_to_string(&maskbuf, &netmask)); ! } ! } else { ! size += snprintf(&buf[size], bufsize-size, "NetworkPrefix length\n"); ! for (hna = olsr_cnf->hna_entries; hna; hna = hna->next) { ! struct ipaddr_str netbuf; ! size += snprintf(&buf[size], bufsize-size, ! "%s%d\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), ! hna->net.prefix_len); ! } } } else { --- 951,961 ---- if (olsr_cnf->hna_entries) { struct ip_prefix_list *hna; ! size += snprintf(&buf[size], bufsize-size, "Network\n"); ! for (hna = olsr_cnf->hna_entries; hna; hna = hna->next) { ! struct ipaddr_str netbuf; ! size += snprintf(&buf[size], bufsize-size, ! "%s/%d\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), ! hna->net.prefix_len); } } else { Index: admin_interface.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/admin_interface.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_interface.c 2 Dec 2007 19:00:29 -0000 1.15 --- admin_interface.c 12 Dec 2007 22:06:24 -0000 1.16 *************** *** 153,176 **** if(olsr_cnf->hna_entries) { ! if(olsr_cnf->ip_version == AF_INET) { ! struct ip_prefix_list *hna; ! struct ipaddr_str netbuf, maskbuf; ! for(hna = olsr_cnf->hna_entries; hna; hna = hna->next) { ! union olsr_ip_addr netmask; ! olsr_prefix_to_netmask(&netmask, hna->net.prefix_len); ! size += snprintf(&buf[size], bufsize-size, ! "%1$s%2$s\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), ! olsr_ip_to_string(&maskbuf, &netmask)); ! } ! } else { ! struct ip_prefix_list *hna; ! for(hna = olsr_cnf->hna_entries; hna; hna = hna->next) { ! struct ipaddr_str netbuf; ! size += snprintf(&buf[size], bufsize-size, ! "%1$s%2$d\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), ! hna->net.prefix_len); ! } } } --- 153,163 ---- if(olsr_cnf->hna_entries) { ! struct ip_prefix_list *hna; ! for(hna = olsr_cnf->hna_entries; hna; hna = hna->next) { ! struct ipaddr_str netbuf; ! size += snprintf(&buf[size], bufsize-size, ! "%1$s%2$d\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), ! hna->net.prefix_len); } } From (spam-protected) Wed Dec 12 22:57:29 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 21:57:29 +0000 Subject: [Olsr-cvs] olsrd-current/src hna_set.c, 1.29, 1.30 link_set.c, 1.80, 1.81 link_set.h, 1.36, 1.37 lq_route.c, 1.61, 1.62 mid_set.c, 1.27, 1.28 mid_set.h, 1.16, 1.17 olsr.c, 1.65, 1.66 olsr_cfg.h, 1.42, 1.43 process_routes.c, 1.42, 1.43 process_routes.h, 1.15, 1.16 routing_table.c, 1.38, 1.39 routing_table.h, 1.25, 1.26 tc_set.c, 1.40, 1.41 tc_set.h, 1.23, 1.24 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15735/src Modified Files: hna_set.c link_set.c link_set.h lq_route.c mid_set.c mid_set.h olsr.c olsr_cfg.h process_routes.c process_routes.h routing_table.c routing_table.h tc_set.c tc_set.h Log Message: applied patch by Hannes Gredler :: pls find attached a pointer for further CPU savings in olsrd. even in large networks (>250 nodes) the avg. CPU utilization does not get beyond 0.5% CPU load on standard 200Mhz WRT hardware. patch from http://gredler.at/download/olsrd/rib2-refactoring4.diff change-list: - avoid the periodical rib-tree insertion - add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks (or any parties who want to walk HNA entries). - add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE. this is as per sven-olas request who has expressed concerns that the current flap-metric style is a bit unpleasant for troubleshooting. note that i have not yet added the cfg file parser routine for that - just the required tweaks in the change-processing FIB code. Index: tc_set.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** tc_set.h 16 Nov 2007 21:43:55 -0000 1.23 --- tc_set.h 12 Dec 2007 21:57:27 -0000 1.24 *************** *** 84,88 **** union olsr_ip_addr addr; /* vertex_node key */ struct avl_tree edge_tree; /* subtree for edges */ ! struct link_entry *next_hop; /* SPF calculated link to the 1st hop neighbor */ float path_etx; /* SPF calculated distance, cand_tree_node key */ olsr_u16_t msg_seq; /* sequence number of the tc message */ --- 84,89 ---- union olsr_ip_addr addr; /* vertex_node key */ struct avl_tree edge_tree; /* subtree for edges */ ! struct avl_tree prefix_tree; /* subtree for prefixes */ ! struct link_entry *next_hop; /* SPF calculated link to the 1st hop neighbor */ float path_etx; /* SPF calculated distance, cand_tree_node key */ olsr_u16_t msg_seq; /* sequence number of the tc message */ *************** *** 92,96 **** /* ! * macros for traversing the vertices and edges in the link state database. * it is recommended to use this because it hides all the internal * datastructure from the callers. --- 93,97 ---- /* ! * macros for traversing vertices, edges and prefixes in the link state database. * it is recommended to use this because it hides all the internal * datastructure from the callers. *************** *** 131,134 **** --- 132,136 ---- /* tc_entry manipulation */ struct tc_entry *olsr_lookup_tc_entry(union olsr_ip_addr *); + struct tc_entry *olsr_locate_tc_entry(union olsr_ip_addr *); struct tc_entry *olsr_add_tc_entry(union olsr_ip_addr *); struct tc_entry *olsr_getnext_tc_entry(struct tc_entry *); *************** *** 145,148 **** --- 147,151 ---- void olsr_calc_tc_edge_entry_etx(struct tc_edge_entry *); float olsr_calc_tc_etx(const struct tc_edge_entry *); + void olsr_set_tc_edge_timer(struct tc_edge_entry *, unsigned int); #endif Index: mid_set.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mid_set.h 8 Nov 2007 22:47:41 -0000 1.16 --- mid_set.h 12 Dec 2007 21:57:27 -0000 1.17 *************** *** 52,56 **** union olsr_ip_addr alias; struct mid_entry *main_entry; - struct mid_address *next_alias; --- 52,55 ---- *************** *** 82,89 **** void ! insert_mid_tuple(const union olsr_ip_addr *, struct mid_address *, float); void ! insert_mid_alias(const union olsr_ip_addr *, const union olsr_ip_addr *, float); union olsr_ip_addr * --- 81,88 ---- void ! insert_mid_tuple(union olsr_ip_addr *, struct mid_address *, float); void ! insert_mid_alias(union olsr_ip_addr *, const union olsr_ip_addr *, float); union olsr_ip_addr * *************** *** 93,96 **** --- 92,98 ---- mid_lookup_aliases(const union olsr_ip_addr *); + struct mid_entry * + mid_lookup_entry_bymain(const union olsr_ip_addr *); + void olsr_print_mid_set(void); *************** *** 109,110 **** --- 111,118 ---- #endif + + /* + * Local Variables: + * c-basic-offset: 2 + * End: + */ Index: mid_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** mid_set.c 2 Dec 2007 19:00:27 -0000 1.27 --- mid_set.c 12 Dec 2007 21:57:27 -0000 1.28 *************** *** 48,51 **** --- 48,52 ---- #include "neighbor_table.h" #include "link_set.h" + #include "tc_set.h" #include "packet.h" /* struct mid_alias */ #include "net_olsr.h" *************** *** 99,103 **** void ! insert_mid_tuple(const union olsr_ip_addr *m_addr, struct mid_address *alias, float vtime) { struct mid_entry *tmp; --- 100,104 ---- void ! insert_mid_tuple(union olsr_ip_addr *m_addr, struct mid_address *alias, float vtime) { struct mid_entry *tmp; *************** *** 126,129 **** --- 127,136 ---- } + /* + * Add a rt_path for the alias. + */ + olsr_insert_routing_table(&alias->alias, olsr_cnf->maxplen, m_addr, + OLSR_RT_ORIGIN_MID); + /*If the address was registered*/ if(tmp != &mid_set[hash]) *************** *** 140,143 **** --- 147,151 ---- /*Create new node*/ tmp = olsr_malloc(sizeof(struct mid_entry), "MID new alias"); + memset(tmp, 0, sizeof(struct mid_entry)); tmp->aliases = alias; *************** *** 221,225 **** */ void ! insert_mid_alias(const union olsr_ip_addr *main_add, const union olsr_ip_addr *alias, float vtime) { struct neighbor_entry *ne_old, *ne_new; --- 229,233 ---- */ void ! insert_mid_alias(union olsr_ip_addr *main_add, const union olsr_ip_addr *alias, float vtime) { struct neighbor_entry *ne_old, *ne_new; *************** *** 229,237 **** struct ipaddr_str buf1, buf2; #endif ! struct mid_address *adr = olsr_malloc(sizeof(struct mid_address), "Insert MID alias"); OLSR_PRINTF(1, "Inserting alias %s for ", olsr_ip_to_string(&buf1, alias)); OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(&buf1, main_add)); adr->alias = *alias; adr->next_alias = NULL; --- 237,248 ---- struct ipaddr_str buf1, buf2; #endif ! struct mid_address *adr; OLSR_PRINTF(1, "Inserting alias %s for ", olsr_ip_to_string(&buf1, alias)); OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(&buf1, main_add)); + adr = olsr_malloc(sizeof(struct mid_address), "Insert MID alias"); + memset(adr, 0, sizeof(struct mid_address)); + adr->alias = *alias; adr->next_alias = NULL; *************** *** 446,449 **** --- 457,466 ---- /* Remove from hash table */ DEQUEUE_ELEM(current_alias); + + /* + * Delete the rt_path for the alias. + */ + olsr_delete_routing_table(¤t_alias->alias, olsr_cnf->maxplen, + &entry->main_addr); free(current_alias); *************** *** 512,521 **** */ int ! mid_delete_node(struct mid_entry *entry) { struct mid_address *aliases; /* Free aliases */ ! aliases = entry->aliases; while(aliases) { --- 529,538 ---- */ int ! mid_delete_node(struct mid_entry *mid) { struct mid_address *aliases; /* Free aliases */ ! aliases = mid->aliases; while(aliases) { *************** *** 523,531 **** aliases = aliases->next_alias; DEQUEUE_ELEM(tmp_aliases); free(tmp_aliases); } /* Dequeue */ ! DEQUEUE_ELEM(entry); ! free(entry); return 0; --- 540,556 ---- aliases = aliases->next_alias; DEQUEUE_ELEM(tmp_aliases); + + + /* + * Delete the rt_path for the alias. + */ + olsr_delete_routing_table(&tmp_aliases->alias, olsr_cnf->maxplen, + &mid->main_addr); + free(tmp_aliases); } /* Dequeue */ ! DEQUEUE_ELEM(mid); ! free(mid); return 0; *************** *** 565,570 **** } ! ! ! ! --- 590,596 ---- } ! /* ! * Local Variables: ! * c-basic-offset: 2 ! * End: ! */ Index: link_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.c,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** link_set.c 2 Dec 2007 19:00:27 -0000 1.80 --- link_set.c 12 Dec 2007 21:57:27 -0000 1.81 *************** *** 503,506 **** --- 503,509 ---- new_link->if_name = NULL; + /* shortcut to interface. XXX refcount */ + new_link->inter = local_if; + /* * L_local_iface_addr = Address of the interface *************** *** 700,703 **** --- 703,707 ---- //printf("Vtime is %f\n", message->vtime); /* L_ASYM_time = current time + validity time */ + entry->vtime = message->vtime; entry->ASYM_time = GET_TIMESTAMP(message->vtime*1000); Index: lq_route.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** lq_route.c 29 Nov 2007 00:49:38 -0000 1.61 --- lq_route.c 12 Dec 2007 21:57:27 -0000 1.62 *************** *** 42,46 **** */ ! #define SPF_PROFILING 1 #include "ipcalc.h" --- 42,46 ---- */ ! #define SPF_PROFILING 0 #include "ipcalc.h" *************** *** 89,107 **** static void olsr_spf_add_cand_tree (struct avl_tree *tree, ! struct tc_entry *vert) { #if !defined(NODEBUG) && defined(DEBUG) struct ipaddr_str buf; #endif ! vert->cand_tree_node.key = &vert->path_etx; ! vert->cand_tree_node.data = vert; #ifdef DEBUG OLSR_PRINTF(1, "SPF: insert candidate %s, cost %f\n", ! olsr_ip_to_string(&buf, &vert->addr), ! vert->path_etx); #endif ! avl_insert(tree, &vert->cand_tree_node, AVL_DUP); } --- 89,107 ---- static void olsr_spf_add_cand_tree (struct avl_tree *tree, ! struct tc_entry *tc) { #if !defined(NODEBUG) && defined(DEBUG) struct ipaddr_str buf; #endif ! tc->cand_tree_node.key = &tc->path_etx; ! tc->cand_tree_node.data = tc; #ifdef DEBUG OLSR_PRINTF(1, "SPF: insert candidate %s, cost %f\n", ! olsr_ip_to_string(&buf, &tc->addr), ! tc->path_etx); #endif ! avl_insert(tree, &tc->cand_tree_node, AVL_DUP); } *************** *** 113,117 **** static void olsr_spf_del_cand_tree (struct avl_tree *tree, ! struct tc_entry *vert) { --- 113,117 ---- static void olsr_spf_del_cand_tree (struct avl_tree *tree, ! struct tc_entry *tc) { *************** *** 121,129 **** #endif OLSR_PRINTF(1, "SPF: delete candidate %s, cost %f\n", ! olsr_ip_to_string(&buf, &vert->addr), ! vert->path_etx); #endif ! avl_delete(tree, &vert->cand_tree_node); } --- 121,129 ---- #endif OLSR_PRINTF(1, "SPF: delete candidate %s, cost %f\n", ! olsr_ip_to_string(&buf, &tc->addr), ! tc->path_etx); #endif ! avl_delete(tree, &tc->cand_tree_node); } *************** *** 134,154 **** */ static void ! olsr_spf_add_path_list (struct list_node *head, ! int *path_count, ! struct tc_entry *vert) { #if !defined(NODEBUG) && defined(DEBUG) struct ipaddr_str pathbuf, nbuf; #endif ! vert->path_list_node.data = vert; #ifdef DEBUG OLSR_PRINTF(1, "SPF: append path %s, cost %f, via %s\n", ! olsr_ip_to_string(&pathbuf, &vert->addr), ! vert->path_etx, ! vert->next_hop ? olsr_ip_to_string(&nbuf, &vert->next_hop->neighbor_iface_addr) : "-"); #endif ! list_add_before(head, &vert->path_list_node); *path_count = *path_count + 1; } --- 134,153 ---- */ static void ! olsr_spf_add_path_list (struct list_node *head, int *path_count, ! struct tc_entry *tc) { #if !defined(NODEBUG) && defined(DEBUG) struct ipaddr_str pathbuf, nbuf; #endif ! tc->path_list_node.data = tc; #ifdef DEBUG OLSR_PRINTF(1, "SPF: append path %s, cost %f, via %s\n", ! olsr_ip_to_string(&pathbuf, &tc->addr), ! tc->path_etx, ! tc->next_hop ? olsr_ip_to_string(&nbuf, &tc->next_hop->neighbor_iface_addr) : "-"); #endif ! list_add_before(head, &tc->path_list_node); *path_count = *path_count + 1; } *************** *** 188,192 **** */ static void ! olsr_spf_relax (struct avl_tree *cand_tree, struct tc_entry *vert) { struct avl_node *edge_node; --- 187,191 ---- */ static void ! olsr_spf_relax (struct avl_tree *cand_tree, struct tc_entry *tc) { struct avl_node *edge_node; *************** *** 198,203 **** #endif OLSR_PRINTF(1, "SPF: exploring node %s, cost %f\n", ! olsr_ip_to_string(&buf, &vert->addr), ! vert->path_etx); #endif --- 197,202 ---- #endif OLSR_PRINTF(1, "SPF: exploring node %s, cost %f\n", ! olsr_ip_to_string(&buf, &tc->addr), ! tc->path_etx); #endif *************** *** 205,212 **** * loop through all edges of this vertex. */ ! for (edge_node = avl_walk_first(&vert->edge_tree); edge_node; edge_node = avl_walk_next(edge_node)) { ! struct tc_entry *new_vert; struct tc_edge_entry *tc_edge = edge_node->data; --- 204,212 ---- * loop through all edges of this vertex. */ ! for (edge_node = avl_walk_first(&tc->edge_tree); edge_node; edge_node = avl_walk_next(edge_node)) { ! ! struct tc_entry *new_tc; struct tc_edge_entry *tc_edge = edge_node->data; *************** *** 232,236 **** * to the destination of this edge */ ! new_etx = vert->path_etx + tc_edge->etx; #ifdef DEBUG --- 232,236 ---- * to the destination of this edge */ ! new_etx = tc->path_etx + tc_edge->etx; #ifdef DEBUG *************** *** 244,273 **** * destination node, then we've found a better path to this node. */ ! new_vert = tc_edge->edge_inv->tc; ! if (new_etx < new_vert->path_etx) { /* if this node has been on the candidate tree delete it */ ! if (new_vert->path_etx != INFINITE_ETX) { ! olsr_spf_del_cand_tree(cand_tree, new_vert); } /* re-insert on candidate tree with the better metric */ ! new_vert->path_etx = new_etx; ! olsr_spf_add_cand_tree(cand_tree, new_vert); /* pull-up the next-hop and bump the hop count */ ! if (vert->next_hop) { ! new_vert->next_hop = vert->next_hop; } ! new_vert->hops = vert->hops + 1; #ifdef DEBUG OLSR_PRINTF(1, "SPF: better path to %s, cost %s -> %s, via %s, hops %u\n", ! olsr_ip_to_string(&buf, &new_vert->addr), ! olsr_etx_to_string(new_vert->path_etx), olsr_etx_to_string(new_etx), ! vert->next_hop ? olsr_ip_to_string(&nbuf, &vert->next_hop->neighbor_iface_addr) : "", ! new_vert->hops); #endif --- 244,273 ---- * destination node, then we've found a better path to this node. */ ! new_tc = tc_edge->edge_inv->tc; ! if (new_etx < new_tc->path_etx) { /* if this node has been on the candidate tree delete it */ ! if (new_tc->path_etx != INFINITE_ETX) { ! olsr_spf_del_cand_tree(cand_tree, new_tc); } /* re-insert on candidate tree with the better metric */ ! new_tc->path_etx = new_etx; ! olsr_spf_add_cand_tree(cand_tree, new_tc); /* pull-up the next-hop and bump the hop count */ ! if (tc->next_hop) { ! new_tc->next_hop = tc->next_hop; } ! new_tc->hops = tc->hops + 1; #ifdef DEBUG OLSR_PRINTF(1, "SPF: better path to %s, cost %s -> %s, via %s, hops %u\n", ! olsr_ip_to_string(&buf, &new_tc->addr), ! olsr_etx_to_string(new_tc->path_etx), olsr_etx_to_string(new_etx), ! tc->next_hop ? olsr_ip_to_string(&nbuf, &tc->next_hop->neighbor_iface_addr) : "", ! new_tc->hops); #endif *************** *** 292,302 **** int *path_count) { ! struct tc_entry *vert; *path_count = 0; ! while ((vert = olsr_spf_extract_best(cand_tree))) { ! olsr_spf_relax(cand_tree, vert); /* --- 292,302 ---- int *path_count) { ! struct tc_entry *tc; *path_count = 0; ! while ((tc = olsr_spf_extract_best(cand_tree))) { ! olsr_spf_relax(cand_tree, tc); /* *************** *** 304,309 **** * to the path list. */ ! olsr_spf_del_cand_tree(cand_tree, vert); ! olsr_spf_add_path_list(path_list, path_count, vert); } } --- 304,309 ---- * to the path list. */ ! olsr_spf_del_cand_tree(cand_tree, tc); ! olsr_spf_add_path_list(path_list, path_count, tc); } } *************** *** 312,326 **** olsr_calculate_routing_table (void) { struct avl_tree cand_tree; ! struct list_node path_list; int i, path_count = 0; struct tc_entry *tc; struct tc_edge_entry *tc_edge; - struct tc_entry *vert; struct neighbor_entry *neigh; - struct mid_address *mid_walker; - struct hna_entry *hna_gw; - struct hna_net *hna; - struct interface *inter; struct link_entry *link; --- 312,327 ---- olsr_calculate_routing_table (void) { + #if !defined(NODEBUG) && defined(DEBUG) + struct ipaddr_str buf; + #endif + struct avl_tree cand_tree; ! struct avl_node *rtp_tree_node; ! struct list_node path_list; /* head of the path_list */ int i, path_count = 0; struct tc_entry *tc; + struct rt_path *rtp; struct tc_edge_entry *tc_edge; struct neighbor_entry *neigh; struct link_entry *link; *************** *** 377,380 **** --- 378,388 ---- } + /* find the interface for the link */ + if (link->if_name) { + link->inter = if_ifwithname(link->if_name); + } else { + link->inter = if_ifwithaddr(&link->local_iface_addr); + } + /* * Set the next-hops of our neighbors. *************** *** 382,391 **** if (!tc_edge) { tc_edge = olsr_add_tc_edge_entry(tc_myself, &neigh->neighbor_main_addr, ! 0, link->last_htime, link->loss_link_quality2, link->neigh_link_quality2); } else { tc_edge->link_quality = link->loss_link_quality2; tc_edge->inverse_link_quality = link->neigh_link_quality2; olsr_calc_tc_edge_entry_etx(tc_edge); } --- 390,404 ---- if (!tc_edge) { tc_edge = olsr_add_tc_edge_entry(tc_myself, &neigh->neighbor_main_addr, ! 0, link->vtime, link->loss_link_quality2, link->neigh_link_quality2); } else { + + /* + * Update LQ and timers, such that the edge does not get deleted. + */ tc_edge->link_quality = link->loss_link_quality2; tc_edge->inverse_link_quality = link->neigh_link_quality2; + olsr_set_tc_edge_timer(tc_edge, link->vtime*1000); olsr_calc_tc_edge_entry_etx(tc_edge); } *************** *** 416,477 **** /* ! * In the path tree we have all the reachable nodes in our topology. */ for (; !list_is_empty(&path_list); list_remove(path_list.next)) { ! vert = path_list.next->data; ! link = vert->next_hop; if (!link) { ! #ifndef NODEBUG ! struct ipaddr_str buf; ! #endif ! OLSR_PRINTF(2, "%s no next-hop\n", olsr_ip_to_string(&buf, &vert->addr)); continue; } ! /* find the interface for the found link */ ! inter = link->if_name ? if_ifwithname(link->if_name) ! : if_ifwithaddr(&link->local_iface_addr); ! ! /* interface is up ? */ ! if (inter) { ! ! /* add a route to the main address of the destination node */ ! olsr_insert_routing_table(&vert->addr, olsr_cnf->maxplen, &vert->addr, ! &link->neighbor_iface_addr, inter->if_index, ! vert->hops, vert->path_etx); ! /* add routes to the remaining interfaces of the destination node */ ! for (mid_walker = mid_lookup_aliases(&vert->addr); ! mid_walker != NULL; ! mid_walker = mid_walker->next_alias) { ! olsr_insert_routing_table(&mid_walker->alias, olsr_cnf->maxplen, &vert->addr, ! &link->neighbor_iface_addr, inter->if_index, ! vert->hops, vert->path_etx); ! } ! /* find the node's HNAs */ ! hna_gw = olsr_lookup_hna_gw(&vert->addr); ! /* node doesn't announce any HNAs */ ! if (!hna_gw) { ! continue; ! } ! /* loop through the node's HNAs */ ! for (hna = hna_gw->networks.next; ! hna != &hna_gw->networks; ! hna = hna->next) { ! if (vert->path_etx != INFINITE_ETX) { ! olsr_insert_routing_table(&hna->A_network_addr, hna->prefixlen, &vert->addr, ! &link->neighbor_iface_addr, inter->if_index, ! vert->hops, vert->path_etx); ! } } } } #ifdef SPF_PROFILING gettimeofday(&t4, NULL); --- 429,485 ---- /* ! * In the path list we have all the reachable nodes in our topology. */ for (; !list_is_empty(&path_list); list_remove(path_list.next)) { ! tc = path_list.next->data; ! link = tc->next_hop; if (!link) { ! ! /* ! * Supress the error msg when our own tc_entry ! * does not contain a next-hop. ! */ ! if (tc != tc_myself) { ! OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr)); ! } continue; } ! /* ! * Now walk all prefixes advertised by that node. ! * Since the node is reachable, insert the prefix into the global RIB. ! * If the prefix is already in the RIB, refresh the entry such ! * that olsr_delete_outdated_routes() does not purge it off. ! */ ! for (rtp_tree_node = avl_walk_first(&tc->prefix_tree); ! rtp_tree_node; ! rtp_tree_node = avl_walk_next(rtp_tree_node)) { ! rtp = rtp_tree_node->data; ! if (rtp->rtp_rt) { ! /* ! * If there is a route entry, the prefix is already in the global RIB. ! */ ! olsr_update_rt_path(rtp, tc, link); ! } else { ! /* ! * The prefix is reachable and not yet in the global RIB. ! * Build a rt_entry for it. ! */ ! olsr_insert_rt_path(rtp, tc, link); } } } + /* Update the RIB based on the new SPF results */ + + olsr_update_rib_routes(); + #ifdef SPF_PROFILING gettimeofday(&t4, NULL); Index: olsr_cfg.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_cfg.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** olsr_cfg.h 29 Nov 2007 22:21:26 -0000 1.42 --- olsr_cfg.h 12 Dec 2007 21:57:27 -0000 1.43 *************** *** 63,66 **** --- 63,67 ---- #define DEF_IPC_CONNECTIONS 0 #define DEF_USE_HYST OLSR_FALSE + #define DEF_FLAT_FIB_METRIC OLSR_TRUE #define DEF_LQ_LEVEL 2 #define DEF_LQ_FISH 0 *************** *** 194,197 **** --- 195,199 ---- int ipc_connections; olsr_bool use_hysteresis; + olsr_bool flat_fib_metric; struct hyst_param hysteresis_param; struct plugin_entry *plugins; *************** *** 280,281 **** --- 282,289 ---- #endif + + /* + * Local Variables: + * c-basic-offset: 2 + * End: + */ Index: tc_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** tc_set.c 29 Nov 2007 22:59:51 -0000 1.40 --- tc_set.c 12 Dec 2007 21:57:27 -0000 1.41 *************** *** 124,129 **** #endif ! /* The edgetree must be empty before */ ! assert(!tc->edge_tree.count); avl_delete(&tc_tree, &tc->vertex_node); --- 124,134 ---- #endif ! /* ! * Delete the rt_path for ourselves. ! */ ! olsr_delete_routing_table(&tc->addr, olsr_cnf->maxplen, &tc->addr); ! ! /* The edgetree and prefix tree must be empty before */ ! assert(!tc->edge_tree.count && !tc->prefix_tree.count); avl_delete(&tc_tree, &tc->vertex_node); *************** *** 182,188 **** olsr_add_tc_entry(union olsr_ip_addr *adr) { ! struct tc_entry *tc; ! #if 0 struct ipaddr_str buf; OLSR_PRINTF(1, "TC: add entry %s\n", olsr_ip_to_string(&buf, adr)); #endif --- 187,196 ---- olsr_add_tc_entry(union olsr_ip_addr *adr) { ! #if !defined(NODEBUG) && defined(DEBUG) struct ipaddr_str buf; + #endif + struct tc_entry *tc; + + #ifdef DEBUG OLSR_PRINTF(1, "TC: add entry %s\n", olsr_ip_to_string(&buf, adr)); #endif *************** *** 205,215 **** /* ! * Initialize subtree for further edges to come. */ avl_init(&tc->edge_tree, avl_comp_default); return tc; } /** * format a tc_edge contents into a buffer --- 213,244 ---- /* ! * Initialize subtrees for edges and prefixes. */ avl_init(&tc->edge_tree, avl_comp_default); + avl_init(&tc->prefix_tree, avl_comp_prefix_default); + + /* + * Add a rt_path for ourselves. + */ + olsr_insert_routing_table(adr, olsr_cnf->maxplen, adr, + OLSR_RT_ORIGIN_INT); return tc; } + /* + * Lookup a tc entry. Creates one if it does not exist yet. + */ + struct tc_entry * + olsr_locate_tc_entry(union olsr_ip_addr *adr) + { + struct tc_entry *tc; + + if (!(tc = olsr_lookup_tc_entry(adr))) { + return olsr_add_tc_entry(adr); + } + return tc; + } + /** * format a tc_edge contents into a buffer *************** *** 240,244 **** * The timer param is a relative timer expressed in milliseconds. */ ! static void olsr_set_tc_edge_timer(struct tc_edge_entry *tc_edge, unsigned int timer) { --- 269,273 ---- * The timer param is a relative timer expressed in milliseconds. */ ! void olsr_set_tc_edge_timer(struct tc_edge_entry *tc_edge, unsigned int timer) { *************** *** 273,276 **** --- 302,308 ---- float link_quality, float neigh_link_quality) { + #if !defined(NODEBUG) && defined(DEBUG) + struct ipaddr_str buf; + #endif struct tc_entry *tc_neighbor; struct tc_edge_entry *tc_edge, *tc_edge_inv; *************** *** 312,316 **** tc_edge->tc = tc; ! #if 0 OLSR_PRINTF(1, "TC: add edge entry %s\n", olsr_tc_edge_to_string(tc_edge)); #endif --- 344,348 ---- tc_edge->tc = tc; ! #ifdef DEBUG OLSR_PRINTF(1, "TC: add edge entry %s\n", olsr_tc_edge_to_string(tc_edge)); #endif *************** *** 322,335 **** tc_neighbor = olsr_lookup_tc_entry(&tc_edge->T_dest_addr); if (tc_neighbor) { ! #if 0 OLSR_PRINTF(1, "TC: found neighbor tc_entry %s\n", ! olsr_ip_to_string(&tc_neighbor->addr)); #endif tc_edge_inv = olsr_lookup_tc_edge(tc_neighbor, &tc->addr); if (tc_edge_inv) { ! #if 0 OLSR_PRINTF(1, "TC: found inverse edge for %s\n", ! olsr_ip_to_string(&tc_edge_inv->T_dest_addr)); #endif --- 354,367 ---- tc_neighbor = olsr_lookup_tc_entry(&tc_edge->T_dest_addr); if (tc_neighbor) { ! #ifdef DEBUG OLSR_PRINTF(1, "TC: found neighbor tc_entry %s\n", ! olsr_ip_to_string(&buf, &tc_neighbor->addr)); #endif tc_edge_inv = olsr_lookup_tc_edge(tc_neighbor, &tc->addr); if (tc_edge_inv) { ! #ifdef DEBUG OLSR_PRINTF(1, "TC: found inverse edge for %s\n", ! olsr_ip_to_string(&buf, &tc_edge_inv->T_dest_addr)); #endif *************** *** 364,368 **** struct tc_edge_entry *tc_edge_inv; ! #if 0 OLSR_PRINTF(1, "TC: del edge entry %s\n", olsr_tc_edge_to_string(tc_edge)); #endif --- 396,400 ---- struct tc_edge_entry *tc_edge_inv; ! #ifdef DEBUG OLSR_PRINTF(1, "TC: del edge entry %s\n", olsr_tc_edge_to_string(tc_edge)); #endif *************** *** 380,386 **** /* ! * Delete the tc_entry if the last edge is gone. */ ! if (!tc_edge->tc->edge_tree.count) { /* --- 412,419 ---- /* ! * Delete the tc_entry if the last edge and last prefix is gone. */ ! if (!tc_edge->tc->edge_tree.count && ! !tc_edge->tc->prefix_tree.count) { /* *************** *** 546,550 **** olsr_calc_tc_edge_entry_etx(tc_edge); ! #if 0 if (edge_change) { OLSR_PRINTF(1, "TC: chg edge entry %s\n", --- 579,583 ---- olsr_calc_tc_edge_entry_etx(tc_edge); ! #if DEBUG if (edge_change) { OLSR_PRINTF(1, "TC: chg edge entry %s\n", Index: hna_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hna_set.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** hna_set.c 2 Dec 2007 19:00:27 -0000 1.29 --- hna_set.c 12 Dec 2007 21:57:27 -0000 1.30 *************** *** 45,48 **** --- 45,49 ---- #include "scheduler.h" #include "net_olsr.h" + #include "tc_set.h" *************** *** 107,113 **** struct hna_entry *tmp_hna; olsr_u32_t hash = olsr_hashing(gw); - - //OLSR_PRINTF(5, "TC: lookup entry\n"); /* Check for registered entry */ for(tmp_hna = hna_set[hash].next; --- 108,116 ---- struct hna_entry *tmp_hna; olsr_u32_t hash = olsr_hashing(gw); + #if 0 + OLSR_PRINTF(5, "HNA: lookup entry\n"); + #endif + /* Check for registered entry */ for(tmp_hna = hna_set[hash].next; *************** *** 178,183 **** /* Fill struct */ new_net->A_network_addr = *net; - //memcpy(&new_net->A_netmask, mask, netmask_size); new_net->prefixlen = prefixlen; --- 181,186 ---- /* Fill struct */ + memset(new_net, 0, sizeof(struct hna_net)); new_net->A_network_addr = *net; new_net->prefixlen = prefixlen; *************** *** 188,191 **** --- 191,202 ---- new_net->prev = &hna_gw->networks; + /* + * Add the rt_path for the entry. + */ + olsr_insert_routing_table(&new_net->A_network_addr, + new_net->prefixlen, + &hna_gw->A_gateway_addr, + OLSR_RT_ORIGIN_HNA); + return new_net; } *************** *** 260,263 **** --- 271,281 ---- tmp_net = tmp_net->next; DEQUEUE_ELEM(net_to_delete); + + /* + * Delete the rt_path for the entry. + */ + olsr_delete_routing_table(&net_to_delete->A_network_addr, + net_to_delete->prefixlen, + &tmp_hna->A_gateway_addr); free(net_to_delete); changes_hna = OLSR_TRUE; Index: olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** olsr.c 2 Dec 2007 19:00:27 -0000 1.65 --- olsr.c 12 Dec 2007 21:57:27 -0000 1.66 *************** *** 161,189 **** } ! if (changes_neighborhood) ! { ! /* Calculate new mprs, HNA and routing table */ ! if (olsr_cnf->lq_level < 1) ! { ! olsr_calculate_mpr(); ! } ! ! else ! { ! olsr_calculate_lq_mpr(); ! } ! ! olsr_calculate_routing_table(); ! olsr_calculate_hna_routes(); ! } ! ! else if (changes_topology || changes_hna) ! { ! /* calculate the routing table and HNA */ ! ! olsr_calculate_routing_table(); ! olsr_calculate_hna_routes(); } if (olsr_cnf->debug_level > 0) --- 161,176 ---- } ! if (changes_neighborhood) { ! if (olsr_cnf->lq_level < 1) { ! olsr_calculate_mpr(); ! } else { ! olsr_calculate_lq_mpr(); } + } + /* calculate the routing table */ + if (changes_neighborhood || changes_topology || changes_hna) { + olsr_calculate_routing_table(); + } if (olsr_cnf->debug_level > 0) *************** *** 202,210 **** } } ! olsr_print_link_set(); olsr_print_neighbor_table(); olsr_print_two_hop_neighbor_table(); olsr_print_tc_table(); } --- 189,199 ---- } } ! ! #if 1 olsr_print_link_set(); olsr_print_neighbor_table(); olsr_print_two_hop_neighbor_table(); olsr_print_tc_table(); + #endif } *************** *** 609,610 **** --- 598,605 ---- return 0; } + + /* + * Local Variables: + * c-basic-offset: 2 + * End: + */ Index: routing_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** routing_table.c 29 Nov 2007 22:59:51 -0000 1.38 --- routing_table.c 12 Dec 2007 21:57:27 -0000 1.39 *************** *** 56,60 **** --- 56,66 ---- #include + /* Root of our RIB */ struct avl_tree routingtree; + + /* + * Keep a version number for detecting outdated elements + * in the per rt_entry rt_path subtree. + */ unsigned int routingtree_version; *************** *** 123,131 **** avl_comp_ipv6_prefix (const void *prefix1, const void *prefix2) { const struct olsr_ip_prefix *pfx1 = prefix1; const struct olsr_ip_prefix *pfx2 = prefix2; /* prefix */ ! int res = ip6cmp(&pfx1->prefix.v6, &pfx2->prefix.v6); if (res != 0) { return res; --- 129,138 ---- avl_comp_ipv6_prefix (const void *prefix1, const void *prefix2) { + int res; const struct olsr_ip_prefix *pfx1 = prefix1; const struct olsr_ip_prefix *pfx2 = prefix2; /* prefix */ ! res = memcmp(&pfx1->prefix.v6, &pfx2->prefix.v6, 16); if (res != 0) { return res; *************** *** 176,186 **** /** ! * Update the fields in an routing entry. ! * Depending on the update mask update either the old, ! * the new or both arrays for gateway/interface/etx/hopcount. */ ! static void ! olsr_update_routing_entry(struct rt_path *rtp, union olsr_ip_addr *gateway, ! int iif_index, int metric, float etx) { --- 183,191 ---- /** ! * Update gateway/interface/etx/hopcount and the version for a route path. */ ! void ! olsr_update_rt_path(struct rt_path *rtp, struct tc_entry *tc, ! struct link_entry *link) { *************** *** 188,205 **** /* gateway */ ! rtp->rtp_nexthop.gateway = *gateway; /* interface */ ! rtp->rtp_nexthop.iif_index = iif_index; ! /* etx */ ! rtp->rtp_metric.hops = metric; ! if (etx < 0.0) { ! /* non-LQ case */ ! rtp->rtp_metric.etx = (float)metric; ! } else { ! /* LQ case */ ! rtp->rtp_metric.etx = etx; ! } } --- 193,204 ---- /* gateway */ ! rtp->rtp_nexthop.gateway = link->neighbor_iface_addr; /* interface */ ! rtp->rtp_nexthop.iif_index = link->inter->if_index; ! /* metric/etx */ ! rtp->rtp_metric.hops = tc->hops; ! rtp->rtp_metric.etx = tc->path_etx; } *************** *** 233,243 **** } - /** * Alloc and key a new rt_path. */ static struct rt_path * ! olsr_alloc_rt_path(struct rt_entry *rt, ! union olsr_ip_addr *originator) { struct rt_path *rtp = olsr_malloc(sizeof(struct rt_path), __FUNCTION__); --- 232,241 ---- } /** * Alloc and key a new rt_path. */ static struct rt_path * ! olsr_alloc_rt_path(struct tc_entry *tc, ! struct olsr_ip_prefix *prefix, olsr_u8_t origin) { struct rt_path *rtp = olsr_malloc(sizeof(struct rt_path), __FUNCTION__); *************** *** 249,263 **** memset(rtp, 0, sizeof(*rtp)); ! rtp->rtp_originator = *originator; /* set key and backpointer prior to tree insertion */ ! rtp->rtp_tree_node.key = &rtp->rtp_originator; ! rtp->rtp_tree_node.data = rtp; ! /* insert to the route entry originator tree */ ! avl_insert(&rt->rt_path_tree, &rtp->rtp_tree_node, AVL_DUP_NO); ! /* backlink to the owning route entry */ ! rtp->rtp_rt = rt; return rtp; --- 247,264 ---- memset(rtp, 0, sizeof(*rtp)); ! rtp->rtp_dst = *prefix; /* set key and backpointer prior to tree insertion */ ! rtp->rtp_prefix_tree_node.key = &rtp->rtp_dst; ! rtp->rtp_prefix_tree_node.data = rtp; ! /* insert to the tc prefix tree */ ! avl_insert(&tc->prefix_tree, &rtp->rtp_prefix_tree_node, AVL_DUP_NO); ! /* backlink to the owning tc entry */ ! rtp->rtp_tc = tc; ! ! /* store the origin of the route */ ! rtp->rtp_origin = origin; return rtp; *************** *** 265,268 **** --- 266,353 ---- /** + * Create a route entry for a given rt_path and + * insert it into the global RIB tree. + */ + void + olsr_insert_rt_path(struct rt_path *rtp, struct tc_entry *tc, + struct link_entry *link) + { + struct rt_entry *rt; + struct avl_node *node; + + /* + * no unreachable routes please. + */ + if (tc->path_etx >= INFINITE_ETX) { + return; + } + + /* + * No bogus prefix lengths. + */ + if (rtp->rtp_dst.prefix_len > olsr_cnf->maxplen) { + return; + } + + /* + * first check if there is a route_entry for the prefix. + */ + node = avl_find(&routingtree, &rtp->rtp_dst); + + if (!node) { + + /* no route entry yet */ + rt = olsr_alloc_rt_entry(&rtp->rtp_dst); + + if (!rt) { + return; + } + + /* Now insert the rt_path to the owning rt_entry tree */ + + rtp->rtp_originator = tc->addr; + + /* set key and backpointer prior to tree insertion */ + rtp->rtp_tree_node.key = &rtp->rtp_originator; + rtp->rtp_tree_node.data = rtp; + + /* insert to the route entry originator tree */ + avl_insert(&rt->rt_path_tree, &rtp->rtp_tree_node, AVL_DUP_NO); + + /* backlink to the owning route entry */ + rtp->rtp_rt = rt; + + } else { + rt = node->data; + } + + /* update the version field and relevant parameters */ + olsr_update_rt_path(rtp, tc, link); + } + + /** + * Unlink and free a rt_path. + */ + static void + olsr_free_rt_path(struct rt_path *rtp) + { + + /* remove from the originator tree */ + if (rtp->rtp_rt) { + avl_delete(&rtp->rtp_rt->rt_path_tree, &rtp->rtp_tree_node); + rtp->rtp_rt = NULL; + } + + /* remove from the tc prefix tree */ + if (rtp->rtp_tc) { + avl_delete(&rtp->rtp_tc->prefix_tree, &rtp->rtp_prefix_tree_node); + rtp->rtp_tc = NULL; + } + + free(rtp); + } + + + /** * Check if there is an interface or gateway change. */ *************** *** 278,281 **** --- 363,391 ---- /** + * Check if there is a hopcount change. + */ + olsr_bool + olsr_hopcount_change(const struct rt_metric *met1, const struct rt_metric *met2) + { + return (met1->hops != met2->hops); + } + + /** + * Depending if flat_metric is configured and the kernel fib operation + * return the hopcount metric of a route. + * For adds this is the metric of best rour after olsr_rt_best() election, + * for deletes this is the metric of the route that got stored in the rt_entry, + * during route installation. + */ + olsr_u8_t + olsr_fib_metric(const struct rt_metric *met) + { + if (!olsr_cnf->flat_fib_metric) { + return met->hops; + } + return RT_METRIC_DEFAULT; + } + + /** * depending on the operation (add/chg/del) the nexthop * field from the route entry or best route path shall be used. *************** *** 352,356 **** /* walk all remaining originator entries */ ! while ((node = avl_walk_next(node)) != NULL) { struct rt_path *rtp = node->data; --- 462,466 ---- /* walk all remaining originator entries */ ! while ((node = avl_walk_next(node))) { struct rt_path *rtp = node->data; *************** *** 362,394 **** /** ! * Insert/Update a route entry into the routing table. ! * ! * Check is the route exisits and depending if this is a ! * new version of the RIB do a full inplace update. ! * If there is already a route from this table version then ! * check if the new route is better. * ! * For exisiting routes only interface or gateway router changes ! * do trigger a kernel change. * *@param dst the destination *@param plen the prefix length ! *@param gateway the next-hop router ! *@param iface the next-hop interface ! *@param metric the hopcount ! *@param etx the LQ extension metric * ! *@return the new rt_entry struct */ struct rt_path * ! olsr_insert_routing_table(union olsr_ip_addr *dst, ! int plen, ! union olsr_ip_addr *originator, ! union olsr_ip_addr *gateway, ! int iif_index, ! int metric, ! float etx) { ! struct rt_entry *rt; struct rt_path *rtp; struct avl_node *node; --- 472,496 ---- /** ! * Insert a prefix into the prefix tree hanging off a lsdb (tc) entry. * ! * Check if the candidate route (we call this a rt_path) is known, ! * if not create it. ! * Upon post-SPF processing (if the node is reachable) the prefix ! * will be finally inserted into the global RIB. * *@param dst the destination *@param plen the prefix length ! *@param originator the originating router * ! *@return the new rt_path struct */ struct rt_path * ! olsr_insert_routing_table(union olsr_ip_addr *dst, int plen, ! union olsr_ip_addr *originator, int origin) { ! #if !defined(NODEBUG) && defined(DEBUG) ! struct ipaddr_str buf; ! #endif ! struct tc_entry *tc; struct rt_path *rtp; struct avl_node *node; *************** *** 396,455 **** /* ! * no unreachable routes please. */ ! if (etx >= INFINITE_ETX) { return NULL; } /* ! * No bogus prefix lengths. */ ! if (plen > olsr_cnf->maxplen) { ! return NULL; ! } /* ! * first check if there is a route_entry for the prefix. */ prefix.prefix = *dst; prefix.prefix_len = plen; ! node = avl_find(&routingtree, &prefix); if (!node) { ! /* no route entry yet */ ! rt = olsr_alloc_rt_entry(&prefix); ! if (!rt) { return NULL; } } else { ! rt = node->data; } /* ! * next check if the route path from this originator is known */ ! node = avl_find(&rt->rt_path_tree, originator); ! if (!node) { ! /* no route path from this originator yet */ ! rtp = olsr_alloc_rt_path(rt, originator); ! if (!rtp) { ! return NULL; ! } ! } else { ! rtp = node->data; ! } ! /* update the version field and relevant parameters */ ! olsr_update_routing_entry(rtp, gateway, iif_index, metric, etx); ! return rtp; } --- 498,595 ---- /* ! * No bogus prefix lengths. */ ! if (plen > olsr_cnf->maxplen) { return NULL; } + OLSR_PRINTF(1, "RIB: add prefix %s/%u from %s\n", + olsr_ip_to_string(&buf, dst), plen, + olsr_ip_to_string(&buf, originator)); + /* ! * For internal routes the tc_entry must already exist. ! * For all other routes we may create it as an edgeless ! * hookup point. If so he tc_entry has no edges it will not ! * be explored during SPF run. */ ! tc = olsr_locate_tc_entry(originator); /* ! * first check if there is a rt_path for the prefix. */ prefix.prefix = *dst; prefix.prefix_len = plen; ! node = avl_find(&tc->prefix_tree, &prefix); if (!node) { ! /* no rt_path for this prefix yet */ ! rtp = olsr_alloc_rt_path(tc, &prefix, origin); ! if (!rtp) { return NULL; } + /* overload the hna change bit for flagging a prefix change */ + changes_hna = OLSR_TRUE; + } else { ! rtp = node->data; } + return rtp; + } + + /** + * Delete a prefix from the prefix tree hanging off a lsdb (tc) entry. + */ + void + olsr_delete_routing_table(union olsr_ip_addr *dst, int plen, + union olsr_ip_addr *originator) + { + #if !defined(NODEBUG) && defined(DEBUG) + struct ipaddr_str buf; + #endif + + struct tc_entry *tc; + struct rt_path *rtp; + struct avl_node *node; + struct olsr_ip_prefix prefix; + /* ! * No bogus prefix lengths. */ ! if (plen > olsr_cnf->maxplen) { ! return; ! } ! #ifdef DEBUG ! OLSR_PRINTF(1, "RIB: del prefix %s/%u from %s\n", ! olsr_ip_to_string(&buf, dst), plen, ! olsr_ip_to_string(&buf, originator)); ! #endif ! tc = olsr_lookup_tc_entry(originator); ! if (!tc) { ! return; ! } ! /* ! * Grab the rt_path for the prefix. ! */ ! prefix.prefix = *dst; ! prefix.prefix_len = plen; ! node = avl_find(&tc->prefix_tree, &prefix); ! if (node) { ! rtp = node->data; ! olsr_free_rt_path(rtp); ! /* overload the hna change bit for flagging a prefix change */ ! changes_hna = OLSR_TRUE; ! } } *************** *** 497,540 **** /** - *Calculate the HNA routes - * - */ - void - olsr_calculate_hna_routes(void) - { - int idx; - - #ifdef DEBUG - OLSR_PRINTF(3, "Calculating HNA routes\n"); - #endif - - for (idx = 0; idx < HASHSIZE; idx++) { - struct hna_entry *tmp_hna; - /* All entries */ - for (tmp_hna = hna_set[idx].next; tmp_hna != &hna_set[idx]; tmp_hna = tmp_hna->next) { - struct hna_net *tmp_net; - /* All networks */ - for (tmp_net = tmp_hna->networks.next; tmp_net != &tmp_hna->networks; tmp_net = tmp_net->next) { - /* If no route to gateway - skip */ - struct rt_entry *rt = olsr_lookup_routing_table(&tmp_hna->A_gateway_addr); - if (rt != NULL) { - /* update if better */ - olsr_insert_routing_table(&tmp_net->A_network_addr, - tmp_net->prefixlen, - &tmp_hna->A_gateway_addr, - &rt->rt_best->rtp_nexthop.gateway, - rt->rt_best->rtp_nexthop.iif_index, - rt->rt_best->rtp_metric.hops, - rt->rt_best->rtp_metric.etx); - } - } - } - } - - /* Update kernel */ - olsr_update_kernel_routes(); - } - - /** * Print the routingtree to STDOUT * --- 637,640 ---- Index: process_routes.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** process_routes.h 2 Dec 2007 19:00:28 -0000 1.15 --- process_routes.h 12 Dec 2007 21:57:27 -0000 1.16 *************** *** 53,67 **** extern export_route_function olsr_delroute6_function; ! void ! olsr_init_export_route(void); ! ! void ! olsr_update_kernel_routes(void); ! ! void ! olsr_delete_all_kernel_routes(void); ! ! olsr_u8_t ! olsr_rt_flags(const struct rt_entry *); #endif --- 53,61 ---- extern export_route_function olsr_delroute6_function; ! void olsr_init_export_route(void); ! void olsr_update_rib_routes(void); ! void olsr_update_kernel_routes(void); ! void olsr_delete_all_kernel_routes(void); ! olsr_u8_t olsr_rt_flags(const struct rt_entry *); #endif Index: link_set.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** link_set.h 25 Nov 2007 22:08:57 -0000 1.36 --- link_set.h 12 Dec 2007 21:57:27 -0000 1.37 *************** *** 56,63 **** --- 56,65 ---- union olsr_ip_addr local_iface_addr; union olsr_ip_addr neighbor_iface_addr; + const struct interface *inter; char *if_name; clock_t SYM_time; clock_t ASYM_time; clock_t time; + unsigned int vtime; struct neighbor_entry *neighbor; olsr_u8_t prev_status; *************** *** 155,156 **** --- 157,164 ---- #endif + + /* + * Local Variables: + * c-basic-offset: 2 + * End: + */ Index: process_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** process_routes.c 2 Dec 2007 19:00:28 -0000 1.42 --- process_routes.c 12 Dec 2007 21:57:27 -0000 1.43 *************** *** 51,54 **** --- 51,55 ---- #include "lq_avl.h" #include "net_olsr.h" + #include "tc_set.h" #ifdef WIN32 *************** *** 112,117 **** * * This is extremely simple - Just increment the version of the ! * tree and then olsr_update_kernel_routes() will see ! * all routes in the tree as outdated and flush it. * *@return 1 --- 113,118 ---- * * This is extremely simple - Just increment the version of the ! * tree and then olsr_update_rib_routes() will see all routes in the tree ! * as outdated and olsr_update_kernel_routes() will finally flush it. * *@return 1 *************** *** 123,126 **** --- 124,128 ---- olsr_bump_routingtree_version(); + olsr_update_rib_routes(); olsr_update_kernel_routes(); } *************** *** 199,204 **** /* route addition has suceeded */ ! /* save the nexthop in the route entry */ rt->rt_nexthop = rt->rt_best->rtp_nexthop; } } --- 201,207 ---- /* route addition has suceeded */ ! /* save the nexthop and metric in the route entry */ rt->rt_nexthop = rt->rt_best->rtp_nexthop; + rt->rt_metric = rt->rt_best->rtp_metric; } } *************** *** 283,287 **** /** * Check the version number of all route paths hanging off a route entry. ! * If a route does not match the current routing tree number, delete it. * Reset the best route pointer. */ --- 286,291 ---- /** * Check the version number of all route paths hanging off a route entry. ! * If a route does not match the current routing tree number, remove it ! * from the global originator tree for that rt_entry. * Reset the best route pointer. */ *************** *** 311,315 **** /* remove from the originator tree */ avl_delete(&rt->rt_path_tree, rtp_tree_node); ! free(rtp); } } --- 315,319 ---- /* remove from the originator tree */ avl_delete(&rt->rt_path_tree, rtp_tree_node); ! rtp->rtp_rt = NULL; } } *************** *** 323,330 **** * best path selection on the remaining set. * Finally compare the nexthop of the route head and the best ! * path and enqueue a add/chg operation. */ void ! olsr_update_kernel_routes(void) { struct rt_entry *rt; --- 327,334 ---- * best path selection on the remaining set. * Finally compare the nexthop of the route head and the best ! * path and enqueue an add/chg operation. */ void ! olsr_update_rib_routes(void) { struct rt_entry *rt; *************** *** 351,356 **** olsr_rt_best(rt); ! /* nexthop change ? */ ! if (olsr_nh_change(&rt->rt_best->rtp_nexthop, &rt->rt_nexthop)) { if (0 > rt->rt_nexthop.iif_index) { --- 355,362 ---- olsr_rt_best(rt); ! /* nexthop or hopcount change ? */ ! if (olsr_nh_change(&rt->rt_best->rtp_nexthop, &rt->rt_nexthop) || ! (!olsr_cnf->flat_fib_metric && ! olsr_hopcount_change(&rt->rt_best->rtp_metric, &rt->rt_metric))) { if (0 > rt->rt_nexthop.iif_index) { *************** *** 365,368 **** --- 371,382 ---- } } OLSR_FOR_ALL_RT_ENTRIES_END(rt); + } + + /** + * Propagate the accumulated changes from the last rib update to the kernel. + */ + void + olsr_update_kernel_routes(void) + { /* delete unreachable routes */ Index: routing_table.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** routing_table.h 11 Nov 2007 23:10:24 -0000 1.25 --- routing_table.h 12 Dec 2007 21:57:27 -0000 1.26 *************** *** 46,49 **** --- 46,50 ---- #include #include "hna_set.h" + #include "link_set.h" #include "lq_avl.h" #include "lq_list.h" *************** *** 85,88 **** --- 86,90 ---- struct rt_path *rt_best; /* shortcut to the best path */ struct rt_nexthop rt_nexthop; /* nexthop of FIB route */ + struct rt_metric rt_metric; /* metric of FIB route */ struct avl_tree rt_path_tree; struct list_node rt_change_node; /* queue for kernel FIB add/chg/del */ *************** *** 93,108 **** * Depending on the results of the SPF calculation we perform a * best_path calculation and pick the one with the lowest etx/metric. */ struct rt_path { struct rt_entry *rtp_rt; /* backpointer to owning route head */ struct rt_nexthop rtp_nexthop; struct rt_metric rtp_metric; union olsr_ip_addr rtp_originator; /* originator of the route */ ! struct avl_node rtp_tree_node; ! olsr_u32_t rtp_version; }; /* * macro for traversing the entire routing table. * it is recommended to use this because it hides all the internal --- 95,134 ---- * Depending on the results of the SPF calculation we perform a * best_path calculation and pick the one with the lowest etx/metric. + * The rt_path gets first inserted into the per tc_entry prefix tree. + * If during the SPF calculation the tc_entry becomes reachable via + * a local nexthop it is inserted into the global RIB tree. */ struct rt_path { struct rt_entry *rtp_rt; /* backpointer to owning route head */ + struct tc_entry *rtp_tc; /* backpointer to owning tc entry */ struct rt_nexthop rtp_nexthop; struct rt_metric rtp_metric; + struct avl_node rtp_tree_node; /* global rtp node */ union olsr_ip_addr rtp_originator; /* originator of the route */ ! struct avl_node rtp_prefix_tree_node; /* tc entry rtp node */ ! struct olsr_ip_prefix rtp_dst; /* the prefix */ ! olsr_u32_t rtp_version; /* for detection of outdated rt_paths */ ! olsr_u8_t rtp_origin; /* internal, MID or HNA */ ! }; ! ! /* ! * In olsrd we have three different route types. ! * Internal routes are generated by simple reachability ! * of a node (by means of a tc message reception). ! * MID routes result from MID messages and HNA routes ! * from a gw routers HNA anncouncements. ! */ ! enum olsr_rt_origin { ! OLSR_RT_ORIGIN_MIN, ! OLSR_RT_ORIGIN_INT, ! OLSR_RT_ORIGIN_MID, ! OLSR_RT_ORIGIN_HNA, ! OLSR_RT_ORIGIN_MAX }; /* + * OLSR_FOR_ALL_RT_ENTRIES + * * macro for traversing the entire routing table. * it is recommended to use this because it hides all the internal *************** *** 121,124 **** --- 147,174 ---- #define OLSR_FOR_ALL_RT_ENTRIES_END(rt) }} + /* + * OLSR_FOR_ALL_HNA_RT_ENTRIES + * + * macro for traversing the entire routing table and pick only + * HNA routes. This is not optimal - however, If the RIBs become + * too big one day then we keep an additional per origin tree + * in order to speed up traversal. + * In the meantime it is recommended to use this macro because + * it hides all the internal datastructure from the callers + * and the core maintainers do not have to update all the plugins + * once we decide to change the datastructures. + */ + #define OLSR_FOR_ALL_HNA_RT_ENTRIES(rt) \ + { \ + struct avl_node *rt_tree_node, *next_rt_tree_node; \ + for (rt_tree_node = avl_walk_first(&routingtree); \ + rt_tree_node; rt_tree_node = next_rt_tree_node) { \ + next_rt_tree_node = avl_walk_next(rt_tree_node); \ + rt = rt_tree_node->data; \ + if (rt->rt_best->rtp_origin != OLSR_RT_ORIGIN_HNA) \ + continue; + #define OLSR_FOR_ALL_HNA_RT_ENTRIES_END(rt) }} + + /** * IPv4 <-> IPv6 wrapper *************** *** 155,161 **** void olsr_rt_best(struct rt_entry *); olsr_bool olsr_nh_change(const struct rt_nexthop *, const struct rt_nexthop *); olsr_bool olsr_cmp_rt(const struct rt_entry *, const struct rt_entry *); - void olsr_calculate_hna_routes(void); char *olsr_rt_to_string(const struct rt_entry *); char *olsr_rtp_to_string(const struct rt_path *); --- 205,212 ---- void olsr_rt_best(struct rt_entry *); olsr_bool olsr_nh_change(const struct rt_nexthop *, const struct rt_nexthop *); + olsr_bool olsr_hopcount_change(const struct rt_metric *, const struct rt_metric *); olsr_bool olsr_cmp_rt(const struct rt_entry *, const struct rt_entry *); + olsr_u8_t olsr_fib_metric(const struct rt_metric *); char *olsr_rt_to_string(const struct rt_entry *); char *olsr_rtp_to_string(const struct rt_path *); *************** *** 164,172 **** const struct rt_nexthop * olsr_get_nh(const struct rt_entry *); ! struct rt_path * ! olsr_insert_routing_table(union olsr_ip_addr *, int, ! union olsr_ip_addr *, ! union olsr_ip_addr *, ! int, int, float); struct rt_entry * --- 215,223 ---- const struct rt_nexthop * olsr_get_nh(const struct rt_entry *); ! /* rt_path manipulation */ ! struct rt_path *olsr_insert_routing_table(union olsr_ip_addr *, int, union olsr_ip_addr *, int); ! void olsr_delete_routing_table(union olsr_ip_addr *, int, union olsr_ip_addr *); ! void olsr_insert_rt_path(struct rt_path *, struct tc_entry *, struct link_entry *); ! void olsr_update_rt_path(struct rt_path *, struct tc_entry *, struct link_entry *); struct rt_entry * From (spam-protected) Wed Dec 12 23:39:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:39:38 +0000 Subject: [Olsr-cvs] olsrd-current/src olsr_cfg.h,1.43,1.44 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv658/src Modified Files: olsr_cfg.h Log Message: added configuration file support for "flat fib metrics". Index: olsr_cfg.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_cfg.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** olsr_cfg.h 12 Dec 2007 21:57:27 -0000 1.43 --- olsr_cfg.h 12 Dec 2007 22:39:36 -0000 1.44 *************** *** 96,99 **** --- 96,103 ---- #define MIN_LQ_WSIZE 3 + /* Option values */ + #define CFG_FIBM_FLAT "flat" + #define CFG_FIBM_CORRECT "correct" + #ifndef IPV6_ADDR_SITELOCAL #define IPV6_ADDR_SITELOCAL 0x0040U From (spam-protected) Wed Dec 12 23:39:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:39:38 +0000 Subject: [Olsr-cvs] olsrd-current CHANGELOG,1.123,1.124 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv658 Modified Files: CHANGELOG Log Message: added configuration file support for "flat fib metrics". Index: CHANGELOG =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/CHANGELOG,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -d -r1.123 -r1.124 *** CHANGELOG 12 Dec 2007 21:57:56 -0000 1.123 --- CHANGELOG 12 Dec 2007 22:39:36 -0000 1.124 *************** *** 163,166 **** --- 163,167 ---- costs a fork(2) and an exec(3)) but also with shell code which doesn't use any external program. + - added configuration file support for "flat fib metrics". 0.5.4 --------------------------------------------------------------------- From (spam-protected) Wed Dec 12 23:39:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:39:38 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser oscan.lex, 1.28, 1.29 oparse.y, 1.42, 1.43 cfgfile_gen.c, 1.15, 1.16 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv658/src/cfgparser Modified Files: oscan.lex oparse.y cfgfile_gen.c Log Message: added configuration file support for "flat fib metrics". Index: oparse.y =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oparse.y,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** oparse.y 12 Dec 2007 21:50:40 -0000 1.42 --- oparse.y 12 Dec 2007 22:39:36 -0000 1.43 *************** *** 177,180 **** --- 177,181 ---- %token TOK_WILLINGNESS %token TOK_IPCCON + %token TOK_FIBMETRIC %token TOK_USEHYST %token TOK_HYSTSCALE *************** *** 227,230 **** --- 228,232 ---- stmt: idebug | iipversion + | fibmetric | bnoint | atos *************** *** 716,719 **** --- 718,738 ---- ; + fibmetric: TOK_FIBMETRIC TOK_STRING + { + PARSER_DEBUG_PRINTF("FIBMetric: %d\n", $2->string); + if (strcmp($2->string, CFG_FIBM_FLAT) == 0) { + olsr_cnf->flat_fib_metric = OLSR_TRUE; + } else if (strcmp($2->string, CFG_FIBM_CORRECT) == 0) { + olsr_cnf->flat_fib_metric = OLSR_FALSE; + } else { + fprintf(stderr, "FIBMetric must be \"%s\" or \"%s\"!\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT); + YYABORT; + } + free($1); + free($2->string); + free($2); + } + ; + ihna4entry: TOK_IP4_ADDR TOK_IP4_ADDR { Index: oscan.lex =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oscan.lex,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** oscan.lex 29 Nov 2007 00:49:40 -0000 1.28 --- oscan.lex 12 Dec 2007 22:39:36 -0000 1.29 *************** *** 324,327 **** --- 324,332 ---- } + "FIBMetric" { + yylval = NULL; + return TOK_FIBMETRIC; + } + "UseHysteresis" { yylval = NULL; Index: cfgfile_gen.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** cfgfile_gen.c 12 Dec 2007 22:05:53 -0000 1.15 --- cfgfile_gen.c 12 Dec 2007 22:39:36 -0000 1.16 *************** *** 84,87 **** --- 84,90 ---- fprintf(fd, "# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); + /* IP version */ + fprintf(fd, "# FIBMetric (\"%s\" or \"%s\")\n\nFIBMetric\t\"%s\"\n\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT, cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); + /* HNA IPv4/IPv6 */ fprintf(fd, "# HNA IPv%1$d routes\n# syntax: netaddr netmask\n\nHna1$d {\n", cnf->ip_version == AF_INET ? 4 : 6); *************** *** 192,196 **** while(pp) { ! fprintf(fd, " PlParam \"%s\" \"%s\"\n", pp->key, pp->value); pp = pp->next; } --- 195,199 ---- while(pp) { ! fprintf(fd, " PlParam \"%s\"\t\"%s\"\n", pp->key, pp->value); pp = pp->next; } *************** *** 367,370 **** --- 370,376 ---- WRITE_TO_BUF("# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); + /* IP version */ + WRITE_TO_BUF("# FIBMetric (\"%s\" or \"%s\")\n\nFIBMetric\t\"%s\"\n\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT, cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); + /* HNA IPv4/IPv6 */ WRITE_TO_BUF("# HNA IPv%1$d routes\n# syntax: netaddr netmask\n\nHna%1$d {\n", cnf->ip_version == AF_INET ? 4 : 6); *************** *** 470,474 **** while(pp) { ! WRITE_TO_BUF(" PlParam \"%s\" \"%s\"\n", pp->key, pp->value); pp = pp->next; } --- 476,480 ---- while(pp) { ! WRITE_TO_BUF(" PlParam \"%s\"\t\"%s\"\n", pp->key, pp->value); pp = pp->next; } From (spam-protected) Wed Dec 12 23:39:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:39:38 +0000 Subject: [Olsr-cvs] olsrd-current/files olsrd.conf.default.rfc, 1.5, 1.6 olsrd.conf.default.lq-fisheye, 1.7, 1.8 olsrd.conf.default.lq, 1.4, 1.5 Message-ID: Update of /cvsroot/olsrd/olsrd-current/files In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv658/files Modified Files: olsrd.conf.default.rfc olsrd.conf.default.lq-fisheye olsrd.conf.default.lq Log Message: added configuration file support for "flat fib metrics". Index: olsrd.conf.default.rfc =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/files/olsrd.conf.default.rfc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** olsrd.conf.default.rfc 6 Sep 2007 11:43:42 -0000 1.5 --- olsrd.conf.default.rfc 12 Dec 2007 22:39:36 -0000 1.6 *************** *** 16,19 **** --- 16,23 ---- IpVersion 4 + # FIBMetric ("flat" or "correct") + + FIBMetric "flat" + # Clear the screen each time the internal state changes Index: olsrd.conf.default.lq-fisheye =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/files/olsrd.conf.default.lq-fisheye,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** olsrd.conf.default.lq-fisheye 11 Nov 2007 21:32:03 -0000 1.7 --- olsrd.conf.default.lq-fisheye 12 Dec 2007 22:39:36 -0000 1.8 *************** *** 17,20 **** --- 17,27 ---- DebugLevel 0 + # IP version to use (4 or 6) + + IpVersion 4 + + # FIBMetric ("flat" or "correct") + + FIBMetric "flat" # Interfaces and their rules *************** *** 129,136 **** LinkQualityDijkstraLimit 3 3.0 - # IP version to use (4 or 6) - - IpVersion 4 - # Clear the screen each time the internal state changes --- 136,139 ---- Index: olsrd.conf.default.lq =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/files/olsrd.conf.default.lq,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** olsrd.conf.default.lq 6 Sep 2007 11:43:42 -0000 1.4 --- olsrd.conf.default.lq 12 Dec 2007 22:39:36 -0000 1.5 *************** *** 21,24 **** --- 21,28 ---- IpVersion 4 + # FIBMetric ("flat" or "correct") + + FIBMetric "flat" + # Clear the screen each time the internal state changes From (spam-protected) Wed Dec 12 23:39:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:39:38 +0000 Subject: [Olsr-cvs] olsrd-current/lib/httpinfo/src olsrd_httpinfo.c, 1.90, 1.91 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv658/lib/httpinfo/src Modified Files: olsrd_httpinfo.c Log Message: added configuration file support for "flat fib metrics". Index: olsrd_httpinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** olsrd_httpinfo.c 12 Dec 2007 22:06:24 -0000 1.90 --- olsrd_httpinfo.c 12 Dec 2007 22:39:36 -0000 1.91 *************** *** 4,32 **** * All rights reserved. * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions * are met: * ! * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * --- 4,32 ---- * All rights reserved. * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions * are met: * ! * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *************** *** 131,135 **** "text-align: left;\n\nwidth: 100px;\npadding: 0px;\ncolor: #000000;\n" "text-decoration: none;\nfont-family: verdana;\nfont-size: 12px;\n" ! "border: 1px solid #ccc;\n}\n" ".input_button\n{\nbackground: #B5D1EE;\nmargin-left: 5px;\nmargin-top: 0px;\n" "text-align: center;\nwidth: 120px;\npadding: 0px;\ncolor: #000000;\n" --- 131,135 ---- "text-align: left;\n\nwidth: 100px;\npadding: 0px;\ncolor: #000000;\n" "text-decoration: none;\nfont-family: verdana;\nfont-size: 12px;\n" ! "border: 1px solid #ccc;\n}\n" ".input_button\n{\nbackground: #B5D1EE;\nmargin-left: 5px;\nmargin-top: 0px;\n" "text-align: center;\nwidth: 120px;\npadding: 0px;\ncolor: #000000;\n" *************** *** 275,279 **** /* Bind the socket */ ! /* complete the socket structure */ memset(&sin, 0, sizeof(sin)); --- 275,279 ---- /* Bind the socket */ ! /* complete the socket structure */ memset(&sin, 0, sizeof(sin)); *************** *** 281,285 **** sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons(port); ! /* bind the socket to the port number */ if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) { --- 281,285 ---- sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons(port); ! /* bind the socket to the port number */ if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) { *************** *** 288,292 **** return -1; } ! /* show that we are willing to listen */ if (listen(s, 1) == -1) { --- 288,292 ---- return -1; } ! /* show that we are willing to listen */ if (listen(s, 1) == -1) { *************** *** 332,336 **** struct sockaddr_in pin; socklen_t addrlen; ! char *addr; char req[MAX_HTTPREQ_SIZE]; static char body[HTML_BUFSIZE]; --- 332,336 ---- struct sockaddr_in pin; socklen_t addrlen; ! char *addr; char req[MAX_HTTPREQ_SIZE]; static char body[HTML_BUFSIZE]; *************** *** 355,359 **** if (!check_allowed_ip(allowed_nets, (union olsr_ip_addr *)&pin.sin_addr.s_addr)) { struct ipaddr_str strbuf; ! olsr_printf(0, "HTTP request from non-allowed host %s!\n", olsr_ip_to_string(&strbuf, (union olsr_ip_addr *)&pin.sin_addr.s_addr)); close(client_sockets[curr_clients]); --- 355,359 ---- if (!check_allowed_ip(allowed_nets, (union olsr_ip_addr *)&pin.sin_addr.s_addr)) { struct ipaddr_str strbuf; ! olsr_printf(0, "HTTP request from non-allowed host %s!\n", olsr_ip_to_string(&strbuf, (union olsr_ip_addr *)&pin.sin_addr.s_addr)); close(client_sockets[curr_clients]); *************** *** 372,376 **** break; } ! if (r < 0) { olsr_printf(1, "(HTTPINFO) Failed to recieve data from client!\n"); --- 372,376 ---- break; } ! if (r < 0) { olsr_printf(1, "(HTTPINFO) Failed to recieve data from client!\n"); *************** *** 378,382 **** goto close_connection; } ! /* Get the request */ if (sscanf(req, "%10s %250s %10s\n", req_type, filename, http_version) != 3) { --- 378,382 ---- goto close_connection; } ! /* Get the request */ if (sscanf(req, "%10s %250s %10s\n", req_type, filename, http_version) != 3) { *************** *** 405,412 **** req[param_size] = '\0'; printf("Dynamic read %d bytes\n", param_size); ! //memcpy(body, dynamic_files[i].data, static_bin_files[i].data_size); size += dynamic_files[i].process_data_cb(req, param_size, &body[size], sizeof(body)-size); ! c = build_http_header(HTTP_OK, OLSR_TRUE, size, req, sizeof(req)); goto send_http_data; } --- 405,412 ---- req[param_size] = '\0'; printf("Dynamic read %d bytes\n", param_size); ! //memcpy(body, dynamic_files[i].data, static_bin_files[i].data_size); size += dynamic_files[i].process_data_cb(req, param_size, &body[size], sizeof(body)-size); ! c = build_http_header(HTTP_OK, OLSR_TRUE, size, req, sizeof(req)); goto send_http_data; } *************** *** 426,435 **** } } ! if (static_bin_files[i].filename) { stats.ok_hits++; memcpy(body, static_bin_files[i].data, static_bin_files[i].data_size); size = static_bin_files[i].data_size; ! c = build_http_header(HTTP_OK, OLSR_FALSE, size, req, sizeof(req)); goto send_http_data; } --- 426,435 ---- } } ! if (static_bin_files[i].filename) { stats.ok_hits++; memcpy(body, static_bin_files[i].data, static_bin_files[i].data_size); size = static_bin_files[i].data_size; ! c = build_http_header(HTTP_OK, OLSR_FALSE, size, req, sizeof(req)); goto send_http_data; } *************** *** 442,450 **** i++; } ! if (static_txt_files[i].filename) { stats.ok_hits++; size += snprintf(&body[size], sizeof(body)-size, "%s", static_txt_files[i].data); ! c = build_http_header(HTTP_OK, OLSR_FALSE, size, req, sizeof(req)); goto send_http_data; } --- 442,450 ---- i++; } ! if (static_txt_files[i].filename) { stats.ok_hits++; size += snprintf(&body[size], sizeof(body)-size, "%s", static_txt_files[i].data); ! c = build_http_header(HTTP_OK, OLSR_FALSE, size, req, sizeof(req)); goto send_http_data; } *************** *** 463,467 **** #ifdef NETDIRECT c = build_http_header(HTTP_OK, OLSR_TRUE, size, req, sizeof(req)); ! r = send(client_sockets[curr_clients], req, c, 0); if (r < 0) { olsr_printf(1, "(HTTPINFO) Failed sending data to client!\n"); --- 463,467 ---- #ifdef NETDIRECT c = build_http_header(HTTP_OK, OLSR_TRUE, size, req, sizeof(req)); ! r = send(client_sockets[curr_clients], req, c, 0); if (r < 0) { olsr_printf(1, "(HTTPINFO) Failed sending data to client!\n"); *************** *** 491,503 **** "\n", FRAMEWIDTH); ! size += build_tabs(&body[size], sizeof(body)-size, i); ! size += build_frame(&body[size], ! sizeof(body)-size, ! "Current Routes", ! "routes", ! FRAMEWIDTH, tab_entries[i].build_body_cb); ! stats.ok_hits++; --- 491,503 ---- "\n", FRAMEWIDTH); ! size += build_tabs(&body[size], sizeof(body)-size, i); ! size += build_frame(&body[size], ! sizeof(body)-size, ! "Current Routes", ! "routes", ! FRAMEWIDTH, tab_entries[i].build_body_cb); ! stats.ok_hits++; *************** *** 512,516 **** "\n" "\n"); ! #ifdef NETDIRECT netsprintf_direct = 1; --- 512,516 ---- "\n" "\n"); ! #ifdef NETDIRECT netsprintf_direct = 1; *************** *** 521,526 **** #endif } ! ! stats.ill_hits++; strcpy(body, HTTP_404_MSG); --- 521,526 ---- #endif } ! ! stats.ill_hits++; strcpy(body, HTTP_404_MSG); *************** *** 534,539 **** send_http_data: ! ! r = writen(client_sockets[curr_clients], req, c); if (r < 0) { olsr_printf(1, "(HTTPINFO) Failed sending data to client!\n"); --- 534,539 ---- send_http_data: ! ! r = writen(client_sockets[curr_clients], req, c); if (r < 0) { olsr_printf(1, "(HTTPINFO) Failed sending data to client!\n"); *************** *** 555,562 **** int ! build_http_header(http_header_type type, ! olsr_bool is_html, ! olsr_u32_t msgsize, ! char *buf, olsr_u32_t bufsize) { --- 555,562 ---- int ! build_http_header(http_header_type type, ! olsr_bool is_html, ! olsr_u32_t msgsize, ! char *buf, olsr_u32_t bufsize) { *************** *** 582,586 **** time(&currtime); size += strftime(&buf[size], bufsize-size, "Date: %a, %d %b %Y %H:%M:%S GMT\r\n", localtime(&currtime)); ! /* Server version */ size += snprintf(&buf[size], bufsize-size, "Server: %s %s %s\r\n", PLUGIN_NAME, PLUGIN_VERSION, HTTP_VERSION); --- 582,586 ---- time(&currtime); size += strftime(&buf[size], bufsize-size, "Date: %a, %d %b %Y %H:%M:%S GMT\r\n", localtime(&currtime)); ! /* Server version */ size += snprintf(&buf[size], bufsize-size, "Server: %s %s %s\r\n", PLUGIN_NAME, PLUGIN_VERSION, HTTP_VERSION); *************** *** 597,601 **** } ! /* Cache-control * No caching dynamic pages */ --- 597,601 ---- } ! /* Cache-control * No caching dynamic pages */ *************** *** 607,611 **** /* End header */ size += snprintf(&buf[size], bufsize-size, "\r\n"); ! olsr_printf(1, "HEADER:\n%s", buf); --- 607,611 ---- /* End header */ size += snprintf(&buf[size], bufsize-size, "\r\n"); ! olsr_printf(1, "HEADER:\n%s", buf); *************** *** 628,634 **** continue; } ! size += snprintf(&buf[size], bufsize-size, "
  • %s
  • \n", ! tab_entries[tabs].filename, tabs == active ? " class=\"active\"" : "", tab_entries[tabs].tab_label); --- 628,634 ---- continue; } ! size += snprintf(&buf[size], bufsize-size, "
  • %s
  • \n", ! tab_entries[tabs].filename, tabs == active ? " class=\"active\"" : "", tab_entries[tabs].tab_label); *************** *** 663,668 **** static int build_frame(char *buf, olsr_u32_t bufsize, ! const char *title __attribute__((unused)), ! const char *link __attribute__((unused)), int width __attribute__((unused)), build_body_callback frame_body_cb) --- 663,668 ---- static int build_frame(char *buf, olsr_u32_t bufsize, ! const char *title __attribute__((unused)), ! const char *link __attribute__((unused)), int width __attribute__((unused)), build_body_callback frame_body_cb) *************** *** 670,674 **** int size = 0; size += snprintf(&buf[size], bufsize-size, "
    \n"); ! size += frame_body_cb(&buf[size], bufsize-size); size += snprintf(&buf[size], bufsize-size, "
    \n"); return size; --- 670,674 ---- int size = 0; size += snprintf(&buf[size], bufsize-size, "
    \n"); ! size += frame_body_cb(&buf[size], bufsize-size); size += snprintf(&buf[size], bufsize-size, "
    \n"); return size; *************** *** 699,703 **** size += snprintf(&buf[size], bufsize-size, "/%d", prefix_len); } ! if (print_link) { /* Print the link only if there is no prefix_len */ size += snprintf(&buf[size], bufsize-size, ""); --- 699,703 ---- size += snprintf(&buf[size], bufsize-size, "/%d", prefix_len); } ! if (print_link) { /* Print the link only if there is no prefix_len */ size += snprintf(&buf[size], bufsize-size, ""); *************** *** 802,806 **** size += snprintf(&buf[size], bufsize-size, "OS: %s\n
    ", OS); ! { const time_t currtime = time(NULL); const int rc = strftime(&buf[size], bufsize-size, "System time: %a, %d %b %Y %H:%M:%S
    ", localtime(&currtime)); --- 802,806 ---- size += snprintf(&buf[size], bufsize-size, "OS: %s\n
    ", OS); ! { const time_t currtime = time(NULL); const int rc = strftime(&buf[size], bufsize-size, "System time: %a, %d %b %Y %H:%M:%S
    ", localtime(&currtime)); *************** *** 839,846 **** size += snprintf(&buf[size], bufsize-size, "Main address: %s\n", olsr_ip_to_string(&mainaddrbuf, &olsr_cnf->main_addr)); - size += snprintf(&buf[size], bufsize-size, "IP version: %d\n", olsr_cnf->ip_version == AF_INET ? 4 : 6); - size += snprintf(&buf[size], bufsize-size, "Debug level: %d\n", olsr_cnf->debug_level); size += snprintf(&buf[size], bufsize-size, "\n\n"); --- 839,845 ---- size += snprintf(&buf[size], bufsize-size, "Main address: %s\n", olsr_ip_to_string(&mainaddrbuf, &olsr_cnf->main_addr)); size += snprintf(&buf[size], bufsize-size, "IP version: %d\n", olsr_cnf->ip_version == AF_INET ? 4 : 6); size += snprintf(&buf[size], bufsize-size, "Debug level: %d\n", olsr_cnf->debug_level); + size += snprintf(&buf[size], bufsize-size, "FIB Metrics: %s\n", olsr_cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); size += snprintf(&buf[size], bufsize-size, "\n\n"); *************** *** 850,864 **** size += snprintf(&buf[size], bufsize-size, "MPR coverage: %d\n", olsr_cnf->mpr_coverage); - size += snprintf(&buf[size], bufsize-size, "\n\n"); size += snprintf(&buf[size], bufsize-size, "Fisheye: %s\n", olsr_cnf->lq_fish ? "Enabled" : "Disabled"); - size += snprintf(&buf[size], bufsize-size, "TOS: 0x%04x\n", olsr_cnf->tos); - size += snprintf(&buf[size], bufsize-size, "RtTable: 0x%04x/%d\n", olsr_cnf->rttable, olsr_cnf->rttable); - size += snprintf(&buf[size], bufsize-size, "Willingness: %d %s\n", olsr_cnf->willingness, olsr_cnf->willingness_auto ? "(auto)" : ""); - if (olsr_cnf->lq_level == 0) { --- 849,858 ---- *************** *** 913,917 **** ip6_to_string(&addrbuf, &rifs->int6_addr.sin6_addr), ip6_to_string(&maskbuf, &rifs->int6_multaddr.sin6_addr)); ! } size += snprintf(&buf[size], bufsize-size, "\n" --- 907,911 ---- ip6_to_string(&addrbuf, &rifs->int6_addr.sin6_addr), ip6_to_string(&maskbuf, &rifs->int6_multaddr.sin6_addr)); ! } size += snprintf(&buf[size], bufsize-size, "\n" *************** *** 955,959 **** struct ipaddr_str netbuf; size += snprintf(&buf[size], bufsize-size, ! "%s/%d\n", olsr_ip_to_string(&netbuf, &hna->net.prefix), hna->net.prefix_len); --- 949,953 ---- struct ipaddr_str netbuf; size += snprintf(&buf[size], bufsize-size, ! "%s/%d\n", olsr_ip_to_string(&netbuf, &hna->net.prefix), hna->net.prefix_len); *************** *** 985,989 **** size += snprintf(&buf[size], bufsize-size, "\n"); ! /* Link set */ for (link = link_set; link != NULL; link = link->next) { size += snprintf(&buf[size], bufsize-size, ""); --- 979,983 ---- size += snprintf(&buf[size], bufsize-size, "\n"); ! /* Link set */ for (link = link_set; link != NULL; link = link->next) { size += snprintf(&buf[size], bufsize-size, ""); *************** *** 999,1005 **** "%0.2f\n", link->loss_link_quality, ! link->lost_packets, link->total_packets, ! link->neigh_link_quality, olsr_calc_link_etx(link)); } --- 993,999 ---- "%0.2f\n", link->loss_link_quality, ! link->lost_packets, link->total_packets, ! link->neigh_link_quality, olsr_calc_link_etx(link)); } *************** *** 1010,1014 **** size += section_title(&buf[size], bufsize-size, "Neighbors"); ! size += snprintf(&buf[size], bufsize-size, "IP AddressSYMMPRMPRSWillingness2 Hop Neighbors\n", colspan); /* Neighbors */ --- 1004,1008 ---- size += section_title(&buf[size], bufsize-size, "Neighbors"); ! size += snprintf(&buf[size], bufsize-size, "IP AddressSYMMPRMPRSWillingness2 Hop Neighbors\n", colspan); /* Neighbors */ *************** *** 1019,1027 **** size += snprintf(&buf[size], bufsize-size, ""); size += build_ipaddr_with_link(&buf[size], bufsize, &neigh->neighbor_main_addr, -1); ! size += snprintf(&buf[size], bufsize-size, "%s" "%s" "%s" ! "%d", (neigh->status == SYM) ? "YES" : "NO", neigh->is_mpr ? "YES" : "NO", --- 1013,1021 ---- size += snprintf(&buf[size], bufsize-size, ""); size += build_ipaddr_with_link(&buf[size], bufsize, &neigh->neighbor_main_addr, -1); ! size += snprintf(&buf[size], bufsize-size, "%s" "%s" "%s" ! "%d", (neigh->status == SYM) ? "YES" : "NO", neigh->is_mpr ? "YES" : "NO", *************** *** 1032,1036 **** "\n"); ! for (list_2 = neigh->neighbor_2_list.next, thop_cnt = 0; list_2 != &neigh->neighbor_2_list; list_2 = list_2->next, thop_cnt++) { struct ipaddr_str strbuf; --- 1026,1030 ---- "\n"); ! for (list_2 = neigh->neighbor_2_list.next, thop_cnt = 0; list_2 != &neigh->neighbor_2_list; list_2 = list_2->next, thop_cnt++) { struct ipaddr_str strbuf; *************** *** 1091,1096 **** size += snprintf(&buf[size], bufsize-size, "Main AddressAliases\n", colspan); ! ! /* MID */ for (idx = 0; idx < HASHSIZE; idx++) { struct mid_entry *entry; --- 1085,1090 ---- size += snprintf(&buf[size], bufsize-size, "Main AddressAliases\n", colspan); ! ! /* MID */ for (idx = 0; idx < HASHSIZE; idx++) { struct mid_entry *entry; *************** *** 1101,1105 **** size += build_ipaddr_with_link(&buf[size], bufsize, &entry->main_addr, -1); size += snprintf(&buf[size], bufsize-size, "\n\n"); ! for (mid_cnt = 0, alias = entry->aliases; alias != NULL; alias = alias->next_alias, mid_cnt++) { struct ipaddr_str strbuf; *************** *** 1208,1212 **** size += olsrd_write_cnf_buf(olsr_cnf, &buf[size], bufsize-size); #endif ! if (size < 0) { size = snprintf(buf, size, "ERROR GENERATING CONFIGFILE!\n"); --- 1202,1206 ---- size += olsrd_write_cnf_buf(olsr_cnf, &buf[size], bufsize-size); #endif ! if (size < 0) { size = snprintf(buf, size, "ERROR GENERATING CONFIGFILE!\n"); *************** *** 1241,1245 **** * scalable solution here. */ ! int netsprintf(char *str, const char* format, ...) { --- 1235,1239 ---- * scalable solution here. */ ! int netsprintf(char *str, const char* format, ...) { From (spam-protected) Wed Dec 12 23:47:06 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:47:06 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser cfgfile_gen.c,1.16,1.17 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3807/src/cfgparser Modified Files: cfgfile_gen.c Log Message: * fixed comments Index: cfgfile_gen.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** cfgfile_gen.c 12 Dec 2007 22:39:36 -0000 1.16 --- cfgfile_gen.c 12 Dec 2007 22:47:04 -0000 1.17 *************** *** 84,88 **** fprintf(fd, "# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* IP version */ fprintf(fd, "# FIBMetric (\"%s\" or \"%s\")\n\nFIBMetric\t\"%s\"\n\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT, cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); --- 84,88 ---- fprintf(fd, "# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* FIB Metric */ fprintf(fd, "# FIBMetric (\"%s\" or \"%s\")\n\nFIBMetric\t\"%s\"\n\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT, cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); *************** *** 370,374 **** WRITE_TO_BUF("# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* IP version */ WRITE_TO_BUF("# FIBMetric (\"%s\" or \"%s\")\n\nFIBMetric\t\"%s\"\n\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT, cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); --- 370,374 ---- WRITE_TO_BUF("# IP version to use (4 or 6)\n\nIpVersion\t%d\n\n", cnf->ip_version == AF_INET ? 4 : 6); ! /* FIB Metric */ WRITE_TO_BUF("# FIBMetric (\"%s\" or \"%s\")\n\nFIBMetric\t\"%s\"\n\n", CFG_FIBM_FLAT, CFG_FIBM_CORRECT, cnf->flat_fib_metric ? CFG_FIBM_FLAT : CFG_FIBM_CORRECT); From (spam-protected) Wed Dec 12 23:49:06 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 22:49:06 +0000 Subject: [Olsr-cvs] olsrd-current/lib/httpinfo/src admin_interface.c, 1.16, 1.17 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4346/lib/httpinfo/src Modified Files: admin_interface.c Log Message: * avoid the "%1$" in format strigns: CygWin (IIRC) doesn't support this. Index: admin_interface.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/admin_interface.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** admin_interface.c 12 Dec 2007 22:06:24 -0000 1.16 --- admin_interface.c 12 Dec 2007 22:49:04 -0000 1.17 *************** *** 156,162 **** for(hna = olsr_cnf->hna_entries; hna; hna = hna->next) { struct ipaddr_str netbuf; size += snprintf(&buf[size], bufsize-size, ! "%1$s%2$d\n", ! olsr_ip_to_string(&netbuf, &hna->net.prefix), hna->net.prefix_len); } --- 156,165 ---- for(hna = olsr_cnf->hna_entries; hna; hna = hna->next) { struct ipaddr_str netbuf; + olsr_ip_to_string(&netbuf, &hna->net.prefix); size += snprintf(&buf[size], bufsize-size, ! "%s%d\n", ! netbuf.buf, ! hna->net.prefix_len, ! netbuf.buf, hna->net.prefix_len); } From (spam-protected) Thu Dec 13 00:38:54 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 12 Dec 2007 23:38:54 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_route.c,1.63,1.64 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25326/src Modified Files: lq_route.c Log Message: * fixed another compile error Index: lq_route.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** lq_route.c 12 Dec 2007 22:03:37 -0000 1.63 --- lq_route.c 12 Dec 2007 23:38:52 -0000 1.64 *************** *** 443,447 **** --- 443,449 ---- */ if (tc != tc_myself) { + #if !defined(NODEBUG) struct ipaddr_str buf; + #endif OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr)); } From (spam-protected) Thu Dec 13 12:34:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Thu, 13 Dec 2007 11:34:38 +0000 Subject: [Olsr-cvs] olsrd-current/src ipcalc.c, 1.2, 1.3 lq_route.c, 1.64, 1.65 routing_table.c, 1.40, 1.41 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10259/src Modified Files: ipcalc.c lq_route.c routing_table.c Log Message: - add #ifdef DEBUG for 2 OLSR_PRINTF() as suggested by hannes at gredler.at - fixed compile regressions Index: lq_route.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** lq_route.c 12 Dec 2007 23:38:52 -0000 1.64 --- lq_route.c 13 Dec 2007 11:34:35 -0000 1.65 *************** *** 312,319 **** olsr_calculate_routing_table (void) { - #if !defined(NODEBUG) && defined(DEBUG) - struct ipaddr_str buf; - #endif - struct avl_tree cand_tree; struct avl_node *rtp_tree_node; --- 312,315 ---- *************** *** 437,441 **** if (!link) { ! /* * Supress the error msg when our own tc_entry --- 433,437 ---- if (!link) { ! #ifdef DEBUG /* * Supress the error msg when our own tc_entry *************** *** 443,451 **** */ if (tc != tc_myself) { ! #if !defined(NODEBUG) struct ipaddr_str buf; #endif OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr)); } continue; } --- 439,448 ---- */ if (tc != tc_myself) { ! #ifndef NODEBUG struct ipaddr_str buf; #endif OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr)); } + #endif continue; } Index: ipcalc.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipcalc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ipcalc.c 2 Dec 2007 19:00:27 -0000 1.2 --- ipcalc.c 13 Dec 2007 11:34:35 -0000 1.3 *************** *** 64,68 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefix, olsr_ip_to_string(&buf, adr)); #endif return 1; --- 64,68 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefixlen, inet_ntop(olsr_cnf->ip_version, a, buf.buf, sizeof(buf.buf))); #endif return 1; Index: routing_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** routing_table.c 12 Dec 2007 22:04:08 -0000 1.40 --- routing_table.c 13 Dec 2007 11:34:35 -0000 1.41 *************** *** 489,493 **** union olsr_ip_addr *originator, int origin) { ! #if !defined(NODEBUG) struct ipaddr_str dstbuf, origbuf; #endif --- 489,493 ---- union olsr_ip_addr *originator, int origin) { ! #if !defined(NODEBUG) && defined(DEBUG) struct ipaddr_str dstbuf, origbuf; #endif *************** *** 504,510 **** --- 504,512 ---- } + #ifdef DEBUG OLSR_PRINTF(1, "RIB: add prefix %s/%u from %s\n", olsr_ip_to_string(&dstbuf, dst), plen, olsr_ip_to_string(&origbuf, originator)); + #endif /*