Removed USE_LINK_QUALITY #ifdefs. The link quality code is now always
authorThomas Lopatic <thomas@lopatic.de>
Sat, 4 Dec 2004 17:06:57 +0000 (17:06 +0000)
committerThomas Lopatic <thomas@lopatic.de>
Sat, 4 Dec 2004 17:06:57 +0000 (17:06 +0000)
compiled in. uberclean now also deletes *~ in the topmost directory.

20 files changed:
Makefile
src/defs.h
src/link_set.c
src/link_set.h
src/lq_list.c
src/lq_mpr.c
src/lq_packet.c
src/lq_route.c
src/neighbor_table.c
src/neighbor_table.h
src/olsr.c
src/packet.h
src/parser.c
src/process_package.c
src/tc_set.c
src/tc_set.h
src/two_hop_neighbor_table.c
src/two_hop_neighbor_table.h
src/unix/ifnet.c
src/win32/ifnet.c

index 85280cc..9e1cf36 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@
 # to the project. For more information see the website or contact
 # the copyright holders.
 #
-# $Id: Makefile,v 1.38 2004/12/04 09:46:05 kattemat Exp $
+# $Id: Makefile,v 1.39 2004/12/04 17:06:56 tlopatic Exp $
 
 VERS =         0.4.8
 
@@ -46,7 +46,6 @@ FLEX ?=               flex
 
 INSTALL_PREFIX ?=
 
-DEFINES =      -DUSE_LINK_QUALITY
 INCLUDES =     -Isrc
 
 DEPFILE =      .depend
@@ -70,7 +69,7 @@ ifeq ($(OS), linux)
 
 SRCS +=        $(wildcard src/linux/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/linux/*.h) $(wildcard src/unix/*.h)
-DEFINES +=     -Dlinux
+DEFINES      -Dlinux
 CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes \
                -O2 -g #-pg -DDEBUG #-march=i686
 LIBS =         -lm -ldl
@@ -90,7 +89,7 @@ ifeq ($(OS), osx)
 
 SRCS +=                $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
-DEFINES +=     -D__MacOSX__
+DEFINES      -D__MacOSX__
 CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -g 
 LIBS =         -lm -ldl
 MAKEDEPEND =   makedepend -f $(DEPFILE) $(DEFINES) $(INCLUDES) $(SRCS)
@@ -101,7 +100,7 @@ ifeq ($(OS), win32)
 SRCS +=                $(wildcard src/win32/*.c)
 HDRS +=                $(wildcard src/win32/*.h)
 INCLUDES +=    -Isrc/win32
-DEFINES +=     -DWIN32
+DEFINES      -DWIN32
 CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes \
                -mno-cygwin -O2 -g
 LIBS =         -mno-cygwin -lws2_32 -liphlpapi
@@ -206,7 +205,7 @@ clean:
                $(MAKE) -C src/cfgparser clean
 
 uberclean:     clean clean_libs
-               rm -f $(DEPFILE) $(DEPFILE).bak
+               rm -f $(DEPFILE) $(DEPFILE).bak *~
                rm -f src/*[o~] src/linux/*[o~] src/unix/*[o~] src/win32/*[o~]
                rm -f src/bsd/*[o~] 
                $(MAKE) -C src/cfgparser uberclean
index 000396b..c8aebd6 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: defs.h,v 1.28 2004/11/21 11:28:56 kattemat Exp $
+ * $Id: defs.h,v 1.29 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 #ifndef _OLSR_DEFS
@@ -60,9 +60,7 @@
 #include "olsr.h" /* Everybody uses theese */
 #include "olsr_cfg.h"
 
-#if defined USE_LINK_QUALITY
 #include "lq_packet.h"
-#endif
 
 #define VERSION "0.4.8-pre"
 #define SOFTWARE_VERSION "olsr.org - " VERSION
index 59272d7..ad87801 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: link_set.c,v 1.36 2004/12/02 18:03:15 tlopatic Exp $
+ * $Id: link_set.c,v 1.37 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -63,9 +63,7 @@ check_link_status(struct hello_message *);
 static void
 olsr_time_out_hysteresis(void);
 
-#if defined USE_LINK_QUALITY
 static void olsr_time_out_packet_loss(void);
-#endif
 
 static struct link_entry *
 add_new_entry(union olsr_ip_addr *, union olsr_ip_addr *, union olsr_ip_addr *, double, double);
@@ -96,12 +94,10 @@ olsr_init_link_set()
       olsr_register_timeout_function(&olsr_time_out_hysteresis);
     }
 
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level > 0)
     {
       olsr_register_timeout_function(&olsr_time_out_packet_loss);
     }
