[Olsr-cvs] olsrd-current/src build_msg.c, 1.35, 1.36 defs.h, 1.57, 1.58 duplicate_set.c, 1.14, 1.15 hna_set.c, 1.18, 1.19 hysteresis.c, 1.19, 1.20 interfaces.c, 1.30, 1.31 ipc_frontend.c, 1.29, 1.30 link_set.c, 1.67, 1.68 lq_route.c, 1.45, 1.46 main.c, 1.94, 1.95 mid_set.c, 1.19, 1.20 mpr.c, 1.16, 1.17 mpr_selector_set.c, 1.16, 1.17 neighbor_table.c, 1.31, 1.32 net_olsr.c, 1.21, 1.22 net_olsr.h, 1.8, 1.9 olsr.c, 1.53, 1.54 olsr_types.h, 1.6, 1.7 packet.c, 1.21, 1.22 parser.c, 1.33, 1.34 plugin_loader.c, 1.24, 1.25 process_package.c, 1.39, 1.40 process_routes.c, 1.31, 1.32 rebuild_packet.c, 1.20, 1.21 routing_table.c, 1.26, 1.27 scheduler.c, 1.38, 1.39 socket_parser.c, 1.24, 1.25 tc_set.c, 1.25, 1.26 two_hop_neighbor_table.c, 1.17, 1.18

Bernd Petrovitsch (spam-protected)
Thu Apr 26 00:08:19 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src

Modified Files:
	build_msg.c defs.h duplicate_set.c hna_set.c hysteresis.c 
	interfaces.c ipc_frontend.c link_set.c lq_route.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 parser.c 
	plugin_loader.c process_package.c process_routes.c 
	rebuild_packet.c routing_table.c scheduler.c socket_parser.c 
	tc_set.c two_hop_neighbor_table.c 
Log Message:
* OLSR_PRINTF() is now a real C expression
* removed superflous type-casts


Index: rebuild_packet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/rebuild_packet.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** rebuild_packet.c	22 Apr 2007 20:25:48 -0000	1.20
--- rebuild_packet.c	25 Apr 2007 22:08:13 -0000	1.21
***************
*** 231,243 ****
        if(olsr_cnf->debug_level > 1)
  	{
! 	  OLSR_PRINTF(3, "Alias list for %s: ", ip_to_string(&mmsg->mid_origaddr.v4))
! 	  OLSR_PRINTF(3, "%s", ip_to_string(&mmsg->addr.v4))
  	  alias_tmp = mmsg->mid_addr;
  	  while(alias_tmp)
  	    {
! 	      OLSR_PRINTF(3, " - %s", ip_to_string(&alias_tmp->alias_addr.v4))
  	      alias_tmp = alias_tmp->next;
  	    }
! 	  OLSR_PRINTF(3, "\n")
  	}
      }
--- 231,243 ----
        if(olsr_cnf->debug_level > 1)
  	{
! 	  OLSR_PRINTF(3, "Alias list for %s: ", ip_to_string(&mmsg->mid_origaddr.v4));
! 	  OLSR_PRINTF(3, "%s", ip_to_string(&mmsg->addr.v4));
  	  alias_tmp = mmsg->mid_addr;
  	  while(alias_tmp)
  	    {
! 	      OLSR_PRINTF(3, " - %s", ip_to_string(&alias_tmp->alias_addr.v4));
  	      alias_tmp = alias_tmp->next;
  	    }
! 	  OLSR_PRINTF(3, "\n");
  	}
      }
***************
*** 283,296 ****
        if(olsr_cnf->debug_level > 1)
  	{
! 	  OLSR_PRINTF(3, "Alias list for %s", ip6_to_string(&mmsg->mid_origaddr.v6))
! 	  OLSR_PRINTF(3, "%s", ip6_to_string(&mmsg->addr.v6))
  
  	  alias_tmp = mmsg->mid_addr;
  	  while(alias_tmp)
  	    {
! 	      OLSR_PRINTF(3, " - %s", ip6_to_string(&alias_tmp->alias_addr.v6))
  	      alias_tmp = alias_tmp->next;
  	    }
! 	  OLSR_PRINTF(3, "\n")
  	}
      }
--- 283,296 ----
        if(olsr_cnf->debug_level > 1)
  	{
! 	  OLSR_PRINTF(3, "Alias list for %s", ip6_to_string(&mmsg->mid_origaddr.v6));
! 	  OLSR_PRINTF(3, "%s", ip6_to_string(&mmsg->addr.v6));
  
  	  alias_tmp = mmsg->mid_addr;
  	  while(alias_tmp)
  	    {
! 	      OLSR_PRINTF(3, " - %s", ip6_to_string(&alias_tmp->alias_addr.v6));
  	      alias_tmp = alias_tmp->next;
  	    }
! 	  OLSR_PRINTF(3, "\n");
  	}
      }
***************
*** 382,386 ****
        hmsg->willingness = m->v4.message.hello.willingness;
  
!       OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime)
  
        for (hinf = m->v4.message.hello.hell_info; 
--- 382,386 ----
        hmsg->willingness = m->v4.message.hello.willingness;
  
!       OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime);
  
        for (hinf = m->v4.message.hello.hell_info; 
***************
*** 426,430 ****
        hmsg->willingness = m->v6.message.hello.willingness;
  
!       OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime)
  
  
--- 426,430 ----
        hmsg->willingness = m->v6.message.hello.willingness;
  
!       OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime);
  
  
***************
*** 499,503 ****
        tmsg->vtime = ME_TO_DOUBLE(m->v4.olsr_vtime);
  
!       OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime)
  
        COPY_IP(&tmsg->originator, &m->v4.originator);
--- 499,503 ----
        tmsg->vtime = ME_TO_DOUBLE(m->v4.olsr_vtime);
  
!       OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime);
  
        COPY_IP(&tmsg->originator, &m->v4.originator);
***************
*** 541,545 ****
        tmsg->vtime = ME_TO_DOUBLE(m->v6.olsr_vtime);
  
!       OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime)
  
        COPY_IP(&tmsg->originator, &m->v6.originator);
--- 541,545 ----
        tmsg->vtime = ME_TO_DOUBLE(m->v6.olsr_vtime);
  
!       OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime);
  
        COPY_IP(&tmsg->originator, &m->v6.originator);

Index: hna_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/hna_set.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** hna_set.c	20 Apr 2007 13:46:04 -0000	1.18
--- hna_set.c	25 Apr 2007 22:08:08 -0000	1.19
***************
*** 129,133 ****
    olsr_u32_t hash;
  
!   //OLSR_PRINTF(5, "TC: lookup entry\n")
  
    hash = olsr_hashing(gw);
--- 129,133 ----
    olsr_u32_t hash;
  
!   //OLSR_PRINTF(5, "TC: lookup entry\n");
  
    hash = olsr_hashing(gw);
***************
*** 328,337 ****
                nowtm->tm_min,
                nowtm->tm_sec,
! 	      (int)now.tv_usec/10000)
    
    if(olsr_cnf->ip_version == AF_INET)
!     OLSR_PRINTF(1, "IP net          netmask         GW IP\n")
    else
!     OLSR_PRINTF(1, "IP net/prefixlen               GW IP\n")
  
    for(index=0;index<HASHSIZE;index++)
--- 328,337 ----
                nowtm->tm_min,
                nowtm->tm_sec,
! 	      (int)now.tv_usec/10000);
    
    if(olsr_cnf->ip_version == AF_INET)
!     OLSR_PRINTF(1, "IP net          netmask         GW IP\n");
    else
!     OLSR_PRINTF(1, "IP net/prefixlen               GW IP\n");
  
    for(index=0;index<HASHSIZE;index++)
***************
*** 348,359 ****
  	      if(olsr_cnf->ip_version == AF_INET)
  		{
! 		  OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string(&tmp_net->A_network_addr))
! 		  OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string((union olsr_ip_addr *)&tmp_net->A_netmask.v4))
! 		  OLSR_PRINTF(1, "%-15s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr))
  		}
  	      else
  		{
! 		  OLSR_PRINTF(1, "%-27s/%d", olsr_ip_to_string(&tmp_net->A_network_addr), tmp_net->A_netmask.v6)
! 		  OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr))
  		}
  
--- 348,359 ----
  	      if(olsr_cnf->ip_version == AF_INET)
  		{
! 		  OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string(&tmp_net->A_network_addr));
! 		  OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string((union olsr_ip_addr *)&tmp_net->A_netmask.v4));
! 		  OLSR_PRINTF(1, "%-15s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr));
  		}
  	      else
  		{
! 		  OLSR_PRINTF(1, "%-27s/%d", olsr_ip_to_string(&tmp_net->A_network_addr), tmp_net->A_netmask.v6);
! 		  OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr));
  		}
  

Index: two_hop_neighbor_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/two_hop_neighbor_table.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** two_hop_neighbor_table.c	20 Apr 2007 13:46:04 -0000	1.17
--- two_hop_neighbor_table.c	25 Apr 2007 22:08:17 -0000	1.18
***************
*** 251,257 ****
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec)
  
!   OLSR_PRINTF(1, "IP addr (2-hop)  IP addr (1-hop)  TLQ\n")
  
    for (i = 0; i < HASHSIZE; i++)
--- 251,257 ----
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec);
  
!   OLSR_PRINTF(1, "IP addr (2-hop)  IP addr (1-hop)  TLQ\n");
  
    for (i = 0; i < HASHSIZE; i++)
***************
*** 273,282 ****
                  {
                    OLSR_PRINTF(1, "%-15s  ",
!                               olsr_ip_to_string(&neigh2->neighbor_2_addr))
                    first = OLSR_FALSE;
                  }
  
                else
!                 OLSR_PRINTF(1, "                 ")
  
                total_lq = entry->path_link_quality;
--- 273,282 ----
                  {
                    OLSR_PRINTF(1, "%-15s  ",
!                               olsr_ip_to_string(&neigh2->neighbor_2_addr));
                    first = OLSR_FALSE;
                  }
  
                else
!                 OLSR_PRINTF(1, "                 ");
  
                total_lq = entry->path_link_quality;
***************
*** 284,288 ****
                OLSR_PRINTF(1, "%-15s  %5.3f\n",
                            olsr_ip_to_string(&neigh->neighbor_main_addr),
!                           total_lq)
              }
  	}
--- 284,288 ----
                OLSR_PRINTF(1, "%-15s  %5.3f\n",
                            olsr_ip_to_string(&neigh->neighbor_main_addr),
!                           total_lq);
              }
  	}

Index: link_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** link_set.c	20 Apr 2007 13:46:04 -0000	1.67
--- link_set.c	25 Apr 2007 22:08:09 -0000	1.68
***************
*** 146,150 ****
  	{
  #ifdef DEBUG
! 	  OLSR_PRINTF(3, "HYST[%s]: Setting to HIDE\n", olsr_ip_to_string(&entry->neighbor_iface_addr))
  #endif
  	  return HIDE_LINK;
--- 146,150 ----
  	{
  #ifdef DEBUG
! 	  OLSR_PRINTF(3, "HYST[%s]: Setting to HIDE\n", olsr_ip_to_string(&entry->neighbor_iface_addr));
  #endif
  	  return HIDE_LINK;
***************
*** 471,475 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(1, "Adding %s=>%s to link set\n", olsr_ip_to_string(local), olsr_ip_to_string(remote))
  #endif
  
--- 471,475 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(1, "Adding %s=>%s to link set\n", olsr_ip_to_string(local), olsr_ip_to_string(remote));
  #endif
  
***************
*** 562,566 ****
        neighbor = olsr_insert_neighbor_table(remote_main);
  #ifdef DEBUG
!       OLSR_PRINTF(3, "ADDING NEW NEIGHBOR ENTRY %s FROM LINK SET\n", olsr_ip_to_string(remote_main))
  #endif
      }
--- 562,566 ----
        neighbor = olsr_insert_neighbor_table(remote_main);
  #ifdef DEBUG
!       OLSR_PRINTF(3, "ADDING NEW NEIGHBOR ENTRY %s FROM LINK SET\n", olsr_ip_to_string(remote_main));
  #endif
      }
***************
*** 588,597 ****
         * enough in most cases. 10 seconds
         */
      /* Erik Tromp - commented out. It is not RFC-compliant. Also, MID aliases
       * that are not explicitly declared by a node will be removed as soon as
       * the olsr_prune_aliases(...) function is called.
       *
!      * OLSR_PRINTF(1, "Adding MID alias main %s ", olsr_ip_to_string(remote_main))
!      * OLSR_PRINTF(1, "-> %s based on HELLO\n\n", olsr_ip_to_string(remote))
       * insert_mid_alias(remote_main, remote, MID_ALIAS_HACK_VTIME);
       */
--- 588,598 ----
         * enough in most cases. 10 seconds
         */
+ 
      /* Erik Tromp - commented out. It is not RFC-compliant. Also, MID aliases
       * that are not explicitly declared by a node will be removed as soon as
       * the olsr_prune_aliases(...) function is called.
       *
!      * OLSR_PRINTF(1, "Adding MID alias main %s ", olsr_ip_to_string(remote_main));
!      * OLSR_PRINTF(1, "-> %s based on HELLO\n\n", olsr_ip_to_string(remote));
       * insert_mid_alias(remote_main, remote, MID_ALIAS_HACK_VTIME);
       */
***************
*** 911,915 ****
  	{
  	  tmp_link_set->L_link_quality = olsr_hyst_calc_instability(tmp_link_set->L_link_quality);
! 	  OLSR_PRINTF(1, "HYST[%s] HELLO timeout %0.3f\n", olsr_ip_to_string(&tmp_link_set->neighbor_iface_addr), tmp_link_set->L_link_quality)
  	  /* Update hello_timeout - NO SLACK THIS TIME */
  	  tmp_link_set->hello_timeout = GET_TIMESTAMP(tmp_link_set->last_htime*1000);
--- 912,916 ----
  	{
  	  tmp_link_set->L_link_quality = olsr_hyst_calc_instability(tmp_link_set->L_link_quality);
! 	  OLSR_PRINTF(1, "HYST[%s] HELLO timeout %0.3f\n", olsr_ip_to_string(&tmp_link_set->neighbor_iface_addr), tmp_link_set->L_link_quality);
  	  /* Update hello_timeout - NO SLACK THIS TIME */
  	  tmp_link_set->hello_timeout = GET_TIMESTAMP(tmp_link_set->last_htime*1000);
***************
*** 943,951 ****
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec/10000)
  
    if (olsr_cnf->ip_version == AF_INET)
    {
!     OLSR_PRINTF(1, "IP address       hyst   LQ     lost   total  NLQ    ETX\n")
      fstr = "%-15s  %5.3f  %5.3f  %-3d    %-3d    %5.3f  %.2f\n";
    }
--- 944,952 ----
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec/10000);
  
    if (olsr_cnf->ip_version == AF_INET)
    {
!     OLSR_PRINTF(1, "IP address       hyst   LQ     lost   total  NLQ    ETX\n");
      fstr = "%-15s  %5.3f  %5.3f  %-3d    %-3d    %5.3f  %.2f\n";
    }
