Added NetBSD patch
[olsrd.git] / src / unix / ifnet.c
index 3e5f73b..81f15a0 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.7 2004/11/21 10:50:52 kattemat Exp $
+ * $Id: ifnet.c,v 1.10 2004/12/12 17:54:00 kattemat Exp $
  */
 
 
@@ -54,7 +54,7 @@
 #define SIOCGIWMODE    0x8B07          /* get operation mode */
 #define SIOCSIWSENS    0x8B08          /* set sensitivity (dBm) */
 #define SIOCGIWSENS    0x8B09          /* get sensitivity (dBm) */
-#elif defined __FreeBSD__ || defined __MacOSX__
+#elif defined __FreeBSD__ || defined __MacOSX__ || defined __NetBSD__
 #define ifr_netmask ifr_addr
 #endif
 
@@ -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,
@@ -692,7 +690,7 @@ chk_if_up(struct olsr_if *iface, int debuglvl)
   olsr_printf(1, "\tMTU: %d\n", ifs.int_mtu);
 
   olsr_syslog(OLSR_LOG_INFO, "Adding interface %s\n", iface->name);
-  olsr_printf(1, "\tInterface %s set up for use with index %d\n", iface->name, ifs.if_nr);
+  olsr_printf(1, "\tIndex %d\n", iface->name, ifs.if_nr);
 
   if(olsr_cnf->ip_version == AF_INET)
     {
@@ -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,