-#endif
 }
 
 
@@ -311,17 +307,13 @@ get_interface_link_set(union olsr_ip_addr *remote)
   struct link_entry *tmp_link_set;
   union olsr_ip_addr *remote_addr;
   struct interface *if_to_use, *tmp_if, *backup_if;
-#if defined USE_LINK_QUALITY
   float link_quality, backup_link_quality, curr;
-#endif
 
   if_to_use = NULL;
   backup_if = NULL;
 
-#if defined USE_LINK_QUALITY
   link_quality = -1.0;
   backup_link_quality = -1.0;
-#endif
 
   if(remote == NULL || link_set == NULL)
     {
@@ -349,14 +341,11 @@ get_interface_link_set(union olsr_ip_addr *remote)
          /* Must be symmetric link! */
          if(!TIMED_OUT(&tmp_link_set->SYM_time))
            {
-#if defined USE_LINK_QUALITY
               if (olsr_cnf->lq_level == 0)
                 {
-#endif
                   if (if_to_use == NULL ||
                       if_to_use->int_metric > tmp_if->int_metric)
                     if_to_use = tmp_if;
-#if defined USE_LINK_QUALITY
                 }
 
               else
@@ -370,20 +359,16 @@ get_interface_link_set(union olsr_ip_addr *remote)
                       link_quality = curr;
                     }
                 }
-#endif
            }
          /* Backup solution in case the links have timed out */
          else
            {
-#if defined USE_LINK_QUALITY
               if (olsr_cnf->lq_level == 0)
                 {
-#endif
                   if (if_to_use == NULL &&
                       (backup_if == NULL ||
                        backup_if->int_metric > tmp_if->int_metric))
                     backup_if = tmp_if;
-#if defined USE_LINK_QUALITY
                 }
 
               else 
@@ -397,7 +382,6 @@ get_interface_link_set(union olsr_ip_addr *remote)
                       backup_link_quality = curr;
                     }
                 }
-#endif
             }
        }
       
@@ -487,7 +471,6 @@ add_new_entry(union olsr_ip_addr *local, union olsr_ip_addr *remote, union olsr_
 
   new_link->L_link_quality = 0.0;
 
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level > 0)
     {
       new_link->loss_hello_int = htime;
@@ -513,7 +496,6 @@ add_new_entry(union olsr_ip_addr *local, union olsr_ip_addr *remote, union olsr_
 
   new_link->saved_loss_link_quality = 0.0;
   new_link->saved_neigh_link_quality = 0.0;
-#endif
 
   /* Add to queue */
   new_link->next = link_set;
@@ -931,7 +913,6 @@ olsr_time_out_hysteresis()
   return;
 }
 
-#if defined USE_LINK_QUALITY
 void olsr_print_link_set(void)
 {
   struct link_entry *walker;
@@ -1184,4 +1165,3 @@ struct link_entry *olsr_neighbor_best_link(union olsr_ip_addr *main)
 
   return res;
 }
-#endif
index 64f33d6..7decea5 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: link_set.h,v 1.17 2004/12/02 18:03:15 tlopatic Exp $
+ * $Id: link_set.h,v 1.18 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -70,7 +70,6 @@ struct link_entry
   olsr_u16_t olsr_seqno;
   olsr_bool olsr_seqno_valid;
 
-#if defined USE_LINK_QUALITY
   /*
    * packet loss
    */
@@ -96,7 +95,6 @@ struct link_entry
 
   double saved_loss_link_quality;
   double saved_neigh_link_quality;
-#endif
 
   /*
    * Spy
@@ -142,13 +140,10 @@ replace_neighbor_link_set(struct neighbor_entry *,
 int
 lookup_link_status(struct link_entry *);
 
-#if defined USE_LINK_QUALITY
 void olsr_update_packet_loss_hello_int(struct link_entry *entry, double htime);
 void olsr_update_packet_loss(union olsr_ip_addr *rem, union olsr_ip_addr *loc,
                         olsr_u16_t seqno);
 void olsr_print_link_set(void);
 struct link_entry *olsr_neighbor_best_link(union olsr_ip_addr *main);
-struct link_entry *olsr_neighbor_best_inverse_link(union olsr_ip_addr *main);
-#endif
 
 #endif
index 032b833..820e866 100644 (file)
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: lq_list.c,v 1.2 2004/11/21 11:28:56 kattemat Exp $
+ * $Id: lq_list.c,v 1.3 2004/12/04 17:06:57 tlopatic Exp $
  */
 
-#if defined USE_LINK_QUALITY
 #include <stdlib.h>
 #include "lq_list.h"
 
@@ -141,4 +140,3 @@ void list_remove(struct list *list, struct list_node *node)
   else
     node->next->prev = node->prev;
 }