***************
*** 953,957 ****
    else
    {
!     OLSR_PRINTF(1, "IP address                               hyst   LQ     lost   total  NLQ    ETX\n")
      fstr = "%-39s  %5.3f  %5.3f  %-3d    %-3d    %5.3f  %.2f\n";
    }
--- 954,958 ----
    else
    {
!     OLSR_PRINTF(1, "IP address                               hyst   LQ     lost   total  NLQ    ETX\n");
      fstr = "%-39s  %5.3f  %5.3f  %-3d    %-3d    %5.3f  %.2f\n";
    }
***************
*** 971,975 ****
                  walker->L_link_quality, walker->loss_link_quality,
  		walker->lost_packets, walker->total_packets,
! 		walker->neigh_link_quality, etx)
    }
  }
--- 972,976 ----
                  walker->L_link_quality, walker->loss_link_quality,
  		walker->lost_packets, walker->total_packets,
! 		walker->neigh_link_quality, etx);
    }
  }
***************
*** 1060,1064 ****
  
        else
!         OLSR_PRINTF(3, "Skipping Dijkstra (1)\n")
  
        // create a new ANSN
--- 1061,1065 ----
  
        else
!         OLSR_PRINTF(3, "Skipping Dijkstra (1)\n");
  
        // create a new ANSN

Index: process_routes.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** process_routes.c	20 Apr 2007 13:46:04 -0000	1.31
--- process_routes.c	25 Apr 2007 22:08:13 -0000	1.32
***************
*** 318,328 ****
    struct destination_n *tmp;
  
!   OLSR_PRINTF(1, "Deleting all routes...\n")
    delete_kernel_list = olsr_build_update_list(hna_routes, old_hna);
!   OLSR_PRINTF(1, "HNA list:\n")
    for(tmp = delete_kernel_list;tmp;tmp = tmp->next)
      {
        union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst;
!       OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr))
      }
  
--- 318,330 ----
    struct destination_n *tmp;
  
!   OLSR_PRINTF(1, "Deleting all routes...\n");
! 
    delete_kernel_list = olsr_build_update_list(hna_routes, old_hna);
! 
!   OLSR_PRINTF(1, "HNA list:\n");
    for(tmp = delete_kernel_list;tmp;tmp = tmp->next)
      {
        union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst;
!       OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr));
      }
  
***************
*** 331,339 ****
    delete_kernel_list = olsr_build_update_list(routingtable,old_routes);
  
!   OLSR_PRINTF(1, "Route list:\n")
    for(tmp = delete_kernel_list;tmp;tmp = tmp->next)
      {
        union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst;
!       OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr))      
      }
    olsr_delete_routes_from_kernel(delete_kernel_list);
--- 333,341 ----
    delete_kernel_list = olsr_build_update_list(routingtable,old_routes);
  
!   OLSR_PRINTF(1, "Route list:\n");
    for(tmp = delete_kernel_list;tmp;tmp = tmp->next)
      {
        union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst;
!       OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr));
      }
    olsr_delete_routes_from_kernel(delete_kernel_list);
***************
*** 354,358 ****
    struct destination_n *add_kernel_list;
  
!   OLSR_PRINTF(3, "Updating kernel routes...\n")
    delete_kernel_list = olsr_build_update_list(old_routes, routingtable);
    add_kernel_list = olsr_build_update_list(routingtable, old_routes);
--- 356,360 ----
    struct destination_n *add_kernel_list;
  
!   OLSR_PRINTF(3, "Updating kernel routes...\n");
    delete_kernel_list = olsr_build_update_list(old_routes, routingtable);
    add_kernel_list = olsr_build_update_list(routingtable, old_routes);
***************
*** 376,380 ****
    struct destination_n *add_kernel_list;
  
!   OLSR_PRINTF(3, "Updating kernel HNA routes...\n")
  
    delete_kernel_list = olsr_build_update_list(old_hna, hna_routes);
--- 378,382 ----
    struct destination_n *add_kernel_list;
  
!   OLSR_PRINTF(3, "Updating kernel HNA routes...\n");
  
    delete_kernel_list = olsr_build_update_list(old_hna, hna_routes);
***************
*** 449,453 ****
  #ifdef DEBUG
    OLSR_PRINTF(3, "%s highest metric %d\n",
! 	      __func__, metric_counter)
  #endif
   
--- 451,455 ----
  #ifdef DEBUG
    OLSR_PRINTF(3, "%s highest metric %d\n",
! 	      __func__, metric_counter);
  #endif
   
***************
*** 479,483 ****
  		  OLSR_PRINTF(3, "Deleting route to %s hopcount %d\n",
  			      olsr_ip_to_string(&destination_ptr->destination->rt_dst),
! 			      destination_ptr->destination->rt_metric)
  #endif
  		    if(!olsr_cnf->host_emul)
--- 481,485 ----
  		  OLSR_PRINTF(3, "Deleting route to %s hopcount %d\n",
  			      olsr_ip_to_string(&destination_ptr->destination->rt_dst),
! 			      destination_ptr->destination->rt_metric);
  #endif
  		    if(!olsr_cnf->host_emul)
***************
*** 490,495 ****
  			if(error < 0)
  			  {
! 			    OLSR_PRINTF(1, "Delete route(%s):%s\n", olsr_ip_to_string(&destination_ptr->destination->rt_dst), strerror(errno))
! 			      olsr_syslog(OLSR_LOG_ERR, "Delete route:%m");
  			  }
  		    }
--- 492,498 ----
  			if(error < 0)
  			  {
!                             const char * const err_msg = strerror(errno);
! 			    OLSR_PRINTF(1, "Delete route(%s):%s\n", olsr_ip_to_string(&destination_ptr->destination->rt_dst), err_msg);
!                             olsr_syslog(OLSR_LOG_ERR, "Delete route:%s", err_msg);
  			  }
  		    }
***************
*** 564,568 ****
  	      OLSR_PRINTF(3, "Adding route to %s hopcount %d\n",
  			  olsr_ip_to_string(&destination_kernel->destination->rt_dst),
! 			  destination_kernel->destination->rt_metric)
  #endif
  			  
--- 567,571 ----
  	      OLSR_PRINTF(3, "Adding route to %s hopcount %d\n",
  			  olsr_ip_to_string(&destination_kernel->destination->rt_dst),
! 			  destination_kernel->destination->rt_metric);
  #endif
  			  
***************
*** 576,581 ****
  		    if(error < 0)
  		      {
! 			OLSR_PRINTF(1, "Add route(%s): %s\n", olsr_ip_to_string(&destination_kernel->destination->rt_dst), strerror(errno))
! 			  olsr_syslog(OLSR_LOG_ERR, "Add route:%m");
  		      }
  		  }
--- 579,585 ----
  		    if(error < 0)
  		      {
!                         const char * const err_msg = strerror(errno);
! 			OLSR_PRINTF(1, "Add route(%s): %s\n", olsr_ip_to_string(&destination_kernel->destination->rt_dst), err_msg);
!                         olsr_syslog(OLSR_LOG_ERR, "Add route:%s", err_msg);
  		      }
  		  }

Index: neighbor_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/neighbor_table.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** neighbor_table.c	20 Apr 2007 13:46:04 -0000	1.31
--- neighbor_table.c	25 Apr 2007 22:08:09 -0000	1.32
***************
*** 468,481 ****
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec/10000)
  
    if (olsr_cnf->ip_version == AF_INET)
      {
!       OLSR_PRINTF(1, "IP address       LQ     NLQ    SYM   MPR   MPRS  will\n")
        fstr = "%-15s  %5.3f  %5.3f  %s  %s  %s  %d\n";
      }
    else
      {
!       OLSR_PRINTF(1, "IP address                               LQ     NLQ    SYM   MPR   MPRS  will\n")
        fstr = "%-39s  %5.3f  %5.3f  %s  %s  %s  %d\n";
      }
--- 468,481 ----
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec/10000);
  
    if (olsr_cnf->ip_version == AF_INET)
      {
!       OLSR_PRINTF(1, "IP address       LQ     NLQ    SYM   MPR   MPRS  will\n");
        fstr = "%-15s  %5.3f  %5.3f  %s  %s  %s  %d\n";
      }
    else
      {
!       OLSR_PRINTF(1, "IP address                               LQ     NLQ    SYM   MPR   MPRS  will\n");
        fstr = "%-39s  %5.3f  %5.3f  %s  %s  %s  %d\n";
      }
***************
*** 497,501 ****
                            neigh->is_mpr ? "YES " : "NO  ", 
                            olsr_lookup_mprs_set(&neigh->neighbor_main_addr) == NULL ? "NO  " : "YES ",
!                           neigh->willingness)
              }
          }
--- 497,501 ----
                            neigh->is_mpr ? "YES " : "NO  ", 
                            olsr_lookup_mprs_set(&neigh->neighbor_main_addr) == NULL ? "NO  " : "YES ",
!                           neigh->willingness);
              }
          }

Index: interfaces.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** interfaces.c	20 Apr 2007 13:46:04 -0000	1.30
--- interfaces.c	25 Apr 2007 22:08:08 -0000	1.31
***************
*** 102,106 ****
      }
  
!   OLSR_PRINTF(1, "\n ---- Interface configuration ---- \n\n")
      /* Run trough all interfaces immedeatly */
      for(tmp_if = olsr_cnf->interfaces; tmp_if != NULL; tmp_if = tmp_if->next)
--- 102,106 ----
      }
  
!   OLSR_PRINTF(1, "\n ---- Interface configuration ---- \n\n");
      /* Run trough all interfaces immedeatly */
      for(tmp_if = olsr_cnf->interfaces; tmp_if != NULL; tmp_if = tmp_if->next)

Index: olsr_types.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_types.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** olsr_types.h	20 Apr 2007 13:46:04 -0000	1.6
--- olsr_types.h	25 Apr 2007 22:08:09 -0000	1.7
***************
*** 51,59 ****
  #include <sys/types.h>
  
! typedef enum
! {
      OLSR_FALSE = 0,
      OLSR_TRUE
! }olsr_bool;
  
  #if defined linux || defined __MacOSX__
--- 51,58 ----
  #include <sys/types.h>
  
! typedef enum {
      OLSR_FALSE = 0,
      OLSR_TRUE
! } olsr_bool;
  
  #if defined linux || defined __MacOSX__

Index: socket_parser.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/socket_parser.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** socket_parser.c	20 Apr 2007 13:46:04 -0000	1.24
--- socket_parser.c	25 Apr 2007 22:08:17 -0000	1.25
***************
*** 82,86 ****
        return;
      }
!   OLSR_PRINTF(2, "Adding OLSR socket entry %d\n", fd)
  
    new_entry = olsr_malloc(sizeof(struct olsr_socket_entry), "Socket entry");
--- 82,86 ----
        return;
      }
!   OLSR_PRINTF(2, "Adding OLSR socket entry %d\n", fd);
  
    new_entry = olsr_malloc(sizeof(struct olsr_socket_entry), "Socket entry");
***************
*** 115,119 ****
        return 0;
      }
!   OLSR_PRINTF(1, "Removing OLSR socket entry %d\n", fd)
  
    entry = olsr_socket_entries;
--- 115,119 ----
        return 0;
      }
!   OLSR_PRINTF(1, "Removing OLSR socket entry %d\n", fd);
  
    entry = olsr_socket_entries;
***************
*** 186,194 ****
    if (n < 0) 
      {
!       if(errno == EINTR)
! 	return;
! 
!       olsr_syslog(OLSR_LOG_ERR, "select: %m");
!       OLSR_PRINTF(1, "Error select: %s", strerror(errno))
        return;
      }
--- 186,194 ----
    if (n < 0) 
      {
!       if(errno != EINTR) {
!         const char * const err_msg = strerror(errno);
!         olsr_syslog(OLSR_LOG_ERR, "select: %s", err_msg);
!         OLSR_PRINTF(1, "Error select: %s", err_msg);
!       }
        return;
      }

Index: duplicate_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/duplicate_set.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** duplicate_set.c	20 Apr 2007 13:46:04 -0000	1.14
--- duplicate_set.c	25 Apr 2007 22:08:07 -0000	1.15
***************
*** 62,66 ****
    int i;
  
!   OLSR_PRINTF(3, "Initializing duplicatetable - hashsize %d\n", HASHSIZE)
  
    /* Since the holdingtime is rather large for duplicate
--- 62,66 ----
    int i;
  
!   OLSR_PRINTF(3, "Initializing duplicatetable - hashsize %d\n", HASHSIZE);
  
    /* Since the holdingtime is rather large for duplicate
***************
*** 243,247 ****
  	      OLSR_PRINTF(5, "DUP TIMEOUT[%s] s: %d\n", 
  		          olsr_ip_to_string(&tmp_dup_table->addr),
! 		          tmp_dup_table->seqno)
  #endif
  	      tmp_dup_table = tmp_dup_table->next;
--- 243,247 ----
  	      OLSR_PRINTF(5, "DUP TIMEOUT[%s] s: %d\n", 
  		          olsr_ip_to_string(&tmp_dup_table->addr),
! 		          tmp_dup_table->seqno);
  #endif
  	      tmp_dup_table = tmp_dup_table->next;
***************
*** 333,337 ****
    
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Setting DUP %s/%d forwarded\n", olsr_ip_to_string(&tmp_dup_table->addr), seqno)
  #endif
  
--- 333,337 ----
    
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Setting DUP %s/%d forwarded\n", olsr_ip_to_string(&tmp_dup_table->addr), seqno);
  #endif
  

Index: plugin_loader.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_loader.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** plugin_loader.c	20 Apr 2007 13:46:04 -0000	1.24
--- plugin_loader.c	25 Apr 2007 22:08:13 -0000	1.25
***************
*** 65,73 ****
    struct plugin_entry *entry = olsr_cnf->plugins;
    int loaded = 0;
!   OLSR_PRINTF(1, "Loading plugins...\n\n")
    while(entry)
      {  
        if(olsr_load_dl(entry->name, entry->params) < 0)
! 	OLSR_PRINTF(1, "-- PLUGIN LOADING FAILED! --\n\n")
        else
  	loaded++;
--- 65,73 ----
    struct plugin_entry *entry = olsr_cnf->plugins;
    int loaded = 0;
!   OLSR_PRINTF(1, "Loading plugins...\n\n");
    while(entry)
      {  
        if(olsr_load_dl(entry->name, entry->params) < 0)
! 	OLSR_PRINTF(1, "-- PLUGIN LOADING FAILED! --\n\n");
        else
  	loaded++;
***************
*** 94,116 ****
    int *interface_version;
  
!   OLSR_PRINTF(1, "---------- Plugin loader ----------\nLibrary: %s\n", libname)
  
    if((new_entry.dlhandle = dlopen(libname, RTLD_NOW)) == NULL)
      {
!       OLSR_PRINTF(1, "DL loading failed: \"%s\"!\n", dlerror())
        return -1;
      }
  
    /* Fetch the interface version function, 3 different ways */