-#endif
index 762c556..4427e5c 100644 (file)
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: lq_mpr.c,v 1.7 2004/11/29 19:29:28 tlopatic Exp $
+ * $Id: lq_mpr.c,v 1.8 2004/12/04 17:06:57 tlopatic Exp $
  */
 
-#if defined USE_LINK_QUALITY
 #include "defs.h"
 #include "neighbor_table.h"
 #include "two_hop_neighbor_table.h"
@@ -148,4 +147,3 @@ void olsr_calculate_lq_mpr(void)
   if (mpr_changes && olsr_cnf->tc_redundancy > 0)
     changes = OLSR_TRUE;
 }
-#endif
index aebf5fb..5e1945f 100644 (file)
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: lq_packet.c,v 1.7 2004/11/28 13:43:59 tlopatic Exp $
+ * $Id: lq_packet.c,v 1.8 2004/12/04 17:06:57 tlopatic Exp $
  */
 
-#if defined USE_LINK_QUALITY
 #include "olsr_protocol.h"
 #include "defs.h"
 #include "interfaces.h"
@@ -896,4 +895,3 @@ olsr_input_lq_tc(union olsr_message *ser, struct interface *inif,
 
   destroy_lq_tc(&lq_tc);
 }
-#endif
index f847d60..5c72d3d 100644 (file)
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: lq_route.c,v 1.17 2004/12/03 19:10:51 tlopatic Exp $
+ * $Id: lq_route.c,v 1.18 2004/12/04 17:06:57 tlopatic Exp $
  */
 
-#if defined USE_LINK_QUALITY
 #include "defs.h"
 #include "tc_set.h"
 #include "neighbor_table.h"
@@ -476,4 +475,3 @@ void olsr_calculate_lq_routing_table(void)
 
   olsr_free_routing_table(old_routes);
 }
-#endif
index d03bb64..a8507d5 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: neighbor_table.c,v 1.20 2004/11/28 13:43:59 tlopatic Exp $
+ * $Id: neighbor_table.c,v 1.21 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -476,9 +476,7 @@ olsr_print_neighbor_table()
 {
   int i;
   struct neighbor_entry *neigh;
-#if defined USE_LINK_QUALITY
   struct link_entry *link;
-#endif
   double best_lq, inv_best_lq;
   char *fstr;
 
@@ -505,15 +503,10 @@ olsr_print_neighbor_table()
       for(neigh = neighbortable[i].next; neigh != &neighbortable[i];
          neigh = neigh->next)
        {
-#if defined USE_LINK_QUALITY
           link = olsr_neighbor_best_link(&neigh->neighbor_main_addr);
 
           best_lq = link->neigh_link_quality;
           inv_best_lq = link->loss_link_quality;
-#else
-          best_lq = 0.0;
-          inv_best_lq = 0.0;
-#endif
 
           olsr_printf(1, fstr, olsr_ip_to_string(&neigh->neighbor_main_addr),
                       inv_best_lq, best_lq,
index 27a12fd..d45c8fa 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: neighbor_table.h,v 1.9 2004/11/29 19:29:28 tlopatic Exp $
+ * $Id: neighbor_table.h,v 1.10 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -64,9 +64,7 @@ struct neighbor_entry
   olsr_u8_t                    willingness;
   olsr_bool                    is_mpr;
   olsr_bool                    was_mpr; /* Used to detect changes in MPR */
-#if defined USE_LINK_QUALITY
   olsr_bool                    skip;
-#endif
   int                          neighbor_2_nocov;
   int                          linkcount;
   struct neighbor_2_list_entry neighbor_2_list; 
index 71ac907..d16f213 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: olsr.c,v 1.31 2004/11/29 20:47:01 tlopatic Exp $
+ * $Id: olsr.c,v 1.32 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 /**
 #include "mpr_selector_set.h"
 #include "mid_set.h"
 #include "mpr.h"
-#if defined USE_LINK_QUALITY
 #include "lq_mpr.h"
 #include "lq_route.h"
-#endif
 #include "scheduler.h"
 #include "generate_msg.h"
 #include "apm.h"
@@ -207,12 +205,9 @@ olsr_process_changes()
   if (changes_neighborhood)
     {
       /* Calculate new mprs, HNA and routing table */
-#if defined USE_LINK_QUALITY
       if (olsr_cnf->lq_level < 1)
         {
-#endif
           olsr_calculate_mpr();
-#if defined USE_LINK_QUALITY
         }
 
       else
@@ -220,19 +215,15 @@ olsr_process_changes()
           olsr_calculate_lq_mpr();
         }
 
-
       if (olsr_cnf->lq_level < 2)
         {
-#endif
           olsr_calculate_routing_table();
-#if defined USE_LINK_QUALITY
         }
 
       else
         {
           olsr_calculate_lq_routing_table();
         }
-#endif
 
       olsr_calculate_hna_routes();
     }
@@ -240,19 +231,17 @@ olsr_process_changes()
   else if (changes_topology)
     {
       /* calculate the routing table and HNA */
-#if defined USE_LINK_QUALITY
+
       if (olsr_cnf->lq_level < 2)
         {
-#endif
           olsr_calculate_routing_table();
-#if defined USE_LINK_QUALITY
         }
 
       else
         {
           olsr_calculate_lq_routing_table();
         }
-#endif
+
       olsr_calculate_hna_routes();
     }
 
@@ -279,9 +268,7 @@ olsr_process_changes()
             }
         }
 
-#ifdef USE_LINK_QUALITY
       olsr_print_link_set();
-#endif
       olsr_print_neighbor_table();
     }
 
index 7c87694..3e719fc 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: packet.h,v 1.11 2004/11/21 11:28:56 kattemat Exp $
+ * $Id: packet.h,v 1.12 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -59,10 +59,8 @@ struct hello_neighbor
 {
   olsr_u8_t             status;
   olsr_u8_t             link;
-#if defined USE_LINK_QUALITY
   double                link_quality;
   double                neigh_link_quality;
-#endif
   union olsr_ip_addr    main_address;
   union olsr_ip_addr    address;
   struct hello_neighbor *next;
@@ -83,10 +81,8 @@ struct hello_message
 
 struct tc_mpr_addr
 {
-#if defined USE_LINK_QUALITY
   double             link_quality;
   double             neigh_link_quality;
-#endif
   union olsr_ip_addr address;
   struct tc_mpr_addr *next;
 };
index b35320a..c95269b 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: parser.c,v 1.15 2004/11/21 14:22:33 kattemat Exp $
+ * $Id: parser.c,v 1.16 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 #include "parser.h"
@@ -319,13 +319,11 @@ parse_packet(struct olsr *olsr, int size, struct interface *in_if, union olsr_ip
        }
     }
 
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level > 0)
     {
       olsr_update_packet_loss(from_addr, &in_if->ip_addr,
                               ntohs(olsr->olsr_seqno));
     }
-#endif
   
   for ( ; count > 0; m = (union olsr_message *)((char *)m + (msgsize)))
     {
index 9e1dd33..7472122 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: process_package.c,v 1.23 2004/11/28 13:43:59 tlopatic Exp $
+ * $Id: process_package.c,v 1.24 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
 void
 olsr_init_package_process()
 {
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level == 0)
     {
-#endif
       olsr_parser_add_function(&olsr_process_received_hello, HELLO_MESSAGE, 1);
       olsr_parser_add_function(&olsr_process_received_tc, TC_MESSAGE, 1);
-#if defined USE_LINK_QUALITY
     }
 
   else
@@ -73,7 +70,7 @@ olsr_init_package_process()
       olsr_parser_add_function(&olsr_input_lq_hello, LQ_HELLO_MESSAGE, 1);
       olsr_parser_add_function(&olsr_input_lq_tc, LQ_TC_MESSAGE, 1);
     }