!   OLSR_PRINTF(1, "Checking plugin interface version... ")
    if((get_interface_version = dlsym(new_entry.dlhandle, "olsrd_plugin_interface_version")) == NULL)
      {
!       OLSR_PRINTF(1, "trying v2 detection... ")
        if((get_interface_version = dlsym(new_entry.dlhandle, "get_plugin_interface_version")) == NULL)
          {
!           OLSR_PRINTF(1, "trying v1 detection... ")
            if((interface_version = dlsym(new_entry.dlhandle, "plugin_interface_version")) == NULL)
              {
!               OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror())
                dlclose(new_entry.dlhandle);
                return -1;
--- 94,116 ----
    int *interface_version;
  
!   OLSR_PRINTF(1, "---------- Plugin loader ----------\nLibrary: %s\n", libname);
  
    if((new_entry.dlhandle = dlopen(libname, RTLD_NOW)) == NULL)
      {
!       OLSR_PRINTF(1, "DL loading failed: \"%s\"!\n", dlerror());
        return -1;
      }
  
    /* Fetch the interface version function, 3 different ways */
!   OLSR_PRINTF(1, "Checking plugin interface version... ");
    if((get_interface_version = dlsym(new_entry.dlhandle, "olsrd_plugin_interface_version")) == NULL)
      {
!       OLSR_PRINTF(1, "trying v2 detection... ");
        if((get_interface_version = dlsym(new_entry.dlhandle, "get_plugin_interface_version")) == NULL)
          {
!           OLSR_PRINTF(1, "trying v1 detection... ");
            if((interface_version = dlsym(new_entry.dlhandle, "plugin_interface_version")) == NULL)
              {
!               OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror());
                dlclose(new_entry.dlhandle);
                return -1;
***************
*** 130,134 ****
        new_entry.plugin_interface_version = get_interface_version();
      }
!   OLSR_PRINTF(1, " %d - OK\n", new_entry.plugin_interface_version)
    
    if ( new_entry.plugin_interface_version < 4 ) 
--- 130,134 ----
        new_entry.plugin_interface_version = get_interface_version();
      }
!   OLSR_PRINTF(1, " %d - OK\n", new_entry.plugin_interface_version);
    
    if ( new_entry.plugin_interface_version < 4 ) 
***************
*** 136,140 ****
        /* old plugin interface */
     
!       OLSR_PRINTF(1, "\nWARNING: YOU ARE USING AN OLD DEPRECATED PLUGIN INTERFACE! DETECTED VERSION %d CURRENT VERSION %d\nPLEASE UPGRADE YOUR PLUGIN!\nWILL CONTINUE IN 5 SECONDS...\n\n", new_entry.plugin_interface_version, OLSRD_PLUGIN_INTERFACE_VERSION)
        
        sleep(5);
--- 136,140 ----
        /* old plugin interface */
     
!       OLSR_PRINTF(1, "\nWARNING: YOU ARE USING AN OLD DEPRECATED PLUGIN INTERFACE! DETECTED VERSION %d CURRENT VERSION %d\nPLEASE UPGRADE YOUR PLUGIN!\nWILL CONTINUE IN 5 SECONDS...\n\n", new_entry.plugin_interface_version, OLSRD_PLUGIN_INTERFACE_VERSION);
        
        sleep(5);
***************
*** 148,160 ****
        if ( new_entry.plugin_interface_version != OLSRD_PLUGIN_INTERFACE_VERSION ) 
          {
!           OLSR_PRINTF(1, "\n\nWARNING: VERSION MISSMATCH! DETECTED %d CURRENT VERSION %d\nTHIS CAN CAUSE UNEXPECTED BEHAVIOUR AND CRASHES!\nWILL CONTINUE IN 5 SECONDS...\n\n", get_interface_version(), OLSRD_PLUGIN_INTERFACE_VERSION)
            sleep(5);
          }
     
        /* Fetch the init function */
!       OLSR_PRINTF(1, "Trying to fetch plugin init function... ")
        if((new_entry.plugin_init = dlsym(new_entry.dlhandle, "olsrd_plugin_init")) == NULL)
          {
!           OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror())
            dlclose(new_entry.dlhandle);
            return -1;
--- 148,160 ----
        if ( new_entry.plugin_interface_version != OLSRD_PLUGIN_INTERFACE_VERSION ) 
          {
!           OLSR_PRINTF(1, "\n\nWARNING: VERSION MISSMATCH! DETECTED %d CURRENT VERSION %d\nTHIS CAN CAUSE UNEXPECTED BEHAVIOUR AND CRASHES!\nWILL CONTINUE IN 5 SECONDS...\n\n", get_interface_version(), OLSRD_PLUGIN_INTERFACE_VERSION);
            sleep(5);
          }
     
        /* Fetch the init function */
!       OLSR_PRINTF(1, "Trying to fetch plugin init function... ");
        if((new_entry.plugin_init = dlsym(new_entry.dlhandle, "olsrd_plugin_init")) == NULL)
          {
!           OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror());
            dlclose(new_entry.dlhandle);
            return -1;
***************
*** 162,175 ****
        else
  	{
! 	  OLSR_PRINTF(1, "OK\n")	
  	}
      }
  
    /* Fetch the parameter function */
!   OLSR_PRINTF(1, "Trying to fetch param function... ")
    if((new_entry.register_param = dlsym(new_entry.dlhandle, "olsrd_plugin_register_param")) == NULL)
!     OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror())
    else
!     OLSR_PRINTF(1, "OK\n")
  
    entry = olsr_malloc(sizeof(struct olsr_plugin), "Plugin entry");
--- 162,175 ----
        else
  	{
! 	  OLSR_PRINTF(1, "OK\n");
  	}
      }
  
    /* Fetch the parameter function */
!   OLSR_PRINTF(1, "Trying to fetch param function... ");
    if((new_entry.register_param = dlsym(new_entry.dlhandle, "olsrd_plugin_register_param")) == NULL)
!     OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror());
    else
!     OLSR_PRINTF(1, "OK\n");
  
    entry = olsr_malloc(sizeof(struct olsr_plugin), "Plugin entry");
***************
*** 184,188 ****
    olsr_plugins = entry;
  
!   OLSR_PRINTF(1, "---------- LIBRARY LOADED ----------\n\n")
  
    return 0;
--- 184,188 ----
    olsr_plugins = entry;
  
!   OLSR_PRINTF(1, "---------- LIBRARY LOADED ----------\n\n");
  
    return 0;
***************
*** 206,214 ****
      {
        struct plugin_param *params;
!       OLSR_PRINTF(1, "Sending parameters...\n")
          for(params = entry->params;params;params = params->next)
          {
            int retval = entry->register_param(params->key, params->value);
!           OLSR_PRINTF(1, "\"%s\"/\"%s\"... ", params->key, params->value)
            if(retval < 0)
              {
--- 206,214 ----
      {
        struct plugin_param *params;
!       OLSR_PRINTF(1, "Sending parameters...\n");
          for(params = entry->params;params;params = params->next)
          {
            int retval = entry->register_param(params->key, params->value);
!           OLSR_PRINTF(1, "\"%s\"/\"%s\"... ", params->key, params->value);
            if(retval < 0)
              {
***************
*** 216,224 ****
                exit(EXIT_FAILURE);
              }
!           OLSR_PRINTF(1, "%s\n", retval == 0 ? "FAILED" : "OK")
          }
      }
      
!     OLSR_PRINTF(1, "Running plugin_init function...\n")
      entry->plugin_init();
  }
--- 216,224 ----
                exit(EXIT_FAILURE);
              }
!           OLSR_PRINTF(1, "%s\n", retval == 0 ? "FAILED" : "OK");
          }
      }
      
!   OLSR_PRINTF(1, "Running plugin_init function...\n");
      entry->plugin_init();
  }
***************
*** 233,237 ****
    struct olsr_plugin *entry;
  
!   OLSR_PRINTF(1, "Closing plugins...\n")
    for(entry = olsr_plugins; entry != NULL; entry = entry->next)
        dlclose(entry->dlhandle);
--- 233,237 ----
    struct olsr_plugin *entry;
  
!   OLSR_PRINTF(1, "Closing plugins...\n");
    for(entry = olsr_plugins; entry != NULL; entry = entry->next)
        dlclose(entry->dlhandle);

Index: lq_route.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** lq_route.c	29 Mar 2007 00:05:50 -0000	1.45
--- lq_route.c	25 Apr 2007 22:08:09 -0000	1.46
***************
*** 595,599 ****
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec/10000)
  
    for (node = list_get_next(node); node != NULL; node = list_get_next(node))
--- 595,599 ----
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec/10000);
  
    for (node = list_get_next(node); node != NULL; node = list_get_next(node))
***************
*** 610,614 ****
      {
        OLSR_PRINTF(2, "%s:%s <- ", olsr_ip_to_string(&walker->addr),
!                   etx_to_string(walker->path_etx))
        hops++;
      }
--- 610,614 ----
      {
        OLSR_PRINTF(2, "%s:%s <- ", olsr_ip_to_string(&walker->addr),
!                   etx_to_string(walker->path_etx));
        hops++;
      }