-#endif
+
   olsr_parser_add_function(&olsr_process_received_mid, MID_MESSAGE, 1);
   olsr_parser_add_function(&olsr_process_received_hna, HNA_MESSAGE, 1);
 }
@@ -84,18 +81,15 @@ olsr_hello_tap(struct hello_message *message, struct interface *in_if,
 {
   struct link_entry         *link;
   struct neighbor_entry     *neighbor;
-#if defined USE_LINK_QUALITY
   struct hello_neighbor *walker;
   double saved_lq;
   double rel_lq;
-#endif
 
   /*
    * Update link status
    */
   link = update_link_entry(&in_if->ip_addr, from_addr, message, in_if);
 
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level > 0)
     {
       // just in case our neighbor has changed its HELLO interval
@@ -144,7 +138,6 @@ olsr_hello_tap(struct hello_message *message, struct interface *in_if,
           changes = OLSR_TRUE;
         }
     }
-#endif
   
   neighbor = link->neighbor;
 
@@ -513,10 +506,8 @@ olsr_process_message_neighbors(struct neighbor_entry *neighbor,
   struct neighbor_2_list_entry *two_hop_neighbor_yet;
   struct neighbor_2_entry      *two_hop_neighbor;
   union olsr_ip_addr           *neigh_addr;
-#if defined USE_LINK_QUALITY
   struct neighbor_list_entry *walker;
   struct link_entry *link;
-#endif
 
   for(message_neighbors = message->neighbors;
       message_neighbors != NULL;
@@ -599,7 +590,7 @@ olsr_process_message_neighbors(struct neighbor_entry *neighbor,
                                               (float)message->vtime); 
                 }
             }
-#if defined USE_LINK_QUALITY
+
           if (olsr_cnf->lq_level > 0)
             {
               link = olsr_neighbor_best_link(&neighbor->neighbor_main_addr);
@@ -658,7 +649,6 @@ olsr_process_message_neighbors(struct neighbor_entry *neighbor,
                     }
                 }
             }
-#endif
         }
     }
 }
@@ -689,10 +679,8 @@ olsr_linking_this_2_entries(struct neighbor_entry *neighbor,struct neighbor_2_en
 
   list_of_1_neighbors->neighbor = neighbor;
 
-#if defined USE_LINK_QUALITY
   list_of_1_neighbors->path_link_quality = 0.0;
   list_of_1_neighbors->saved_path_link_quality = 0.0;
-#endif
 
   /* Queue */
   two_hop_neighbor->neighbor_2_nblist.next->prev = list_of_1_neighbors;
index 84664f6..ef1f9b2 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: tc_set.c,v 1.16 2004/11/30 07:48:52 kattemat Exp $
+ * $Id: tc_set.c,v 1.17 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -259,17 +259,15 @@ olsr_tc_update_mprs(struct tc_entry *entry, struct tc_message *msg)
          olsr_get_timestamp((olsr_u32_t) msg->vtime*1000, &new_topo_dst->T_time);
          new_topo_dst->T_seq = msg->ansn;
 
-#if defined USE_LINK_QUALITY
-    if (olsr_cnf->lq_level > 0)
-      {
-        new_topo_dst->link_quality = mprs->neigh_link_quality;
-        new_topo_dst->inverse_link_quality = mprs->link_quality;
+          if (olsr_cnf->lq_level > 0)
+            {
+              new_topo_dst->link_quality = mprs->neigh_link_quality;
+              new_topo_dst->inverse_link_quality = mprs->link_quality;
 
-        new_topo_dst->saved_link_quality = new_topo_dst->link_quality;
-        new_topo_dst->saved_inverse_link_quality =
-          new_topo_dst->inverse_link_quality;
-      }
-#endif
+              new_topo_dst->saved_link_quality = new_topo_dst->link_quality;
+              new_topo_dst->saved_inverse_link_quality =
+                new_topo_dst->inverse_link_quality;
+            }
 
          /* Add to queue */
          new_topo_dst->prev = &entry->destinations;
@@ -285,7 +283,6 @@ olsr_tc_update_mprs(struct tc_entry *entry, struct tc_message *msg)
          olsr_get_timestamp((olsr_u32_t) msg->vtime*1000, &existing_dst->T_time);
          existing_dst->T_seq = msg->ansn;
 
-#if defined USE_LINK_QUALITY
           if (olsr_cnf->lq_level > 0)
             {
               double saved_lq, rel_lq;
@@ -324,7 +321,6 @@ olsr_tc_update_mprs(struct tc_entry *entry, struct tc_message *msg)
                   retval = 1;
                 }
             }
-#endif
        }
 
       mprs = mprs->next;
@@ -435,9 +431,7 @@ olsr_print_tc_table()
   struct tc_entry *entry;
   struct topo_dst *dst_entry;
   char *fstr;
-#if defined USE_LINK_QUALITY
   float etx;
-#endif
   
   olsr_printf(2, "\n--- %02d:%02d:%02d.%02d ------------------------------------------------- TOPOLOGY\n\n",
               nowtm->tm_hour,
@@ -467,7 +461,6 @@ olsr_print_tc_table()
 
       while(dst_entry != &entry->destinations)
       {
-#if defined USE_LINK_QUALITY
         if (dst_entry->link_quality < MIN_LINK_QUALITY ||
             dst_entry->inverse_link_quality < MIN_LINK_QUALITY)
           etx = 0.0;
@@ -480,11 +473,6 @@ olsr_print_tc_table()
                     olsr_ip_to_string(&dst_entry->T_dest_addr),
                     dst_entry->link_quality, dst_entry->inverse_link_quality,
                     etx);
-#else
-        olsr_printf(1, fstr, olsr_ip_to_string(&entry->T_last_addr),
-                    olsr_ip_to_string(&dst_entry->T_dest_addr),
-                    0.0, 0.0, 0.0);
-#endif
 
         dst_entry = dst_entry->next;
       }
index bd28c4f..11aa2c5 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: tc_set.h,v 1.9 2004/11/21 11:28:56 kattemat Exp $
+ * $Id: tc_set.h,v 1.10 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 #include "defs.h"
@@ -54,12 +54,10 @@ struct topo_dst
   olsr_u16_t T_seq;
   struct topo_dst *next;
   struct topo_dst *prev;
-#if defined USE_LINK_QUALITY
   double link_quality;
   double inverse_link_quality;
   double saved_link_quality;
   double saved_inverse_link_quality;
-#endif
 };
 
 
index 8b16a40..a31b30b 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: two_hop_neighbor_table.c,v 1.10 2004/11/28 13:43:59 tlopatic Exp $
+ * $Id: two_hop_neighbor_table.c,v 1.11 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -281,11 +281,8 @@ olsr_print_two_hop_neighbor_table()
               else
                 olsr_printf(1, "                 ");
 
-#if defined USE_LINK_QUALITY
               total_lq = entry->path_link_quality;
-#else
-              total_lq = 0.0;
-#endif
+
               olsr_printf(1, "%-15s  %5.3f\n",
                           olsr_ip_to_string(&neigh->neighbor_main_addr),
                           total_lq);
index 6270aa7..fe2fe6a 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: two_hop_neighbor_table.h,v 1.10 2004/11/28 13:43:59 tlopatic Exp $
+ * $Id: two_hop_neighbor_table.h,v 1.11 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
 struct neighbor_list_entry 
 {
   struct       neighbor_entry *neighbor;
-#if defined USE_LINK_QUALITY
-  double path_link_quality;
-  double saved_path_link_quality;
-#endif
+  double        path_link_quality;
+  double        saved_path_link_quality;
   struct       neighbor_list_entry *next;
   struct       neighbor_list_entry *prev;
 };
index cfc04ec..4775c69 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: ifnet.c,v 1.8 2004/12/03 20:57:15 kattemat Exp $
+ * $Id: ifnet.c,v 1.9 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 
@@ -455,10 +455,9 @@ chk_if_changed(struct olsr_if *iface)
   /*
    * Deregister scheduled functions 
    */