***************
*** 619,623 ****
      {
        OLSR_PRINTF(2, "%s:%s (one-hop)\n", olsr_ip_to_string(&walker->addr),
!                   etx_to_string(walker->path_etx))
  
        // node reachable => add to the set of unprocessed nodes
--- 619,623 ----
      {
        OLSR_PRINTF(2, "%s:%s (one-hop)\n", olsr_ip_to_string(&walker->addr),
!                   etx_to_string(walker->path_etx));
  
        // node reachable => add to the set of unprocessed nodes
***************
*** 629,633 ****
      else
      {
!       OLSR_PRINTF(2, "%s FAILED\n", olsr_ip_to_string(&vert->addr))
        continue;
      }
--- 629,633 ----
      else
      {
!       OLSR_PRINTF(2, "%s FAILED\n", olsr_ip_to_string(&vert->addr));
        continue;
      }

Index: net_olsr.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** net_olsr.h	20 Apr 2007 13:46:04 -0000	1.8
--- net_olsr.h	25 Apr 2007 22:08:09 -0000	1.9
***************
*** 65,69 ****
  
  int
! net_outbuffer_bytes_left(struct interface *);
  
  olsr_u16_t
--- 65,69 ----
  
  int
! net_outbuffer_bytes_left(const struct interface *);
  
  olsr_u16_t
***************
*** 74,84 ****
  
  int
! net_outbuffer_push(struct interface *, olsr_u8_t *, olsr_u16_t);
  
  int
! net_outbuffer_push_reserved(struct interface *, olsr_u8_t *, olsr_u16_t);
  
  int
! net_output(struct interface*);
  
  int
--- 74,84 ----
  
  int
! net_outbuffer_push(struct interface *, const void *, const olsr_u16_t);
  
  int
! net_outbuffer_push_reserved(struct interface *, const void *, const olsr_u16_t);
  
  int
! net_output(struct interface *);
  
  int

Index: defs.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/defs.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** defs.h	20 Apr 2007 13:46:04 -0000	1.57
--- defs.h	25 Apr 2007 22:08:07 -0000	1.58
***************
*** 60,69 ****
  #include "olsr_cfg.h"
  
! #define SOFTWARE_VERSION "olsr.org - " VERSION
! #define OLSRD_VERSION_DATE "       *** " SOFTWARE_VERSION " (" __DATE__ ") ***\n"
  
  #ifndef OLSRD_GLOBAL_CONF_FILE
! #define OLSRD_CONF_FILE_NAME "olsrd.conf"
! #define OLSRD_GLOBAL_CONF_FILE "/etc/" OLSRD_CONF_FILE_NAME
  #endif
  
--- 60,69 ----
  #include "olsr_cfg.h"
  
! #define SOFTWARE_VERSION	"olsr.org - " VERSION
! #define OLSRD_VERSION_DATE	"       *** " SOFTWARE_VERSION " (" __DATE__ ") ***\n"
  
  #ifndef OLSRD_GLOBAL_CONF_FILE
! #define OLSRD_CONF_FILE_NAME	"olsrd.conf"
! #define OLSRD_GLOBAL_CONF_FILE	"/etc/" OLSRD_CONF_FILE_NAME
  #endif
  
***************
*** 72,81 ****
  #define UDP_IPV6_HDRSIZE        62
  
! #define MIN_PACKET_SIZE(ver)  (int)(sizeof(olsr_u8_t) * ((ver == AF_INET) ? 4 : 7))
  /* Debug helper macro */
  #ifdef DEBUG
! #define olsr_debug(lvl,format,args...) do {                         \
!    OLSR_PRINTF(lvl, "%s (%s:%d): ", __func__, __FILE__, __LINE__); \
!    OLSR_PRINTF(lvl, format, ##args); \
    } while (0)
  #endif
--- 72,81 ----
  #define UDP_IPV6_HDRSIZE        62
  
! #define MIN_PACKET_SIZE(ver)	((int)(sizeof(olsr_u8_t) * (((ver) == AF_INET) ? 4 : 7)))
  /* Debug helper macro */
  #ifdef DEBUG
! #define olsr_debug(lvl, format, args...) do {                           \
!     OLSR_PRINTF(lvl, "%s (%s:%d): ", __func__, __FILE__, __LINE__);     \
!     OLSR_PRINTF(lvl, (format), ##args);                                 \
    } while (0)
  #endif
***************
*** 84,107 ****
  
  #ifdef NODEBUG
! #define OLSR_PRINTF(lvl, format, args...) \
!    { }
  #else
! #define OLSR_PRINTF(lvl, format, args...) \
!    { \
!      if((olsr_cnf->debug_level >= lvl) && debug_handle) \
!         fprintf(debug_handle, format, ##args); \
!    }
  #endif
  
  /* Provides a timestamp s1 milliseconds in the future
     according to system ticks returned by times(2) */
! #define GET_TIMESTAMP(s1) \
!         (now_times + ((s1) / olsr_cnf->system_tick_divider))
  
! #define TIMED_OUT(s1) \
!         ((int)((s1) - now_times) < 0)
  
  
! #define ARRAYSIZE(x) (sizeof(x)/sizeof(*(x)))
  
  /*
--- 84,103 ----
  
  #ifdef NODEBUG
! #define OLSR_PRINTF(lvl, format, args...) do { } while(0)
  #else
! #define OLSR_PRINTF(lvl, format, args...) do {                  \
!     if((olsr_cnf->debug_level >= (lvl)) && debug_handle)          \
!       fprintf(debug_handle, (format), ##args);                    \
!   } while (0)
  #endif
  
  /* Provides a timestamp s1 milliseconds in the future
     according to system ticks returned by times(2) */
! #define GET_TIMESTAMP(s1)	(now_times + ((s1) / olsr_cnf->system_tick_divider))
  
! #define TIMED_OUT(s1)	((int)((s1) - now_times) < 0)
  
  
! #define ARRAYSIZE(x)	(sizeof(x)/sizeof(*(x)))
  
  /*
***************
*** 111,126 ****
  /* First "argument" is NOT a pointer! */
  
! #define QUEUE_ELEM(pre, new) \
!         pre.next->prev = new; \
!         new->next = pre.next; \
!         new->prev = ⪯ \
!         pre.next = new
  
! #define DEQUEUE_ELEM(elem) \
! 	elem->prev->next = elem->next; \
! 	elem->next->prev = elem->prev
  
  
! #define CLOSE(fd)  do { close(fd); (fd) = -1;} while (0)
  
  /*
--- 107,124 ----
  /* First "argument" is NOT a pointer! */
  
! #define QUEUE_ELEM(pre, new) do { \
!     pre.next->prev = new;         \
!     new->next = pre.next;         \
!     new->prev = ⪯             \
!     pre.next = new;               \
!   } while (0)
  
! #define DEQUEUE_ELEM(elem) do { \
!     elem->prev->next = elem->next;     \
!     elem->next->prev = elem->prev;     \
!   } while (0)
  
  
! #define CLOSE(fd)  do { close(fd); (fd) = -1; } while (0)
  
  /*

Index: packet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/packet.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** packet.c	7 Jan 2006 08:16:20 -0000	1.21
--- packet.c	25 Apr 2007 22:08:09 -0000	1.22
***************
*** 95,99 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "\tBuilding HELLO on interface %d\n", outif->if_nr)
  #endif
  
--- 95,99 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "\tBuilding HELLO on interface %d\n", outif->if_nr);
  #endif
  
***************
*** 107,111 ****
    message->willingness = olsr_cnf->willingness;
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Willingness: %d\n", olsr_cnf->willingness)
  #endif
  
--- 107,111 ----
    message->willingness = olsr_cnf->willingness;
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Willingness: %d\n", olsr_cnf->willingness);
  #endif
  
***************
*** 116,120 ****
  
  #ifdef DEBUG
!       OLSR_PRINTF(5, "On link:\n")
  #endif
  
--- 116,120 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(5, "On link:\n");
  #endif
  
***************
*** 194,199 ****
        COPY_IP(&message_neighbor->main_address, &links->neighbor->neighbor_main_addr);
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address))
!       OLSR_PRINTF(5, " status %d\n", message_neighbor->status)
  #endif
        message_neighbor->next=message->neighbors;
--- 194,199 ----
        COPY_IP(&message_neighbor->main_address, &links->neighbor->neighbor_main_addr);
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address));
!       OLSR_PRINTF(5, " status %d\n", message_neighbor->status);
  #endif
        message_neighbor->next=message->neighbors;
***************
*** 208,212 ****
  
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Not on link:\n")
  #endif
  
--- 208,212 ----
  
  #ifdef DEBUG
!     OLSR_PRINTF(5, "Not on link:\n");
  #endif
  
***************
*** 292,297 ****
  	    COPY_IP(&message_neighbor->main_address, &neighbor->neighbor_main_addr);
  #ifdef DEBUG
! 	    OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address))
! 	    OLSR_PRINTF(5, " status  %d\n", message_neighbor->status)
  #endif
  	    message_neighbor->next=message->neighbors;
--- 292,297 ----
  	    COPY_IP(&message_neighbor->main_address, &neighbor->neighbor_main_addr);
  #ifdef DEBUG
! 	    OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address));
! 	    OLSR_PRINTF(5, " status  %d\n", message_neighbor->status);
  #endif
  	    message_neighbor->next=message->neighbors;
***************
*** 429,433 ****
  	{
  	  /* Send empty TC */
! 	  OLSR_PRINTF(3, "No more MPR selectors - will send empty TCs\n")
  	  set_empty_tc_timer(GET_TIMESTAMP((olsr_cnf->max_tc_vtime*3)*1000));
  
--- 429,433 ----
  	{
  	  /* Send empty TC */
! 	  OLSR_PRINTF(3, "No more MPR selectors - will send empty TCs\n");
  	  set_empty_tc_timer(GET_TIMESTAMP((olsr_cnf->max_tc_vtime*3)*1000));
  

Index: process_package.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/process_package.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** process_package.c	20 Apr 2007 13:46:04 -0000	1.39
--- process_package.c	25 Apr 2007 22:08:13 -0000	1.40
***************
*** 135,139 ****
  
            else
!             OLSR_PRINTF(3, "Skipping Dijkstra (2)\n")
  
            // create a new ANSN
--- 135,139 ----
  
            else
!             OLSR_PRINTF(3, "Skipping Dijkstra (2)\n");
  
            // create a new ANSN
***************
*** 171,175 ****
  		  olsr_ip_to_string(&neighbor->neighbor_main_addr),
  		  neighbor->willingness,
! 		  message->willingness)
        /*
         *If willingness changed - recalculate
--- 171,175 ----
  		  olsr_ip_to_string(&neighbor->neighbor_main_addr),
  		  neighbor->willingness,
! 		  message->willingness);
        /*
         *If willingness changed - recalculate
***************
*** 230,234 ****
  
    OLSR_PRINTF(3, "Processing TC from %s\n",
!               olsr_ip_to_string(&message->originator))
  
    /*
--- 230,234 ----
  
    OLSR_PRINTF(3, "Processing TC from %s\n",
!               olsr_ip_to_string(&message->originator));
  
    /*
***************
*** 241,245 ****
      {
        OLSR_PRINTF(2, "Received TC from NON SYM neighbor %s\n",
!                   olsr_ip_to_string(from_addr))
        olsr_free_tc_packet(message);
        return;
--- 241,245 ----
      {
        OLSR_PRINTF(2, "Received TC from NON SYM neighbor %s\n",
!                   olsr_ip_to_string(from_addr));
        olsr_free_tc_packet(message);
        return;
***************
*** 249,261 ****
      {
        mpr = message->multipoint_relay_selector_address;
!       OLSR_PRINTF(3, "mpr_selector_list:[")
  
        while(mpr!=NULL)
          {
!           OLSR_PRINTF(3, "%s:", olsr_ip_to_string(&mpr->address))
            mpr=mpr->next;
          }
  
!       OLSR_PRINTF(3, "]\n")
      }
  
--- 249,261 ----
      {
        mpr = message->multipoint_relay_selector_address;
!       OLSR_PRINTF(3, "mpr_selector_list:[");
  
        while(mpr!=NULL)
          {
!           OLSR_PRINTF(3, "%s:", olsr_ip_to_string(&mpr->address));
            mpr=mpr->next;
          }
  
!       OLSR_PRINTF(3, "]\n");
      }
  
***************
*** 295,299 ****
          {
            OLSR_PRINTF(3, "Dropping empty TC from %s\n",
!                       olsr_ip_to_string(&message->originator))
          }
      }
--- 295,299 ----
          {
            OLSR_PRINTF(3, "Dropping empty TC from %s\n",
!                       olsr_ip_to_string(&message->originator));
          }
      }
***************
*** 373,377 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(5, "Processing MID from %s...\n", olsr_ip_to_string(&message.mid_origaddr))
  #endif
    tmp_adr = message.mid_addr;
--- 373,377 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(5, "Processing MID from %s...\n", olsr_ip_to_string(&message.mid_origaddr));
  #endif
    tmp_adr = message.mid_addr;
***************
*** 385,389 ****
    if(check_neighbor_link(from_addr) != SYM_LINK)
      {
!       OLSR_PRINTF(2, "Received MID from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr))
        olsr_free_mid_packet(&message);
        return;
--- 385,389 ----
    if(check_neighbor_link(from_addr) != SYM_LINK)
      {
!       OLSR_PRINTF(2, "Received MID from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr));
        olsr_free_mid_packet(&message);
        return;
***************
*** 397,402 ****
        if(!mid_lookup_main_addr(&tmp_adr->alias_addr))
  	{
! 	  OLSR_PRINTF(1, "MID new: (%s, ", olsr_ip_to_string(&message.mid_origaddr))
! 	  OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(&tmp_adr->alias_addr))
  	  insert_mid_alias(&message.mid_origaddr, &tmp_adr->alias_addr, (float)message.vtime);
  	}
--- 397,402 ----
        if(!mid_lookup_main_addr(&tmp_adr->alias_addr))
  	{
! 	  OLSR_PRINTF(1, "MID new: (%s, ", olsr_ip_to_string(&message.mid_origaddr));
! 	  OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(&tmp_adr->alias_addr));
  	  insert_mid_alias(&message.mid_origaddr, &tmp_adr->alias_addr, (float)message.vtime);
  	}
***************
*** 439,443 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(5, "Processing HNA\n")
  #endif
  
--- 439,443 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(5, "Processing HNA\n");
  #endif
  
***************
*** 465,469 ****
    if(check_neighbor_link(from_addr) != SYM_LINK)
      {
!       OLSR_PRINTF(2, "Received HNA from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr))
        olsr_free_hna_packet(&message);
        return;
--- 465,469 ----
    if(check_neighbor_link(from_addr) != SYM_LINK)
      {
!       OLSR_PRINTF(2, "Received HNA from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr));
        olsr_free_hna_packet(&message);
        return;
***************
*** 539,543 ****
              olsr_lookup_my_neighbors(neighbor, &message_neighbors->address);
  #ifdef DEBUG
!           OLSR_PRINTF(7, "\tProcessing %s\n", olsr_ip_to_string(&message_neighbors->address))
  #endif
            if (two_hop_neighbor_yet != NULL)
--- 539,543 ----
              olsr_lookup_my_neighbors(neighbor, &message_neighbors->address);
  #ifdef DEBUG
!           OLSR_PRINTF(7, "\tProcessing %s\n", olsr_ip_to_string(&message_neighbors->address));
  #endif
            if (two_hop_neighbor_yet != NULL)
***************
*** 581,585 ****
                    OLSR_PRINTF(5, 
  			      "Adding 2 hop neighbor %s\n\n", 
! 			      olsr_ip_to_string(&message_neighbors->address))
  #endif
                    changes_neighborhood = OLSR_TRUE;
--- 581,585 ----
                    OLSR_PRINTF(5, 
  			      "Adding 2 hop neighbor %s\n\n", 
! 			      olsr_ip_to_string(&message_neighbors->address));
  #endif
                    changes_neighborhood = OLSR_TRUE;
***************
*** 772,776 ****
  
                            else
!                             OLSR_PRINTF(3, "Skipping Dijkstra (3)\n")
                          }
                      }
--- 772,776 ----
  
                            else
!                             OLSR_PRINTF(3, "Skipping Dijkstra (3)\n");
                          }
                      }

Index: mid_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** mid_set.c	20 Apr 2007 14:23:41 -0000	1.19
--- mid_set.c	25 Apr 2007 22:08:09 -0000	1.20
***************
*** 65,69 ****
    int index;
  
!   OLSR_PRINTF(5, "MID: init\n")
  
    /* Since the holdingtime is assumed to be rather large for 
--- 65,69 ----
    int index;
  
!   OLSR_PRINTF(5, "MID: init\n");
  
    /* Since the holdingtime is assumed to be rather large for 
***************
*** 168,173 ****
        if((tmp_2_neighbor = olsr_lookup_two_hop_neighbor_table_mid(&tmp_adr->alias)) != NULL)
  	{
! 	  OLSR_PRINTF(1, "Deleting 2 hop node from MID: %s to ", olsr_ip_to_string(&tmp_adr->alias))
! 	  OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr))
  
  	  olsr_delete_two_hop_neighbor_table(tmp_2_neighbor);
--- 168,173 ----
        if((tmp_2_neighbor = olsr_lookup_two_hop_neighbor_table_mid(&tmp_adr->alias)) != NULL)
  	{
! 	  OLSR_PRINTF(1, "Deleting 2 hop node from MID: %s to ", olsr_ip_to_string(&tmp_adr->alias));
! 	  OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr));
  
  	  olsr_delete_two_hop_neighbor_table(tmp_2_neighbor);
***************
*** 181,186 ****
  
  	{
! 	  OLSR_PRINTF(1, "[MID]Deleting bogus neighbor entry %s real ", olsr_ip_to_string(&tmp_adr->alias))
! 	  OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr))
  
  	  replace_neighbor_link_set(tmp_neigh, real_neigh);
--- 181,186 ----
  
  	{
! 	  OLSR_PRINTF(1, "[MID]Deleting bogus neighbor entry %s real ", olsr_ip_to_string(&tmp_adr->alias));
! 	  OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr));
  
  	  replace_neighbor_link_set(tmp_neigh, real_neigh);
***************
*** 222,227 ****
    adr = olsr_malloc(sizeof(struct mid_address), "Insert MID alias");
    
!   OLSR_PRINTF(1, "Inserting alias %s for ", olsr_ip_to_string(alias))
!   OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(main_add))
  
    COPY_IP(&adr->alias, alias);
--- 222,227 ----
    adr = olsr_malloc(sizeof(struct mid_address), "Insert MID alias");
    
!   OLSR_PRINTF(1, "Inserting alias %s for ", olsr_ip_to_string(alias));
!   OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(main_add));
  
    COPY_IP(&adr->alias, alias);
***************
*** 303,307 ****
    olsr_u32_t hash;
  
!   //OLSR_PRINTF(1, "MID: lookup entry...")
  
    hash = olsr_hashing(adr);
--- 303,307 ----
    olsr_u32_t hash;
  
!   //OLSR_PRINTF(1, "MID: lookup entry...");
  
    hash = olsr_hashing(adr);
***************
*** 349,353 ****
    olsr_u32_t hash;
  
!   OLSR_PRINTF(3, "MID: update %s\n", olsr_ip_to_string(adr))
    hash = olsr_hashing(adr);
  
--- 349,353 ----
    olsr_u32_t hash;
  
!   OLSR_PRINTF(3, "MID: update %s\n", olsr_ip_to_string(adr));
    hash = olsr_hashing(adr);
  
***************
*** 423,428 ****
          {
            /* Current alias not found in list of declared aliases: free current alias */
!           OLSR_PRINTF(1, "MID remove: (%s, ", olsr_ip_to_string(&entry->main_addr))
!           OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(&current_alias->alias))
  
            /* Update linked list as seen by 'entry' */