-#if defined USE_LINK_QUALITY
+
   if (olsr_cnf->lq_level == 0)
     {
-#endif
       olsr_remove_scheduler_event(&generate_hello, 
                                   ifp, 
                                   iface->cnf->hello_params.emission_interval, 
@@ -469,7 +468,6 @@ chk_if_changed(struct olsr_if *iface)
                                   iface->cnf->tc_params.emission_interval,
                                   0, 
                                   NULL);
-#if defined USE_LINK_QUALITY
     }
 
   else
@@ -485,7 +483,7 @@ chk_if_changed(struct olsr_if *iface)
                                   0, 
                                   NULL);
     }
-#endif
+
   olsr_remove_scheduler_event(&generate_mid, 
                              ifp, 
                              iface->cnf->mid_params.emission_interval,
@@ -804,10 +802,9 @@ chk_if_up(struct olsr_if *iface, int debuglvl)
   /*
    * Register scheduled functions 
    */
-#if defined USE_LINK_QUALITY
+
   if (olsr_cnf->lq_level == 0)
     {
-#endif
       olsr_register_scheduler_event(&generate_hello, 
                                     ifp, 
                                     iface->cnf->hello_params.emission_interval, 
@@ -818,7 +815,6 @@ chk_if_up(struct olsr_if *iface, int debuglvl)
                                     iface->cnf->tc_params.emission_interval,
                                     0, 
                                     NULL);
-#if defined USE_LINK_QUALITY
     }
 
   else
@@ -834,7 +830,7 @@ chk_if_up(struct olsr_if *iface, int debuglvl)
                                     0, 
                                     NULL);
     }
-#endif
+
   olsr_register_scheduler_event(&generate_mid, 
                                ifp, 
                                iface->cnf->mid_params.emission_interval,
index 10e2353..f349222 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: ifnet.c,v 1.12 2004/11/21 01:21:10 tlopatic Exp $
+ * $Id: ifnet.c,v 1.13 2004/12/04 17:06:57 tlopatic Exp $
  */
 
 #include "../interfaces.h"
@@ -533,10 +533,8 @@ void RemoveInterface(struct olsr_if *IntConf)
     }
   }
 
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level == 0)
     {
-#endif
       olsr_remove_scheduler_event(&generate_hello, Int,
                                   IntConf->cnf->hello_params.emission_interval,
                                   0, NULL);
@@ -544,7 +542,6 @@ void RemoveInterface(struct olsr_if *IntConf)
       olsr_remove_scheduler_event(&generate_tc, Int,
                                   IntConf->cnf->tc_params.emission_interval,
                                   0, NULL);
-#if defined USE_LINK_QUALITY
     }
 
   else
@@ -557,7 +554,7 @@ void RemoveInterface(struct olsr_if *IntConf)
                                   IntConf->cnf->tc_params.emission_interval,
                                   0, NULL);
     }
-#endif
+
   olsr_remove_scheduler_event(&generate_mid, Int,
                               IntConf->cnf->mid_params.emission_interval,
                               0, NULL);
@@ -827,10 +824,8 @@ int chk_if_up(struct olsr_if *IntConf, int DebugLevel)
 
   net_add_buffer(New);
 
-#if defined USE_LINK_QUALITY
   if (olsr_cnf->lq_level == 0)
     {
-#endif
       olsr_register_scheduler_event(&generate_hello, New,
                                     IntConf->cnf->hello_params.emission_interval,
                                     0, NULL);
@@ -838,7 +833,6 @@ int chk_if_up(struct olsr_if *IntConf, int DebugLevel)
       olsr_register_scheduler_event(&generate_tc, New,
                                     IntConf->cnf->tc_params.emission_interval,
                                     0, NULL);
-#if defined USE_LINK_QUALITY
     }
 
   else
@@ -851,7 +845,7 @@ int chk_if_up(struct olsr_if *IntConf, int DebugLevel)
                                     IntConf->cnf->tc_params.emission_interval,
                                     0, NULL);
     }
-#endif
+
   olsr_register_scheduler_event(&generate_mid, New,
                                 IntConf->cnf->mid_params.emission_interval,
                                 0, NULL);