--- 423,428 ----
          {
            /* Current alias not found in list of declared aliases: free current alias */
!           OLSR_PRINTF(1, "MID remove: (%s, ", olsr_ip_to_string(&entry->main_addr));
!             OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(&current_alias->alias));
  
            /* Update linked list as seen by 'entry' */
***************
*** 479,484 ****
  	      tmp_list = tmp_list->next;
  #ifdef DEBUG
! 	      OLSR_PRINTF(1, "MID info for %s timed out.. deleting it\n", 
! 			  olsr_ip_to_string(&entry_to_delete->main_addr))
  #endif
  	      /*Delete it*/
--- 479,484 ----
  	      tmp_list = tmp_list->next;
  #ifdef DEBUG
! 	      OLSR_PRINTF(1, "MID info for %s timed out.. deleting it\n",
! 			  olsr_ip_to_string(&entry_to_delete->main_addr));
  #endif
  	      /*Delete it*/
***************
*** 532,536 ****
    int index;
  
!   OLSR_PRINTF(1, "mid set: %02d:%02d:%02d.%06lu\n",nowtm->tm_hour, nowtm->tm_min, nowtm->tm_sec, now.tv_usec)
  
    for(index=0;index<HASHSIZE;index++)
--- 532,536 ----
    int index;
  
!   OLSR_PRINTF(1, "mid set: %02d:%02d:%02d.%06lu\n",nowtm->tm_hour, nowtm->tm_min, nowtm->tm_sec, now.tv_usec);
  
    for(index=0;index<HASHSIZE;index++)
***************
*** 542,551 ****
  	  struct mid_address *tmp_addr;
            
! 	  OLSR_PRINTF(1, "%s: ", olsr_ip_to_string(&tmp_list->main_addr))
            for(tmp_addr = tmp_list->aliases;tmp_addr;tmp_addr = tmp_addr->next_alias)
  	    {
! 	      OLSR_PRINTF(1, " %s ", olsr_ip_to_string(&tmp_addr->alias))
  	    }
! 	  OLSR_PRINTF(1, "\n")	  
  	}
      }
--- 542,551 ----
  	  struct mid_address *tmp_addr;
            
! 	  OLSR_PRINTF(1, "%s: ", olsr_ip_to_string(&tmp_list->main_addr));
            for(tmp_addr = tmp_list->aliases;tmp_addr;tmp_addr = tmp_addr->next_alias)
  	    {
! 	      OLSR_PRINTF(1, " %s ", olsr_ip_to_string(&tmp_addr->alias));
  	    }
! 	  OLSR_PRINTF(1, "\n");
  	}
      }

Index: hysteresis.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/hysteresis.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** hysteresis.c	20 Apr 2007 14:23:41 -0000	1.19
--- hysteresis.c	25 Apr 2007 22:08:08 -0000	1.20
***************
*** 79,83 ****
  	{
  	  OLSR_PRINTF(1, "HYST[%s] link set to NOT pending!\n", 
! 		      olsr_ip_to_string(&entry->neighbor_iface_addr))
  	  changes_neighborhood = OLSR_TRUE;
  	}
--- 79,83 ----
  	{
  	  OLSR_PRINTF(1, "HYST[%s] link set to NOT pending!\n", 
! 		      olsr_ip_to_string(&entry->neighbor_iface_addr));
  	  changes_neighborhood = OLSR_TRUE;
  	}
***************
*** 100,104 ****
  	{
  	  OLSR_PRINTF(1, "HYST[%s] link set to pending!\n", 
! 		      olsr_ip_to_string(&entry->neighbor_iface_addr))
  	  changes_neighborhood = OLSR_TRUE;
  	}
--- 100,104 ----
  	{
  	  OLSR_PRINTF(1, "HYST[%s] link set to pending!\n", 
! 		      olsr_ip_to_string(&entry->neighbor_iface_addr));
  	  changes_neighborhood = OLSR_TRUE;
  	}
***************
*** 149,153 ****
  {
  #ifdef DEBUG
!   OLSR_PRINTF(3, "HYST[%s]: HELLO update vtime %f\n", olsr_ip_to_string(&entry->neighbor_iface_addr), htime*1.5)
  #endif
    /* hello timeout = current time + hint time */
--- 149,153 ----
  {
  #ifdef DEBUG
!   OLSR_PRINTF(3, "HYST[%s]: HELLO update vtime %f\n", olsr_ip_to_string(&entry->neighbor_iface_addr), htime*1.5);
  #endif
    /* hello timeout = current time + hint time */
***************
*** 174,178 ****
        link->L_link_quality = olsr_hyst_calc_stability(link->L_link_quality);
  #ifdef DEBUG
!       OLSR_PRINTF(3, "HYST[%s]: %0.3f\n", olsr_ip_to_string(remote), link->L_link_quality)
  #endif
  
--- 174,178 ----
        link->L_link_quality = olsr_hyst_calc_stability(link->L_link_quality);
  #ifdef DEBUG
!       OLSR_PRINTF(3, "HYST[%s]: %0.3f\n", olsr_ip_to_string(remote), link->L_link_quality);
  #endif
  
***************
*** 191,195 ****
  #ifdef DEBUG
  	      OLSR_PRINTF(5, "HYST[%s] PACKET LOSS! %0.3f\n",
! 			  olsr_ip_to_string(remote), link->L_link_quality)
  #endif
  	      if(link->L_link_quality < olsr_cnf->hysteresis_param.thr_low)
--- 191,195 ----
  #ifdef DEBUG
  	      OLSR_PRINTF(5, "HYST[%s] PACKET LOSS! %0.3f\n",
! 			  olsr_ip_to_string(remote), link->L_link_quality);
  #endif
  	      if(link->L_link_quality < olsr_cnf->hysteresis_param.thr_low)

Index: net_olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** net_olsr.c	20 Apr 2007 13:46:04 -0000	1.21
--- net_olsr.c	25 Apr 2007 22:08:09 -0000	1.22
***************
*** 250,254 ****
   */
  int
! net_outbuffer_push(struct interface *ifp, olsr_u8_t *data, olsr_u16_t size)
  {
    if((ifp->netbuf.pending + size) > ifp->netbuf.maxsize)
--- 250,254 ----
   */
  int
! net_outbuffer_push(struct interface *ifp, const void *data, const olsr_u16_t size)
  {
    if((ifp->netbuf.pending + size) > ifp->netbuf.maxsize)
***************
*** 274,278 ****
   */
  int
! net_outbuffer_push_reserved(struct interface *ifp, olsr_u8_t *data, olsr_u16_t size)
  {
    if((ifp->netbuf.pending + size) > (ifp->netbuf.maxsize + ifp->netbuf.reserved))
--- 274,278 ----
   */
  int
! net_outbuffer_push_reserved(struct interface *ifp, const void *data, const olsr_u16_t size)
  {
    if((ifp->netbuf.pending + size) > (ifp->netbuf.maxsize + ifp->netbuf.reserved))
***************
*** 294,298 ****
   */
  int
! net_outbuffer_bytes_left(struct interface *ifp)
  {
    return ifp->netbuf.maxsize - ifp->netbuf.pending;
--- 294,298 ----
   */
  int
! net_outbuffer_bytes_left(const struct interface *ifp)
  {
    return ifp->netbuf.maxsize - ifp->netbuf.pending;
***************
*** 506,510 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefix, olsr_ip_to_string(adr))
  #endif
  
--- 506,510 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefix, olsr_ip_to_string(adr));
  #endif
  
***************
*** 545,549 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Netmask: %s = Prefix %d\n", olsr_ip_to_string(adr), prefix)
  #endif
  
--- 545,549 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Netmask: %s = Prefix %d\n", olsr_ip_to_string(adr), prefix);
  #endif
  
***************
*** 650,654 ****
    deny_entries = new_entry;
  
!   OLSR_PRINTF(1, "Added %s to IP deny set\n", olsr_ip_to_string(&new_entry->addr))
    return;
  }
--- 650,654 ----
    deny_entries = new_entry;
  
!   OLSR_PRINTF(1, "Added %s to IP deny set\n", olsr_ip_to_string(&new_entry->addr));
    return;
  }
***************
*** 673,677 ****
  	{
  	  OLSR_PRINTF(1, "Validation of address %s failed!\n",
! 		      olsr_ip_to_string(adr))
  	  return OLSR_FALSE;
  	}
--- 673,677 ----
  	{
  	  OLSR_PRINTF(1, "Validation of address %s failed!\n",
! 		      olsr_ip_to_string(adr));
  	  return OLSR_FALSE;
  	}

Index: build_msg.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/build_msg.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** build_msg.c	22 Apr 2007 20:25:48 -0000	1.35
--- build_msg.c	25 Apr 2007 22:08:07 -0000	1.36
***************
*** 137,141 ****
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building HELLO on %s\n-------------------\n", ifp->int_name)
  #endif
  
--- 137,141 ----
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building HELLO on %s\n-------------------\n", ifp->int_name);
  #endif
  
***************
*** 168,172 ****
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building TC on %s\n-------------------\n", ifp->int_name)
  #endif
  
--- 168,172 ----
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building TC on %s\n-------------------\n", ifp->int_name);
  #endif
  
***************
*** 194,198 ****
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building MID on %s\n-------------------\n", ifp->int_name)
  #endif
  
--- 194,198 ----
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building MID on %s\n-------------------\n", ifp->int_name);
  #endif
  
***************
*** 219,223 ****
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building HNA on %s\n-------------------\n", ifp->int_name)
  #endif
  
--- 219,223 ----
  {
  #ifdef DEBUG
!   OLSR_PRINTF(BMSG_DBGLVL, "Building HNA on %s\n-------------------\n", ifp->int_name);
  #endif
  
***************
*** 242,246 ****
    if(msgsize > buffsize)
      {
!       OLSR_PRINTF(1, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize)
        olsr_syslog(OLSR_LOG_ERR, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize);
        olsr_exit(__func__, EXIT_FAILURE);
--- 242,246 ----
    if(msgsize > buffsize)
      {
!       OLSR_PRINTF(1, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize);
        olsr_syslog(OLSR_LOG_ERR, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize);
        olsr_exit(__func__, EXIT_FAILURE);
***************
*** 335,340 ****
  
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address))
! 	      OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i)
  #endif		  
  	      /*
--- 335,340 ----
  
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address));
! 	      OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i);
  #endif		  
  	      /*
***************
*** 355,359 ****
  		    {
  #ifdef DEBUG
! 		      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  		      /* Complete the headers */
--- 355,359 ----
  		    {
  #ifdef DEBUG
! 		      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  		      /* Complete the headers */
***************
*** 499,504 ****
  
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address))
! 	      OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i)
  #endif		  
  
--- 499,504 ----
  
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address));
! 	      OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i);
  #endif		  
  
***************
*** 521,525 ****
  		    {
  #ifdef DEBUG
! 		      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  		      /* Complete the headers */
--- 521,525 ----
  		    {
  #ifdef DEBUG
! 		      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  		      /* Complete the headers */
***************
*** 652,656 ****
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  
--- 652,656 ----
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  
***************
*** 675,679 ****
  #ifdef DEBUG
  	  OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", 
! 		      olsr_ip_to_string(&mprs->address))
  #endif 
        COPY_IP(&mprsaddr->addr, &mprs->address);
--- 675,679 ----
  #ifdef DEBUG
  	  OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", 
! 		      olsr_ip_to_string(&mprs->address));
  #endif 
        COPY_IP(&mprsaddr->addr, &mprs->address);
***************
*** 697,701 ****
  	{
  	  if(!TIMED_OUT(send_empty_tc))
! 	    OLSR_PRINTF(1, "TC: Sending empty package - (%d/%d/%d/%d)\n", partial_sent, (int)send_empty_tc, (int)now_times, (int)((send_empty_tc) - now_times))
  
  	  m->v4.olsr_msgsize = htons(curr_size);
--- 697,701 ----
  	{
  	  if(!TIMED_OUT(send_empty_tc))
! 	    OLSR_PRINTF(1, "TC: Sending empty package - (%d/%d/%d/%d)\n", partial_sent, (int)send_empty_tc, (int)now_times, (int)((send_empty_tc) - now_times));
  
  	  m->v4.olsr_msgsize = htons(curr_size);
***************
*** 777,781 ****
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  	      m->v6.olsr_msgsize = htons(curr_size);
--- 777,781 ----
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  	      m->v6.olsr_msgsize = htons(curr_size);
***************
*** 796,800 ****
  #ifdef DEBUG
  	  OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", 
! 		      olsr_ip_to_string(&mprs->address))
  #endif
        COPY_IP(&mprsaddr6->addr, &mprs->address);
--- 796,800 ----
  #ifdef DEBUG
  	  OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", 
! 		      olsr_ip_to_string(&mprs->address));
  #endif
        COPY_IP(&mprsaddr6->addr, &mprs->address);
***************
*** 816,820 ****
        if((!partial_sent) && (!TIMED_OUT(send_empty_tc)))
  	{
! 	  OLSR_PRINTF(1, "TC: Sending empty package\n")
  	    
  	  m->v6.olsr_msgsize = htons(curr_size);
--- 816,820 ----
        if((!partial_sent) && (!TIMED_OUT(send_empty_tc)))
  	{
! 	  OLSR_PRINTF(1, "TC: Sending empty package\n");
  	    
  	  m->v6.olsr_msgsize = htons(curr_size);
***************
*** 890,894 ****
  		{
  #ifdef DEBUG
! 		  OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  		  /* set size */
--- 890,894 ----
  		{
  #ifdef DEBUG
! 		  OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  		  /* set size */
***************
*** 907,911 ****
  	  OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", 
  		      olsr_ip_to_string(&ifs->ip_addr), 
! 		      ifs->int_name)
  #endif
  	  
--- 907,911 ----
  	  OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", 
  		      olsr_ip_to_string(&ifs->ip_addr), 
! 		      ifs->int_name);
  #endif
  	  
***************
*** 989,993 ****
  		{
  #ifdef DEBUG
! 		  OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  		  /* set size */
--- 989,993 ----
  		{
  #ifdef DEBUG
! 		  OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  		  /* set size */
***************
*** 1006,1010 ****
  		  OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", 
  			      olsr_ip_to_string(&ifs->ip_addr), 
! 			      ifs->int_name)
  #endif
  
--- 1006,1010 ----
  		  OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", 
  			      olsr_ip_to_string(&ifs->ip_addr), 
! 			      ifs->int_name);
  #endif
  
***************
*** 1080,1084 ****
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  	      m->v4.seqno = htons(get_msg_seqno());
--- 1080,1084 ----
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  	      m->v4.seqno = htons(get_msg_seqno());
***************
*** 1095,1099 ****
        OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%s\n", 
  		  olsr_ip_to_string(&h->net),
! 		  olsr_ip_to_string(&h->netmask))
  #endif
        COPY_IP(&pair->addr, &h->net);
--- 1095,1099 ----
        OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%s\n", 
  		  olsr_ip_to_string(&h->net),
! 		  olsr_ip_to_string(&h->netmask));
  #endif
        COPY_IP(&pair->addr, &h->net);
***************
*** 1170,1174 ****
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize)
  #endif
  	      m->v6.seqno = htons(get_msg_seqno());
--- 1170,1174 ----
  	    {
  #ifdef DEBUG
! 	      OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize);
  #endif
  	      m->v6.seqno = htons(get_msg_seqno());
***************
*** 1185,1189 ****
        OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%d\n", 
  		  olsr_ip_to_string(&h->net),
! 		  h->prefix_len)
  #endif
        COPY_IP(&pair6->addr, &h->net);
--- 1185,1189 ----
        OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%d\n", 
  		  olsr_ip_to_string(&h->net),
! 		  h->prefix_len);
  #endif
        COPY_IP(&pair6->addr, &h->net);

Index: routing_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** routing_table.c	20 Apr 2007 13:46:04 -0000	1.26
--- routing_table.c	25 Apr 2007 22:08:14 -0000	1.27
***************
*** 253,257 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(7, "FILL ROUTING TABLE WITH NEIGHBORS\n")
  #endif
  
--- 253,257 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(7, "FILL ROUTING TABLE WITH NEIGHBORS\n");
  #endif
  
***************
*** 279,283 ****
  		  struct link_entry *link = get_best_link_to_neighbor(&addrs2->alias);
  #ifdef DEBUG
! 		  OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrs.alias))
  #endif
  		  if(link)
--- 279,283 ----
  		  struct link_entry *link = get_best_link_to_neighbor(&addrs2->alias);
  #ifdef DEBUG
! 		  OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrs.alias));
  #endif
  		  if(link)
***************
*** 370,374 ****
  		{
  #ifdef DEBUG
! 		  OLSR_PRINTF(7, "2hop: %s already added\n", olsr_ip_to_string(n2_addr))
  #endif
  		  continue;
--- 370,374 ----
  		{
  #ifdef DEBUG
! 		  OLSR_PRINTF(7, "2hop: %s already added\n", olsr_ip_to_string(n2_addr));
  #endif
  		  continue;
***************
*** 378,382 ****
  		{
  		  OLSR_PRINTF(1, "Two hop neighbor %s not added - no one hop neighbors.\n",
! 			      olsr_ip_to_string(n2_addr))
  		  continue;
  		}
--- 378,382 ----
  		{
  		  OLSR_PRINTF(1, "Two hop neighbor %s not added - no one hop neighbors.\n",
! 			      olsr_ip_to_string(n2_addr));
  		  continue;
  		}
***************
*** 389,393 ****
  		  struct link_entry *link = get_best_link_to_neighbor(&neighbor->neighbor_main_addr);
  #ifdef DEBUG
! 		  OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrsp->alias))
  #endif
  		  if(link)
--- 389,393 ----
  		  struct link_entry *link = get_best_link_to_neighbor(&neighbor->neighbor_main_addr);
  #ifdef DEBUG
! 		  OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrsp->alias));
  #endif
  		  if(link)
***************
*** 479,484 ****
  			  /* PRINT OUT: Last Hop to Final Destination */
  			  /* The function ip_to_string has to be seperately */
! 			  OLSR_PRINTF(3, "%s -> ", olsr_ip_to_string(&list_destination_n->destination->rt_dst))
! 			  OLSR_PRINTF(3, "%s\n", olsr_ip_to_string(&tmp_addrsp->alias))
  			  
  			  destination_n_1 = olsr_malloc(sizeof(struct destination_n), 
--- 479,484 ----
  			  /* PRINT OUT: Last Hop to Final Destination */
  			  /* The function ip_to_string has to be seperately */
! 			  OLSR_PRINTF(3, "%s -> ", olsr_ip_to_string(&list_destination_n->destination->rt_dst));
! 			  OLSR_PRINTF(3, "%s\n", olsr_ip_to_string(&tmp_addrsp->alias));
  			  
  			  destination_n_1 = olsr_malloc(sizeof(struct destination_n), 
***************
*** 631,635 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Calculating HNA routes\n")
  #endif
  
--- 631,635 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Calculating HNA routes\n");
  #endif
  
***************
*** 717,721 ****
    if(olsr_cnf->debug_level > 2)
      {
!       OLSR_PRINTF(3, "HNA table:\n")
        olsr_print_routing_table(hna_routes);
      }
--- 717,721 ----
    if(olsr_cnf->debug_level > 2)
      {
!       OLSR_PRINTF(3, "HNA table:\n");
        olsr_print_routing_table(hna_routes);
      }

Index: ipc_frontend.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/ipc_frontend.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** ipc_frontend.c	20 Apr 2007 13:46:04 -0000	1.29
--- ipc_frontend.c	25 Apr 2007 22:08:08 -0000	1.30
***************
*** 115,119 ****
      {
        perror("IPC bind");
!       OLSR_PRINTF(1, "Will retry in 10 seconds...\n")
        sleep(10);
        if(bind(ipc_sock, (struct sockaddr *) &sin, sizeof(sin)) == -1) 
--- 115,119 ----
      {
        perror("IPC bind");
!       OLSR_PRINTF(1, "Will retry in 10 seconds...\n");
        sleep(10);
        if(bind(ipc_sock, (struct sockaddr *) &sin, sizeof(sin)) == -1) 
***************
*** 122,126 ****
  	  olsr_exit("IPC bind", EXIT_FAILURE);
  	}
!       OLSR_PRINTF(1, "OK\n")
      }
  
--- 122,126 ----
  	  olsr_exit("IPC bind", EXIT_FAILURE);
  	}
!       OLSR_PRINTF(1, "OK\n");
      }
  
***************
*** 156,160 ****
    else
      {
!       OLSR_PRINTF(1, "Front end connected\n")
        addr = inet_ntoa(pin.sin_addr);
        if(ipc_check_allowed_ip((union olsr_ip_addr *)&pin.sin_addr.s_addr))
--- 156,160 ----
    else
      {
!       OLSR_PRINTF(1, "Front end connected\n");
        addr = inet_ntoa(pin.sin_addr);
        if(ipc_check_allowed_ip((union olsr_ip_addr *)&pin.sin_addr.s_addr))
***************
*** 163,171 ****
  	  ipc_send_net_info(ipc_conn);
  	  ipc_send_all_routes(ipc_conn);
! 	  OLSR_PRINTF(1, "Connection from %s\n",addr)
  	}
        else
  	{
! 	  OLSR_PRINTF(1, "Front end-connection from foregin host(%s) not allowed!\n", addr)
  	  olsr_syslog(OLSR_LOG_ERR, "OLSR: Front end-connection from foregin host(%s) not allowed!\n", addr);
  	  CLOSE(ipc_conn);
--- 163,171 ----
  	  ipc_send_net_info(ipc_conn);
  	  ipc_send_all_routes(ipc_conn);
! 	  OLSR_PRINTF(1, "Connection from %s\n",addr);
  	}
        else
  	{
! 	  OLSR_PRINTF(1, "Front end-connection from foregin host(%s) not allowed!\n", addr);
  	  olsr_syslog(OLSR_LOG_ERR, "OLSR: Front end-connection from foregin host(%s) not allowed!\n", addr);
  	  CLOSE(ipc_conn);
***************
*** 253,264 ****
    if (send(ipc_conn, (void *)msg, size, MSG_NOSIGNAL) < 0) 
      {
!       OLSR_PRINTF(1, "(OUTPUT)IPC connection lost!\n")
        CLOSE(ipc_conn);
        //olsr_cnf->open_ipc = 0;
        ipc_active = OLSR_FALSE;
-       return;
      }
-   
-   return;
  }
  
--- 253,261 ----
    if (send(ipc_conn, (void *)msg, size, MSG_NOSIGNAL) < 0) 
      {
!       OLSR_PRINTF(1, "(OUTPUT)IPC connection lost!\n");
        CLOSE(ipc_conn);
        //olsr_cnf->open_ipc = 0;
        ipc_active = OLSR_FALSE;
      }
  }
  
***************
*** 321,326 ****
    if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe
      {
!       OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n")
        CLOSE(ipc_conn);
        //olsr_cnf->open_ipc = 0;
        ipc_active = OLSR_FALSE;
--- 318,324 ----
    if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe
      {
!       OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n");
        CLOSE(ipc_conn);
+ 
        //olsr_cnf->open_ipc = 0;
        ipc_active = OLSR_FALSE;
***************
*** 383,387 ****
  	  if (send(fd, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe
  	    {
! 	      OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n")
  	      CLOSE(ipc_conn);
  	      //olsr_cnf->open_ipc = 0;
--- 381,385 ----
  	  if (send(fd, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe
  	    {
! 	      OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n");
  	      CLOSE(ipc_conn);
  	      //olsr_cnf->open_ipc = 0;
***************
*** 428,432 ****
  	  if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe
  	    {
! 	      OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n")
  	      CLOSE(ipc_conn);
  	      //olsr_cnf->open_ipc = 0;
--- 426,430 ----
  	  if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe
  	    {
! 	      OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n");
  	      CLOSE(ipc_conn);
  	      //olsr_cnf->open_ipc = 0;
***************
*** 463,467 ****
    msg = (char *)net_msg;
  
!   OLSR_PRINTF(1, "Sending net-info to front end...\n")
    
    memset(net_msg, 0, sizeof(struct ipc_net_msg));
--- 461,465 ----
    msg = (char *)net_msg;
  
!   OLSR_PRINTF(1, "Sending net-info to front end...\n");
    
    memset(net_msg, 0, sizeof(struct ipc_net_msg));
***************
*** 531,535 ****
    if (send(fd, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) 
      {
!       OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n")
        CLOSE(ipc_conn);
        //olsr_cnf->open_ipc = 0;
--- 529,533 ----
    if (send(fd, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) 
      {
!       OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n");
        CLOSE(ipc_conn);
        //olsr_cnf->open_ipc = 0;
***************
*** 546,550 ****
  shutdown_ipc(void)
  {
!   OLSR_PRINTF(1, "Shutting down IPC...\n")
    CLOSE(ipc_sock);
    CLOSE(ipc_conn);
--- 544,548 ----
  shutdown_ipc(void)
  {
!   OLSR_PRINTF(1, "Shutting down IPC...\n");
    CLOSE(ipc_sock);
    CLOSE(ipc_conn);

Index: main.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** main.c	20 Apr 2007 13:46:04 -0000	1.94
--- main.c	25 Apr 2007 22:08:09 -0000	1.95
***************
*** 302,306 ****
        if(apm_init() < 0)
  	{
! 	  OLSR_PRINTF(1, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT)
  
  	  olsr_syslog(OLSR_LOG_ERR, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT);
--- 302,306 ----
        if(apm_init() < 0)
  	{
! 	  OLSR_PRINTF(1, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT);
  
  	  olsr_syslog(OLSR_LOG_ERR, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT);
***************
*** 313,317 ****
  	  olsr_cnf->willingness = olsr_calculate_willingness();
  
! 	  OLSR_PRINTF(1, "Willingness set to %d - next update in %.1f secs\n", olsr_cnf->willingness, olsr_cnf->will_int)
  	}
      }
--- 313,317 ----
  	  olsr_cnf->willingness = olsr_calculate_willingness();
  
! 	  OLSR_PRINTF(1, "Willingness set to %d - next update in %.1f secs\n", olsr_cnf->willingness, olsr_cnf->will_int);
  	}
      }
***************
*** 320,329 ****
    if(olsr_cnf->ip_version == AF_INET6)
      {
!       OLSR_PRINTF(1, "Using IP version 6\n")
        olsr_cnf->ipsize = sizeof(struct in6_addr);
      }
    else
      {
!       OLSR_PRINTF(1, "Using IP version 4\n")
        olsr_cnf->ipsize = sizeof(olsr_u32_t);
      }
--- 320,329 ----
    if(olsr_cnf->ip_version == AF_INET6)
      {
!       OLSR_PRINTF(1, "Using IP version 6\n");
        olsr_cnf->ipsize = sizeof(struct in6_addr);
      }
    else
      {
!       OLSR_PRINTF(1, "Using IP version 4\n");
        olsr_cnf->ipsize = sizeof(olsr_u32_t);
      }
***************
*** 381,385 ****
    olsr_load_plugins();
  
!   OLSR_PRINTF(1, "Main address: %s\n\n", olsr_ip_to_string(&olsr_cnf->main_addr))
  
    /* Start syslog entry */
--- 381,385 ----
    olsr_load_plugins();
  
!   OLSR_PRINTF(1, "Main address: %s\n\n", olsr_ip_to_string(&olsr_cnf->main_addr));
  
    /* Start syslog entry */
***************
*** 470,474 ****
    olsr_delete_all_kernel_routes();
  
!   OLSR_PRINTF(1, "Closing sockets...\n")
  
    /* front-end IPC socket */
--- 470,474 ----
    olsr_delete_all_kernel_routes();
  
!   OLSR_PRINTF(1, "Closing sockets...\n");
  
    /* front-end IPC socket */
***************
*** 496,500 ****
    olsr_syslog(OLSR_LOG_INFO, "%s stopped", SOFTWARE_VERSION);
  
!   OLSR_PRINTF(1, "\n <<<< %s - terminating >>>>\n           http://www.olsr.org\n", SOFTWARE_VERSION)
  
    exit(olsr_cnf->exit_value);
--- 496,500 ----
    olsr_syslog(OLSR_LOG_INFO, "%s stopped", SOFTWARE_VERSION);
  
!   OLSR_PRINTF(1, "\n <<<< %s - terminating >>>>\n           http://www.olsr.org\n", SOFTWARE_VERSION);
  
    exit(olsr_cnf->exit_value);

Index: olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** olsr.c	22 Apr 2007 21:50:18 -0000	1.53
--- olsr.c	25 Apr 2007 22:08:09 -0000	1.54
***************
*** 111,115 ****
    struct pcf *new_pcf;
  
!   OLSR_PRINTF(1, "Registering pcf function\n")
  
    new_pcf = olsr_malloc(sizeof(struct pcf), "New PCF");
--- 111,115 ----
    struct pcf *new_pcf;
  
!   OLSR_PRINTF(1, "Registering pcf function\n");
  
    new_pcf = olsr_malloc(sizeof(struct pcf), "New PCF");
***************
*** 136,144 ****
  #ifdef DEBUG
    if(changes_neighborhood)
!     OLSR_PRINTF(3, "CHANGES IN NEIGHBORHOOD\n")
    if(changes_topology)
!     OLSR_PRINTF(3, "CHANGES IN TOPOLOGY\n")
    if(changes_hna)
!     OLSR_PRINTF(3, "CHANGES IN HNA\n")
  #endif
    
--- 136,144 ----
  #ifdef DEBUG
    if(changes_neighborhood)
!     OLSR_PRINTF(3, "CHANGES IN NEIGHBORHOOD\n");
    if(changes_topology)
!     OLSR_PRINTF(3, "CHANGES IN TOPOLOGY\n");
    if(changes_hna)
!     OLSR_PRINTF(3, "CHANGES IN HNA\n");
  #endif
    
***************
*** 318,322 ****
      {
  #ifdef DEBUG
!       OLSR_PRINTF(3, "Message already forwarded!\n")
  #endif
        return 0;
--- 318,322 ----
      {
  #ifdef DEBUG
!       OLSR_PRINTF(3, "Message already forwarded!\n");
  #endif
        return 0;
***************
*** 343,347 ****
      {
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Forward - sender %s not MPR selector\n", olsr_ip_to_string(src))
  #endif
        return 0;
--- 343,347 ----
      {
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Forward - sender %s not MPR selector\n", olsr_ip_to_string(src));
  #endif
        return 0;
***************
*** 376,380 ****
  	   * Check if message is to big to be piggybacked
  	   */
! 	  if(net_outbuffer_push(ifn, (olsr_u8_t *)m, msgsize) != msgsize)
  	    {
  	      /* Send */
--- 376,380 ----
  	   * Check if message is to big to be piggybacked
  	   */
! 	  if(net_outbuffer_push(ifn, m, msgsize) != msgsize)
  	    {
  	      /* Send */
***************
*** 383,389 ****
  	      set_buffer_timer(ifn);
  	      
! 	      if(net_outbuffer_push(ifn, (olsr_u8_t *)m, msgsize) != msgsize)
  		{
! 		  OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize)
  		  olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize);
  		}
--- 383,389 ----
  	      set_buffer_timer(ifn);
  	      
! 	      if(net_outbuffer_push(ifn, m, msgsize) != msgsize)
  		{
! 		  OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize);
  		  olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize);
  		}
***************
*** 395,401 ****
  	  set_buffer_timer(ifn);
  	  
! 	  if(net_outbuffer_push(ifn, (olsr_u8_t *)m, msgsize) != msgsize)
  	    {
! 	      OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize)
  	      olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize);
  	    }
--- 395,401 ----
  	  set_buffer_timer(ifn);
  	  
! 	  if(net_outbuffer_push(ifn, m, msgsize) != msgsize)
  	    {
! 	      OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize);
  	      olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize);
  	    }
***************
*** 436,440 ****
    if(tmp_will != olsr_cnf->willingness)
      {
!       OLSR_PRINTF(1, "Local willingness updated: old %d new %d\n", tmp_will, olsr_cnf->willingness)
      }
  }
--- 436,440 ----
    if(tmp_will != olsr_cnf->willingness)
      {
!       OLSR_PRINTF(1, "Local willingness updated: old %d new %d\n", tmp_will, olsr_cnf->willingness);
      }
  }
***************
*** 562,566 ****
  olsr_exit(const char *msg, int val)
  {
!   OLSR_PRINTF(1, "OLSR EXIT: %s\n", msg)
    olsr_syslog(OLSR_LOG_ERR, "olsrd exit: %s\n", msg);
    fflush(stdout);
--- 562,566 ----
  olsr_exit(const char *msg, int val)
  {
!   OLSR_PRINTF(1, "OLSR EXIT: %s\n", msg);
    olsr_syslog(OLSR_LOG_ERR, "olsrd exit: %s\n", msg);
    fflush(stdout);
***************
*** 587,593 ****
    if((ptr = malloc(size)) == 0) 
      {
!       OLSR_PRINTF(1, "OUT OF MEMORY: %s\n", strerror(errno))
!       olsr_syslog(OLSR_LOG_ERR, "olsrd: out of memory!: %m\n");
!       olsr_exit((char *)id, EXIT_FAILURE);
      }
    return ptr;
--- 587,594 ----
    if((ptr = malloc(size)) == 0) 
      {
!       const char * const err_msg = strerror(errno);
!       OLSR_PRINTF(1, "OUT OF MEMORY: %s\n", err_msg);
!       olsr_syslog(OLSR_LOG_ERR, "olsrd: out of memory!: %s\n", err_msg);
!       olsr_exit(id, EXIT_FAILURE);
      }
    return ptr;

Index: mpr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/mpr.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** mpr.c	20 Apr 2007 13:46:04 -0000	1.16
--- mpr.c	25 Apr 2007 22:08:09 -0000	1.17
***************
*** 122,126 ****
  	    {
  	      
! 	      //OLSR_PRINTF(1, "(1)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr))
  
  	      continue;
--- 122,126 ----
  	    {
  	      
! 	      //OLSR_PRINTF(1, "(1)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr));
  
  	      continue;
***************
*** 134,138 ****
  		  two_hop_list_tmp = olsr_malloc(sizeof(struct neighbor_2_list_entry), "MPR two hop list");
  
! 		  //OLSR_PRINTF(1, "ONE LINK ADDING %s\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr))
  
  		  /* Only queue one way here */		  
--- 134,138 ----
  		  two_hop_list_tmp = olsr_malloc(sizeof(struct neighbor_2_list_entry), "MPR two hop list");
  
! 		  //OLSR_PRINTF(1, "ONE LINK ADDING %s\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr));
  
  		  /* Only queue one way here */		  
***************
*** 171,175 ****
    count = *two_hop_covered_count;
  
!   OLSR_PRINTF(1, "Setting %s as MPR\n", olsr_ip_to_string(&one_hop_neighbor->neighbor_main_addr))
  
    //printf("PRE COUNT: %d\n\n", count);
--- 171,175 ----
    count = *two_hop_covered_count;
  
!   OLSR_PRINTF(1, "Setting %s as MPR\n", olsr_ip_to_string(&one_hop_neighbor->neighbor_main_addr));
  
    //printf("PRE COUNT: %d\n\n", count);
***************
*** 185,189 ****
        if((dup_neighbor != NULL) && (dup_neighbor->status == SYM))
  	{
! 	  //OLSR_PRINTF(7, "(2)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr))
  	  continue;
  	}
--- 185,189 ----
        if((dup_neighbor != NULL) && (dup_neighbor->status == SYM))
  	{
! 	  //OLSR_PRINTF(7, "(2)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr));
  	  continue;
  	}
***************
*** 198,202 ****
  	  the_one_hop_list = second_hop_entries->neighbor_2->neighbor_2_nblist.next;
  
! 	  //OLSR_PRINTF(1, "[%s](%x) has coverage %d\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr), second_hop_entries->neighbor_2, second_hop_entries->neighbor_2->mpr_covered_count)
  
  	  if(second_hop_entries->neighbor_2->mpr_covered_count >= olsr_cnf->mpr_coverage)
--- 198,202 ----
  	  the_one_hop_list = second_hop_entries->neighbor_2->neighbor_2_nblist.next;
  
! 	  //OLSR_PRINTF(1, "[%s](%x) has coverage %d\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr), second_hop_entries->neighbor_2, second_hop_entries->neighbor_2->mpr_covered_count);
  
  	  if(second_hop_entries->neighbor_2->mpr_covered_count >= olsr_cnf->mpr_coverage)
***************
*** 415,419 ****
      }
    
!   OLSR_PRINTF(3, "Two hop neighbors: %d\n", sum)
    return sum;
  }
--- 415,419 ----
      }
    
!   OLSR_PRINTF(3, "Two hop neighbors: %d\n", sum);
    return sum;
  }
***************
*** 445,454 ****
  	  olsr_chosen_mpr(a_neighbor, &count); 
  
! 	  OLSR_PRINTF(3, "Adding WILL_ALWAYS: %s\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr))
  
  	}
      }
    
!   //OLSR_PRINTF(1, "Count: %d\n", count)
    return count;
  }
--- 445,454 ----
  	  olsr_chosen_mpr(a_neighbor, &count); 
  
! 	  OLSR_PRINTF(3, "Adding WILL_ALWAYS: %s\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr));
  
  	}
      }
    
!   //OLSR_PRINTF(1, "Count: %d\n", count);
    return count;
  }
***************
*** 465,469 ****
    int i;
  
!   OLSR_PRINTF(3, "\n**RECALCULATING MPR**\n\n")
  
    olsr_clear_mprs();
--- 465,469 ----
    int i;
  
!   OLSR_PRINTF(3, "\n**RECALCULATING MPR**\n\n");
  
    olsr_clear_mprs();
***************
*** 523,527 ****
    if(olsr_check_mpr_changes())
      {
!       OLSR_PRINTF(3, "CHANGES IN MPR SET\n")
        if(olsr_cnf->tc_redundancy > 0)
  	signal_link_changes(OLSR_TRUE);
--- 523,527 ----
    if(olsr_check_mpr_changes())
      {
!       OLSR_PRINTF(3, "CHANGES IN MPR SET\n");
        if(olsr_cnf->tc_redundancy > 0)
  	signal_link_changes(OLSR_TRUE);
***************
*** 584,588 ****
  		  if(remove)
  		    {
! 		      OLSR_PRINTF(3, "MPR OPTIMIZE: removiong mpr %s\n\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr))
  		      a_neighbor->is_mpr = OLSR_FALSE;
  		    }
--- 584,588 ----
  		  if(remove)
  		    {
! 		      OLSR_PRINTF(3, "MPR OPTIMIZE: removiong mpr %s\n\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr));
  		      a_neighbor->is_mpr = OLSR_FALSE;
  		    }
***************
*** 600,604 ****
    int index;
  
!   OLSR_PRINTF(1, "MPR SET: ")
  
    for(index=0;index<HASHSIZE;index++)
--- 600,604 ----
    int index;
  
!   OLSR_PRINTF(1, "MPR SET: ");
  
    for(index=0;index<HASHSIZE;index++)
***************
*** 613,619 ****
  	   */
  	  if(a_neighbor->is_mpr)
! 	    OLSR_PRINTF(1, "[%s] ", olsr_ip_to_string(&a_neighbor->neighbor_main_addr))
  	}
      }
!   OLSR_PRINTF(1, "\n")
  }
--- 613,619 ----
  	   */
  	  if(a_neighbor->is_mpr)
! 	    OLSR_PRINTF(1, "[%s] ", olsr_ip_to_string(&a_neighbor->neighbor_main_addr));
  	}
      }
!   OLSR_PRINTF(1, "\n");
  }

Index: tc_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** tc_set.c	20 Apr 2007 13:46:04 -0000	1.25
--- tc_set.c	25 Apr 2007 22:08:17 -0000	1.26
***************
*** 59,64 ****
  {
    int index;
!  
!   OLSR_PRINTF(5, "TC: init topo\n")
  
    olsr_register_timeout_function(&olsr_time_out_tc_set);
--- 59,63 ----
  {
    int index;
!   OLSR_PRINTF(5, "TC: init topo\n");
  
    olsr_register_timeout_function(&olsr_time_out_tc_set);
***************
*** 87,91 ****
  {
  
!   //OLSR_PRINTF(1, "TC: del entry if empty\n")
  
    if(entry->destinations.next == &entry->destinations)
--- 86,90 ----
  {
  
!   //OLSR_PRINTF(1, "TC: del entry if empty\n");
  
    if(entry->destinations.next == &entry->destinations)
***************
*** 95,99 ****
        //entry->prev->next = entry->next;
        //entry->next->prev = entry->prev;
!       OLSR_PRINTF(1, "TC-SET: Deleting empty entry %s ->\n", olsr_ip_to_string(&entry->T_last_addr))
        free(entry);
        return 1;
--- 94,98 ----
        //entry->prev->next = entry->next;
        //entry->next->prev = entry->prev;
!       OLSR_PRINTF(1, "TC-SET: Deleting empty entry %s ->\n", olsr_ip_to_string(&entry->T_last_addr));
        free(entry);
        return 1;
***************
*** 119,123 ****
    olsr_u32_t hash;
  
!   //OLSR_PRINTF(1, "TC: lookup entry\n")
  
    hash = olsr_hashing(adr);
--- 118,122 ----
    olsr_u32_t hash;
  
!   //OLSR_PRINTF(1, "TC: lookup entry\n");
  
    hash = olsr_hashing(adr);
***************
*** 150,154 ****
    olsr_u32_t hash;
  
!   OLSR_PRINTF(1, "TC: adding entry %s\n", olsr_ip_to_string(adr))
  
    hash = olsr_hashing(adr);
--- 149,153 ----
    olsr_u32_t hash;
  
!   OLSR_PRINTF(1, "TC: adding entry %s\n", olsr_ip_to_string(adr));
  
    hash = olsr_hashing(adr);
***************
*** 190,194 ****
    int retval;
  
!   //OLSR_PRINTF(5, "TC: deleting MPRS\n")
  
    tmp_dsts = entry->destinations.next;
--- 189,193 ----
    int retval;
  
!   //OLSR_PRINTF(5, "TC: deleting MPRS\n");
  
    tmp_dsts = entry->destinations.next;
***************
*** 236,240 ****
    int retval;
  
!   //OLSR_PRINTF(1, "TC: update MPRS\n")
  
    retval = 0;
--- 235,239 ----
    int retval;
  
!   //OLSR_PRINTF(1, "TC: update MPRS\n");
  
    retval = 0;
***************
*** 306,310 ****
  
                    else
!                     OLSR_PRINTF(3, "Skipping Dijkstra (4)\n")
                  }
  
--- 305,309 ----
  
                    else
!                     OLSR_PRINTF(3, "Skipping Dijkstra (4)\n");
                  }
  
***************
*** 327,331 ****
  
                    else
!                     OLSR_PRINTF(3, "Skipping Dijkstra (5)\n")
                  }
              }
--- 326,330 ----
  
                    else
!                     OLSR_PRINTF(3, "Skipping Dijkstra (5)\n");
                  }
              }
***************
*** 353,357 ****
    struct topo_dst *dsts;
    
!   //OLSR_PRINTF(1, "TC: lookup dst\n")
  
    for(dsts = entry->destinations.next; 
--- 352,356 ----
    struct topo_dst *dsts;
    
!   //OLSR_PRINTF(1, "TC: lookup dst\n");
  
    for(dsts = entry->destinations.next; 
***************
*** 432,445 ****
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec / 10000)
  
    if (olsr_cnf->ip_version == AF_INET)
      {
!       OLSR_PRINTF(1, "Source IP addr   Dest IP addr     LQ     ILQ    ETX\n")
        fstr = "%-15s  %-15s  %5.3f  %5.3f  %.2f\n";
      }
    else
      {
!       OLSR_PRINTF(1, "Source IP addr                Dest IP addr                    LQ     ILQ    ETX\n")
        fstr = "%-30s%-30s  %5.3f  %5.3f  %.2f\n";
      }
--- 431,444 ----
                nowtm->tm_min,
                nowtm->tm_sec,
!               (int)now.tv_usec / 10000);
  
    if (olsr_cnf->ip_version == AF_INET)
      {
!       OLSR_PRINTF(1, "Source IP addr   Dest IP addr     LQ     ILQ    ETX\n");
        fstr = "%-15s  %-15s  %5.3f  %5.3f  %.2f\n";
      }
    else
      {
!       OLSR_PRINTF(1, "Source IP addr                Dest IP addr                    LQ     ILQ    ETX\n");
        fstr = "%-30s%-30s  %5.3f  %5.3f  %.2f\n";
      }
***************
*** 462,466 ****
                            olsr_ip_to_string(&dst_entry->T_dest_addr),
                            dst_entry->link_quality, dst_entry->inverse_link_quality,
!                           etx)                
              }
          }
--- 461,465 ----
                            olsr_ip_to_string(&dst_entry->T_dest_addr),
                            dst_entry->link_quality, dst_entry->inverse_link_quality,
!                           etx);
              }
          }

Index: mpr_selector_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/mpr_selector_set.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** mpr_selector_set.c	20 Apr 2007 13:46:04 -0000	1.16
--- mpr_selector_set.c	25 Apr 2007 22:08:09 -0000	1.17
***************
*** 58,62 ****
  olsr_init_mprs_set(void)
  {
!   OLSR_PRINTF(5, "MPRS: Init\n")
    /* Initial values */
    ansn = 0;
--- 58,62 ----
  olsr_init_mprs_set(void)
  {
!   OLSR_PRINTF(5, "MPRS: Init\n");
    /* Initial values */
    ansn = 0;
***************
*** 106,110 ****
    struct mpr_selector *new_entry;
  
!   OLSR_PRINTF(1, "MPRS: adding %s\n", olsr_ip_to_string(addr))
  
    new_entry = olsr_malloc(sizeof(struct mpr_selector), "Add MPR selector");
--- 106,110 ----
    struct mpr_selector *new_entry;
  
!   OLSR_PRINTF(1, "MPRS: adding %s\n", olsr_ip_to_string(addr));
  
    new_entry = olsr_malloc(sizeof(struct mpr_selector), "Add MPR selector");
***************
*** 143,147 ****
    if(addr == NULL)
      return NULL;
!   //OLSR_PRINTF(1, "MPRS: Lookup....")
  
    mprs = mprs_list.next;
--- 143,147 ----
    if(addr == NULL)
      return NULL;
!   //OLSR_PRINTF(1, "MPRS: Lookup....");
  
    mprs = mprs_list.next;
***************
*** 152,156 ****
        if(COMP_IP(&mprs->MS_main_addr, addr))
  	{
! 	  //OLSR_PRINTF(1, "MATCH\n")
  	  return mprs;
  	}
--- 152,156 ----
        if(COMP_IP(&mprs->MS_main_addr, addr))
  	{
! 	  //OLSR_PRINTF(1, "MATCH\n");
  	  return mprs;
  	}
***************
*** 158,162 ****
      }
    
!   //OLSR_PRINTF(1, "NO MACH\n")
    return NULL;
  }
--- 158,162 ----
      }
    
!   //OLSR_PRINTF(1, "NO MACH\n");
    return NULL;
  }
***************
*** 178,182 ****
    int retval;
  
!   OLSR_PRINTF(5, "MPRS: Update %s\n", olsr_ip_to_string(addr))
  
    retval = 0;
--- 178,182 ----
    int retval;
  
!   OLSR_PRINTF(5, "MPRS: Update %s\n", olsr_ip_to_string(addr));
  
    retval = 0;
***************
*** 213,217 ****
  	  mprs = mprs->next;
  
! 	  OLSR_PRINTF(1, "MPRS: Timing out %s\n", olsr_ip_to_string(&mprs_to_delete->MS_main_addr))
  
  	  DEQUEUE_ELEM(mprs_to_delete);
--- 213,217 ----
  	  mprs = mprs->next;
  
! 	  OLSR_PRINTF(1, "MPRS: Timing out %s\n", olsr_ip_to_string(&mprs_to_delete->MS_main_addr));
  
  	  DEQUEUE_ELEM(mprs_to_delete);
***************
*** 233,242 ****
  {
    struct mpr_selector *mprs;
!   OLSR_PRINTF(1, "MPR SELECTORS: ")
  
      for(mprs = mprs_list.next; mprs != &mprs_list; mprs = mprs->next)
      {
!       OLSR_PRINTF(1, "%s ", olsr_ip_to_string(&mprs->MS_main_addr))
      }
!   OLSR_PRINTF(1, "\n")
  }
--- 233,242 ----
  {
    struct mpr_selector *mprs;
!   OLSR_PRINTF(1, "MPR SELECTORS: ");
  
      for(mprs = mprs_list.next; mprs != &mprs_list; mprs = mprs->next)
      {
!       OLSR_PRINTF(1, "%s ", olsr_ip_to_string(&mprs->MS_main_addr));
      }
!   OLSR_PRINTF(1, "\n");
  }

Index: parser.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/parser.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** parser.c	20 Apr 2007 13:46:04 -0000	1.33
--- parser.c	25 Apr 2007 22:08:10 -0000	1.34
***************
*** 90,94 ****
  olsr_init_parser(void)
  {
!   OLSR_PRINTF(3, "Initializing parser...\n")
  
    /* Initialize the packet functions */
--- 90,94 ----
  olsr_init_parser(void)
  {
!   OLSR_PRINTF(3, "Initializing parser...\n");
  
    /* Initialize the packet functions */
***************
*** 102,106 ****
    struct parse_function_entry *new_entry;
  
!   OLSR_PRINTF(3, "Parser: registering event for type %d\n", type)
   
  
--- 102,106 ----
    struct parse_function_entry *new_entry;
  
!   OLSR_PRINTF(3, "Parser: registering event for type %d\n", type);
   
  
***************
*** 115,119 ****
    parse_functions = new_entry;
  
!   OLSR_PRINTF(3, "Register parse function: Added function for type %d\n", type)
  
  }
--- 115,119 ----
    parse_functions = new_entry;
  
!   OLSR_PRINTF(3, "Register parse function: Added function for type %d\n", type);
  
  }
***************
*** 182,186 ****
    if (ntohs(olsr->olsr_packlen) != size)
      {
!       OLSR_PRINTF(1, "Size error detected in received packet.\nRecieved %d, in packet %d\n", size, ntohs(olsr->olsr_packlen))
  	    
        olsr_syslog(OLSR_LOG_ERR, " packet length error in  packet received from %s!",
--- 182,186 ----
    if (ntohs(olsr->olsr_packlen) != size)
      {
!       OLSR_PRINTF(1, "Size error detected in received packet.\nRecieved %d, in packet %d\n", size, ntohs(olsr->olsr_packlen));
  	    
        olsr_syslog(OLSR_LOG_ERR, " packet length error in  packet received from %s!",
***************
*** 246,250 ****
  	{
  	  OLSR_PRINTF(1, "packet length error in  packet received from %s!",
! 		      olsr_ip_to_string(from_addr))
  
  	  olsr_syslog(OLSR_LOG_ERR, " packet length error in  packet received from %s!",
--- 246,250 ----
  	{
  	  OLSR_PRINTF(1, "packet length error in  packet received from %s!",
! 		      olsr_ip_to_string(from_addr));
  
  	  olsr_syslog(OLSR_LOG_ERR, " packet length error in  packet received from %s!",
***************
*** 262,266 ****
  	      OLSR_PRINTF(2, "Dropping packet type %d from neigh %s with TTL 0\n", 
  			  m->v4.olsr_msgtype,
! 			  olsr_ip_to_string(from_addr))
  	      continue;
  	    }
--- 262,266 ----
  	      OLSR_PRINTF(2, "Dropping packet type %d from neigh %s with TTL 0\n", 
  			  m->v4.olsr_msgtype,
! 			  olsr_ip_to_string(from_addr));
  	      continue;
  	    }
***************
*** 273,277 ****
  	      OLSR_PRINTF(2, "Dropping packet type %d from %s with TTL 0\n", 
  			  m->v4.olsr_msgtype,
! 			  olsr_ip_to_string(from_addr))
  	      continue;
  	    }
--- 273,277 ----
  	      OLSR_PRINTF(2, "Dropping packet type %d from %s with TTL 0\n", 
  			  m->v4.olsr_msgtype,
! 			  olsr_ip_to_string(from_addr));
  	      continue;
  	    }
***************
*** 290,294 ****
  	{
  #ifdef DEBUG
! 	  OLSR_PRINTF(3, "Not processing message originating from us!\n")
  #endif
  	  continue;
--- 290,294 ----
  	{
  #ifdef DEBUG
! 	  OLSR_PRINTF(3, "Not processing message originating from us!\n");
  #endif
  	  continue;
***************
*** 324,328 ****
  		      m->v4.olsr_msgtype,
  		      size,
! 		      olsr_ip_to_string(&unkpacket.originator))
  
  	  /* Forward message */
--- 324,328 ----
  		      m->v4.olsr_msgtype,
  		      size,
! 		      olsr_ip_to_string(&unkpacket.originator));
  
  	  /* Forward message */
***************
*** 370,374 ****
        if (32 < ++cpu_overload_exit)
        {
!         OLSR_PRINTF(1, "CPU overload detected, ending olsr_input() loop\n")
        	break;
        }
--- 370,374 ----
        if (32 < ++cpu_overload_exit)
        {
!         OLSR_PRINTF(1, "CPU overload detected, ending olsr_input() loop\n");
        	break;
        }
***************
*** 387,391 ****
  	  if (cc < 0 && errno != EWOULDBLOCK)
  	    {
! 	      OLSR_PRINTF(1, "error recvfrom: %s", strerror(errno))
  	      olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %m");
  	    }
--- 387,391 ----
  	  if (cc < 0 && errno != EWOULDBLOCK)
  	    {
! 	      OLSR_PRINTF(1, "error recvfrom: %s", strerror(errno));
  	      olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %m");
  	    }
***************
*** 406,410 ****
        
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Recieved a packet from %s\n", olsr_ip_to_string((union olsr_ip_addr *)&((struct sockaddr_in *)&from)->sin_addr.s_addr))
  #endif
  	
--- 406,410 ----
        
  #ifdef DEBUG
!       OLSR_PRINTF(5, "Recieved a packet from %s\n", olsr_ip_to_string((union olsr_ip_addr *)&((struct sockaddr_in *)&from)->sin_addr.s_addr));
  #endif
  	
***************
*** 422,426 ****
  	  OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n",
  		      olsr_ip_to_string(&from_addr),
! 		      cc)
  	  olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n",
  		 olsr_ip_to_string(&from_addr),
--- 422,426 ----
  	  OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n",
  		      olsr_ip_to_string(&from_addr),
! 		      cc);
  	  olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n",
  		 olsr_ip_to_string(&from_addr),
***************
*** 503,508 ****
        if (cc < 0 && errno != EWOULDBLOCK)
  	{
! 	  OLSR_PRINTF(1, "error recvfrom: %s", strerror(errno))
! 	    olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %m");
  	}
        return;
--- 503,509 ----
        if (cc < 0 && errno != EWOULDBLOCK)
  	{
!           const char * const err_msg = strerror(errno);
! 	  OLSR_PRINTF(1, "error recvfrom: %s", err_msg);
!           olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %s", err_msg);
  	}
        return;
***************
*** 519,526 ****
        OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n",
  		  olsr_ip_to_string(&from_addr),
! 		  cc)
! 	olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n",
! 		    olsr_ip_to_string(&from_addr),
! 		    cc);
        return;
      }
--- 520,527 ----
        OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n",
  		  olsr_ip_to_string(&from_addr),
! 		  cc);
!       olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n",
!                   olsr_ip_to_string(&from_addr),
!                   cc);
        return;
      }

Index: scheduler.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/scheduler.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** scheduler.c	20 Apr 2007 13:46:04 -0000	1.38
--- scheduler.c	25 Apr 2007 22:08:16 -0000	1.39
***************
*** 133,138 ****
    interval.tv_usec = interval_usec % 1000000;
  
!   OLSR_PRINTF(1, "Scheduler started - polling every %0.2f seconds\n", pollrate)
!   OLSR_PRINTF(3, "Max jitter is %f\n\n", olsr_cnf->max_jitter)
  
    /* Main scheduler event loop */
--- 133,138 ----
    interval.tv_usec = interval_usec % 1000000;
  
!   OLSR_PRINTF(1, "Scheduler started - polling every %0.2f seconds\n", pollrate);
!   OLSR_PRINTF(3, "Max jitter is %f\n\n", olsr_cnf->max_jitter);
  
    /* Main scheduler event loop */
***************
*** 170,174 ****
        if(link_changes)
          {
! 	  OLSR_PRINTF(3, "ANSN UPDATED %d\n\n", get_local_ansn())
  	  increase_local_ansn();
            link_changes = OLSR_FALSE;
--- 170,174 ----
        if(link_changes)
          {
! 	  OLSR_PRINTF(3, "ANSN UPDATED %d\n\n", get_local_ansn());
  	  increase_local_ansn();
            link_changes = OLSR_FALSE;
***************
*** 201,205 ****
  		*(entry->trigger) = 0;
  	      
! 	      //OLSR_PRINTF(3, "Since_last jitter: %0.2f\n", entry->since_last)
  
  	    }
--- 201,205 ----
  		*(entry->trigger) = 0;
  	      
! 	      //OLSR_PRINTF(3, "Since_last jitter: %0.2f\n", entry->since_last);
  
  	    }
***************
*** 278,282 ****
    struct event_entry *new_entry;
  
!   OLSR_PRINTF(3, "Scheduler event registered int: %0.2f\n", interval)
  
    /* check that this entry is not added already */
--- 278,282 ----
    struct event_entry *new_entry;
  
!   OLSR_PRINTF(3, "Scheduler event registered int: %0.2f\n", interval);
  
    /* check that this entry is not added already */





More information about the Olsr-cvs mailing list