rename: zero-change commit
authorHannes Gredler <hannes@gredler.at>
Fri, 29 May 2009 20:25:46 +0000 (22:25 +0200)
committerHannes Gredler <hannes@gredler.at>
Fri, 29 May 2009 20:25:46 +0000 (22:25 +0200)
14 files changed:
lib/dot_draw/src/olsrd_dot_draw.c
lib/httpinfo/src/olsrd_httpinfo.c
lib/txtinfo/src/olsrd_txtinfo.c
src/link_set.c
src/lq_mpr.c
src/lq_packet.c
src/mid_set.c
src/mpr.c
src/neighbor_table.c
src/neighbor_table.h
src/process_package.c
src/tc_set.c
src/two_hop_neighbor_table.c
src/two_hop_neighbor_table.h

index bd94d55..e076051 100644 (file)
@@ -152,7 +152,7 @@ ipc_print_neigh_link(int ipc_connection, const struct nbr_entry *neighbor)
   if (neighbor->status == 0) {  /* non SYM */
     style = "dashed";
   } else {
-    const struct link_entry *lnk = get_best_link_to_neighbor(&neighbor->neighbor_main_addr);
+    const struct link_entry *lnk = get_best_link_to_neighbor(&neighbor->nbr_addr);
     if (lnk) {
       etx = lnk->linkcost;
     }
@@ -161,7 +161,7 @@ ipc_print_neigh_link(int ipc_connection, const struct nbr_entry *neighbor)
 
   ipc_send_fmt(ipc_connection,
                "\"%s\" -> \"%s\"[label=\"%s\", style=%s];\n",
-               adr, olsr_ip_to_string(&strbuf, &neighbor->neighbor_main_addr), get_linkcost_text(etx, false, &lqbuffer), style);
+               adr, olsr_ip_to_string(&strbuf, &neighbor->nbr_addr), get_linkcost_text(etx, false, &lqbuffer), style);
 
   if (neighbor->is_mpr) {
     ipc_send_fmt(ipc_connection, "\"%s\"[shape=box];\n", adr);
index 6feb0b1..7f6ca7a 100644 (file)
@@ -958,14 +958,14 @@ build_neigh_body(struct autobuf *abuf)
     struct nbr2_list_entry *list_2;
     int thop_cnt;
     abuf_puts(abuf, "<tr>");
-    build_ipaddr_with_link(abuf, &neigh->neighbor_main_addr, -1);
+    build_ipaddr_with_link(abuf, &neigh->nbr_addr, -1);
     abuf_appendf(abuf,
                  "<td>%s</td>"
                  "<td>%s</td>"
                  "<td>%s</td>"
                  "<td>%d</td>",
                  (neigh->status == SYM) ? "YES" : "NO",
-                 neigh->is_mpr ? "YES" : "NO", olsr_lookup_mprs_set(&neigh->neighbor_main_addr) ? "YES" : "NO", neigh->willingness);
+                 neigh->is_mpr ? "YES" : "NO", olsr_lookup_mprs_set(&neigh->nbr_addr) ? "YES" : "NO", neigh->willingness);
 
     abuf_puts(abuf, "<td><select>\n" "<option>IP ADDRESS</option>\n");
 
index 3656c73..74b8b3d 100644 (file)
@@ -188,10 +188,10 @@ txtinfo_neigh(struct comport_connection *con,  char *cmd __attribute__ ((unused)
   OLSR_FOR_ALL_NBR_ENTRIES(neigh) {
     struct ipaddr_str buf1;
     if (abuf_appendf(&con->out, !con->is_csv ? "%s\t%s\t%s\t%s\t%d\t%d\n" : "neigh,%s,%s,%s,%s,%d,%d\n",
-                       olsr_ip_to_string(&buf1, &neigh->neighbor_main_addr),
+                       olsr_ip_to_string(&buf1, &neigh->nbr_addr),
                        neigh->status == SYM ? "YES" : "NO",
                        neigh->is_mpr ? "YES" : "NO",
-                       olsr_lookup_mprs_set(&neigh->neighbor_main_addr) ? "YES" : "NO", neigh->willingness, neigh->nbr2_list_tree.count) < 0) {
+                       olsr_lookup_mprs_set(&neigh->nbr_addr) ? "YES" : "NO", neigh->willingness, neigh->nbr2_list_tree.count) < 0) {
         return ABUF_ERROR;
     }
   } OLSR_FOR_ALL_NBR_ENTRIES_END(neigh);
index f404c5a..a1cf41e 100644 (file)
@@ -199,7 +199,7 @@ get_best_link_to_neighbor(const union olsr_ip_addr *remote)
   OLSR_FOR_ALL_LINK_ENTRIES(walker) {
 
     /* if this is not a link to the neighour in question, skip */
-    if (olsr_ipcmp(&walker->neighbor->neighbor_main_addr, main_addr) != 0)
+    if (olsr_ipcmp(&walker->neighbor->nbr_addr, main_addr) != 0)
       continue;
 
     /* get the link cost */
@@ -289,11 +289,11 @@ olsr_delete_link_entry(struct link_entry *link)
    * Delete the rt_path for the link-end.
    */
   olsr_delete_routing_table(&link->neighbor_iface_addr, 8 * olsr_cnf->ipsize,
-                            &link->neighbor->neighbor_main_addr, OLSR_RT_ORIGIN_LINK);
+                            &link->neighbor->nbr_addr, OLSR_RT_ORIGIN_LINK);
 
   /* Delete neighbor entry */
   if (link->neighbor->linkcount == 1) {
-    olsr_delete_nbr_entry(&link->neighbor->neighbor_main_addr);
+    olsr_delete_nbr_entry(&link->neighbor->nbr_addr);
   } else {
     link->neighbor->linkcount--;
   }
@@ -572,14 +572,14 @@ lookup_link_entry(const union olsr_ip_addr *remote, const union olsr_ip_addr *re
     if (olsr_ipcmp(remote, &link->neighbor_iface_addr) == 0 && (link->if_name ? !strcmp(link->if_name, local->int_name)
                                                                 : olsr_ipcmp(&local->ip_addr, &link->local_iface_addr) == 0)) {
       /* check the remote-main address only if there is one given */
-      if (NULL != remote_main && olsr_ipcmp(remote_main, &link->neighbor->neighbor_main_addr) != 0) {
+      if (NULL != remote_main && olsr_ipcmp(remote_main, &link->neighbor->nbr_addr) != 0) {
         /* Neighbor has changed it's main_addr, update */
 #if !defined REMOVE_LOG_DEBUG
         struct ipaddr_str oldbuf, newbuf;
 #endif
         OLSR_DEBUG(LOG_LINKS, "Neighbor changed main_ip, updating %s -> %s\n",
-                   olsr_ip_to_string(&oldbuf, &link->neighbor->neighbor_main_addr), olsr_ip_to_string(&newbuf, remote_main));
-        link->neighbor->neighbor_main_addr = *remote_main;
+                   olsr_ip_to_string(&oldbuf, &link->neighbor->nbr_addr), olsr_ip_to_string(&newbuf, remote_main));
+        link->neighbor->nbr_addr = *remote_main;
       }
       return link;
     }
index ff25079..b5c4445 100644 (file)
@@ -50,7 +50,7 @@
 void
 olsr_calculate_lq_mpr(void)
 {
-  struct nbr2_entry *neigh2;
+  struct nbr2_entry *nbr2;
   struct nbr_list_entry *walker;
   int k;
   struct nbr_entry *neigh;
@@ -83,13 +83,13 @@ olsr_calculate_lq_mpr(void)
   OLSR_FOR_ALL_NBR_ENTRIES_END(neigh);
 
   /* loop through all 2-hop neighbours */
-  OLSR_FOR_ALL_NBR2_ENTRIES(neigh2) {
+  OLSR_FOR_ALL_NBR2_ENTRIES(nbr2) {
 
     best_1hop = LINK_COST_BROKEN;
 
     /* check whether this 2-hop neighbour is also a neighbour */
 
-    neigh = olsr_lookup_nbr_entry(&neigh2->nbr2_addr);
+    neigh = olsr_lookup_nbr_entry(&nbr2->nbr2_addr);
 
     /* if it's a neighbour and also symmetric, then examine
        the link quality */
@@ -101,7 +101,7 @@ olsr_calculate_lq_mpr(void)
 
       /* determine the link quality of the direct link */
 
-      struct link_entry *lnk = get_best_link_to_neighbor(&neigh->neighbor_main_addr);
+      struct link_entry *lnk = get_best_link_to_neighbor(&neigh->nbr_addr);
 
       if (!lnk)
         continue;
@@ -109,11 +109,11 @@ olsr_calculate_lq_mpr(void)
       best_1hop = lnk->linkcost;
 
       /* see wether we find a better route via an MPR */
-      OLSR_FOR_ALL_NBR_LIST_ENTRIES(neigh2, walker) {
+      OLSR_FOR_ALL_NBR_LIST_ENTRIES(nbr2, walker) {
         if (walker->path_linkcost < best_1hop) {
           break;
         }
-      } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(neigh2, walker);
+      } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(nbr2, walker);
 
       /* we've reached the end of the list, so we haven't found
        * a better route via an MPR - so, skip MPR selection for
@@ -128,9 +128,9 @@ olsr_calculate_lq_mpr(void)
 
       /* mark all 1-hop neighbours as not selected */
 
-      OLSR_FOR_ALL_NBR_LIST_ENTRIES(neigh2, walker) {
+      OLSR_FOR_ALL_NBR_LIST_ENTRIES(nbr2, walker) {
         walker->neighbor->skip = false;
-      } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(neigh2, walker);
+      } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(nbr2, walker);
 
       for (k = 0; k < olsr_cnf->mpr_coverage; k++) {
         /* look for the best 1-hop neighbour that we haven't
@@ -139,12 +139,12 @@ olsr_calculate_lq_mpr(void)
         neigh = NULL;
         best = LINK_COST_BROKEN;
 
-        OLSR_FOR_ALL_NBR_LIST_ENTRIES(neigh2, walker) {
+        OLSR_FOR_ALL_NBR_LIST_ENTRIES(nbr2, walker) {
           if (walker->neighbor->status == SYM && !walker->neighbor->skip && walker->path_linkcost < best) {
             neigh = walker->neighbor;
             best = walker->path_linkcost;
           }
-        } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(neigh2, walker);
+        } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(nbr2, walker);
 
         /* Found a 1-hop neighbor that we haven't previously selected.
          * Use it as MPR only when the 2-hop path through it is better than
index 7cb03f8..f99804c 100644 (file)
@@ -119,7 +119,7 @@ create_lq_hello(struct lq_hello_message *lq_hello, struct interface *outif)
 
     else {
       OLSR_WARN(LOG_PACKET_CREATION, "Error: neigh_type %d in link %s undefined\n",
-                walker->neighbor->status, olsr_ip_to_string(&buf, &walker->neighbor->neighbor_main_addr));
+                walker->neighbor->status, olsr_ip_to_string(&buf, &walker->neighbor->nbr_addr));
       neigh->neigh_type = NOT_NEIGH;
     }
 
@@ -208,7 +208,7 @@ create_lq_tc(struct lq_tc_message *lq_tc, struct interface *outif)
      *
      * Only consider MPRs and MPR selectors
      */
-    if (olsr_cnf->tc_redundancy == 1 && !walker->is_mpr && !olsr_lookup_mprs_set(&walker->neighbor_main_addr)) {
+    if (olsr_cnf->tc_redundancy == 1 && !walker->is_mpr && !olsr_lookup_mprs_set(&walker->nbr_addr)) {
       continue;
     }
 
@@ -217,12 +217,12 @@ create_lq_tc(struct lq_tc_message *lq_tc, struct interface *outif)
      *
      * Only consider MPR selectors
      */
-    if (olsr_cnf->tc_redundancy == 0 && !olsr_lookup_mprs_set(&walker->neighbor_main_addr)) {
+    if (olsr_cnf->tc_redundancy == 0 && !olsr_lookup_mprs_set(&walker->nbr_addr)) {
       continue;
     }
 
     /* Set the entry's link quality */
-    lnk = get_best_link_to_neighbor(&walker->neighbor_main_addr);
+    lnk = get_best_link_to_neighbor(&walker->nbr_addr);
     if (!lnk) {
       continue;                 // no link ?
     }
@@ -235,7 +235,7 @@ create_lq_tc(struct lq_tc_message *lq_tc, struct interface *outif)
     neigh = olsr_malloc_tc_mpr_addr();
 
     /* Set the entry's main address. */
-    neigh->address = walker->neighbor_main_addr;
+    neigh->address = walker->nbr_addr;
 
     if (lnk) {
       olsr_copylq_link_entry_2_tc_mpr_addr(neigh, lnk);
index 757d066..9ea1681 100644 (file)
@@ -135,7 +135,7 @@ olsr_flush_nbr2_duplicates(struct mid_entry *alias)
       OLSR_DEBUG(LOG_MID, "Delete 2hop neighbor: %s to %s\n",
                  olsr_ip_to_string(&buf1, &alias->mid_alias_addr), olsr_ip_to_string(&buf2, &tc->addr));
 
-      olsr_delete_two_hop_neighbor_table(nbr2);
+      olsr_delete_nbr2_entry(nbr2);
       changes_neighborhood = true;
     }
 
index 353550b..90a37a1 100644 (file)
--- a/src/mpr.c
+++ b/src/mpr.c
@@ -85,7 +85,7 @@ olsr_chosen_mpr(struct nbr_entry *one_hop_neighbor, uint16_t * two_hop_covered_c
 #endif
   count = *two_hop_covered_count;
 
-  OLSR_DEBUG(LOG_MPR, "Setting %s as MPR\n", olsr_ip_to_string(&buf, &one_hop_neighbor->neighbor_main_addr));
+  OLSR_DEBUG(LOG_MPR, "Setting %s as MPR\n", olsr_ip_to_string(&buf, &one_hop_neighbor->nbr_addr));
 
   //printf("PRE COUNT: %d\n\n", count);
 
@@ -150,7 +150,7 @@ olsr_find_maximum_covered(int willingness)
   OLSR_FOR_ALL_NBR_ENTRIES(a_neighbor) {
 
     OLSR_DEBUG(LOG_MPR, "[%s] nocov: %d mpr: %d will: %d max: %d\n\n",
-               olsr_ip_to_string(&buf, &a_neighbor->neighbor_main_addr),
+               olsr_ip_to_string(&buf, &a_neighbor->nbr_addr),
                a_neighbor->nbr2_nocov, a_neighbor->is_mpr, a_neighbor->willingness, maximum);
 
     if ((!a_neighbor->is_mpr) && (a_neighbor->willingness == willingness) && (maximum < a_neighbor->nbr2_nocov)) {
@@ -297,7 +297,7 @@ add_will_always_nodes(void)
     }
     olsr_chosen_mpr(a_neighbor, &count);
 
-    OLSR_DEBUG(LOG_MPR, "Adding WILL_ALWAYS: %s\n", olsr_ip_to_string(&buf, &a_neighbor->neighbor_main_addr));
+    OLSR_DEBUG(LOG_MPR, "Adding WILL_ALWAYS: %s\n", olsr_ip_to_string(&buf, &a_neighbor->nbr_addr));
 
   } OLSR_FOR_ALL_NBR_ENTRIES_END(a_neighbor);
 
@@ -461,7 +461,7 @@ olsr_optimize_mpr_set(void)
         } OLSR_FOR_ALL_NBR2_LIST_ENTRIES_END(a_neighbor, two_hop_list_list);
 
         if (remove_it) {
-          OLSR_DEBUG(LOG_MPR, "MPR OPTIMIZE: removiong mpr %s\n\n", olsr_ip_to_string(&buf, &a_neighbor->neighbor_main_addr));
+          OLSR_DEBUG(LOG_MPR, "MPR OPTIMIZE: removiong mpr %s\n\n", olsr_ip_to_string(&buf, &a_neighbor->nbr_addr));
           a_neighbor->is_mpr = false;
         }
       }
@@ -485,7 +485,7 @@ olsr_print_mpr_set(void)
      */
     if (a_neighbor->is_mpr) {
       struct ipaddr_str buf;
-      OLSR_INFO_NH(LOG_MPR, "\t[%s]\n", olsr_ip_to_string(&buf, &a_neighbor->neighbor_main_addr));
+      OLSR_INFO_NH(LOG_MPR, "\t[%s]\n", olsr_ip_to_string(&buf, &a_neighbor->nbr_addr));
     }
   } OLSR_FOR_ALL_NBR_ENTRIES_END(a_neighbor);
 #endif
index d8bfaa1..f6d4741 100644 (file)
@@ -210,7 +210,7 @@ olsr_delete_nbr_entry(const union olsr_ip_addr * addr)
   OLSR_DEBUG(LOG_NEIGHTABLE, "Delete 1-hop neighbor: %s\n", olsr_ip_to_string(&buf, addr));
 
   OLSR_FOR_ALL_NBR2_LIST_ENTRIES(nbr, nbr2_list) {
-    olsr_delete_nbr_list_by_addr(nbr2_list->nbr2, &nbr->neighbor_main_addr);
+    olsr_delete_nbr_list_by_addr(nbr2_list->nbr2, &nbr->nbr_addr);
     olsr_delete_nbr2_list_entry(nbr2_list);
   } OLSR_FOR_ALL_NBR2_LIST_ENTRIES_END(nbr, nbr2_list);
 
@@ -252,7 +252,7 @@ olsr_add_nbr_entry(const union olsr_ip_addr *addr)
   nbr = olsr_cookie_malloc(nbr_mem_cookie);
 
   /* Set address, willingness and status */
-  nbr->neighbor_main_addr = *addr;
+  nbr->nbr_addr = *addr;
   nbr->willingness = WILL_NEVER;
   nbr->status = NOT_SYM;
 
@@ -264,7 +264,7 @@ olsr_add_nbr_entry(const union olsr_ip_addr *addr)
   nbr->was_mpr = false;
 
   /* Add to the global neighbor tree */
-  nbr->nbr_node.key = &nbr->neighbor_main_addr;
+  nbr->nbr_node.key = &nbr->nbr_addr;
   avl_insert(&nbr_tree, &nbr->nbr_node, AVL_DUP_NO);
 
   return nbr;
@@ -332,8 +332,8 @@ olsr_update_nbr_status(struct nbr_entry *entry, int lnk)
       struct nbr2_entry *two_hop_neighbor;
 
       /* Delete posible 2 hop entry on this neighbor */
-      if ((two_hop_neighbor = olsr_lookup_two_hop_neighbor_table(&entry->neighbor_main_addr)) != NULL) {
-        olsr_delete_two_hop_neighbor_table(two_hop_neighbor);
+      if ((two_hop_neighbor = olsr_lookup_two_hop_neighbor_table(&entry->nbr_addr)) != NULL) {
+        olsr_delete_nbr2_entry(two_hop_neighbor);
       }
 
       changes_neighborhood = true;
@@ -373,7 +373,7 @@ olsr_expire_nbr2_list(void *context)
   nbr = nbr2_list->nbr2_nbr;
   nbr2 = nbr2_list->nbr2;
 
-  olsr_delete_nbr_list_by_addr(nbr2, &nbr->neighbor_main_addr);
+  olsr_delete_nbr_list_by_addr(nbr2, &nbr->nbr_addr);
   olsr_delete_nbr2_list_entry(nbr2_list);
 }
 
@@ -399,16 +399,16 @@ olsr_print_neighbor_table(void)
 
   OLSR_FOR_ALL_NBR_ENTRIES(nbr) {
 
-    lnk = get_best_link_to_neighbor(&nbr->neighbor_main_addr);
+    lnk = get_best_link_to_neighbor(&nbr->nbr_addr);
     if (!lnk) {
       continue;
     }
 
     OLSR_INFO_NH(LOG_NEIGHTABLE, "%-*s  %s  %s  %s  %d\n",
-                 ipwidth, olsr_ip_to_string(&buf, &nbr->neighbor_main_addr),
+                 ipwidth, olsr_ip_to_string(&buf, &nbr->nbr_addr),
                  nbr->status == SYM ? "YES " : "NO  ",
                  nbr->is_mpr ? "YES " : "NO  ",
-                 olsr_lookup_mprs_set(&nbr->neighbor_main_addr) == NULL ? "NO  " : "YES ", nbr->willingness);
+                 olsr_lookup_mprs_set(&nbr->nbr_addr) == NULL ? "NO  " : "YES ", nbr->willingness);
   } OLSR_FOR_ALL_NBR_ENTRIES_END(nbr);
 #endif
 }
index c2ecdce..fb9379f 100644 (file)
@@ -65,7 +65,7 @@ AVLNODE2STRUCT(nbr2_list_node_to_nbr2_list, struct nbr2_list_entry, nbr2_list_no
 
 struct nbr_entry {
   struct avl_node nbr_node;            /* nbr keyed by ip address */
-  union olsr_ip_addr neighbor_main_addr;
+  union olsr_ip_addr nbr_addr;
   unsigned int status:3;
   unsigned int willingness:3;
   unsigned int is_mpr:1;
index b586f17..6997d70 100644 (file)
@@ -141,7 +141,7 @@ process_message_neighbors(struct nbr_entry *neighbor, const struct lq_hello_mess
   }
 
   /* Second pass */
-  lnk = get_best_link_to_neighbor(&neighbor->neighbor_main_addr);
+  lnk = get_best_link_to_neighbor(&neighbor->nbr_addr);
 
   if (!lnk) {
     return;
@@ -348,7 +348,7 @@ hello_tap(struct lq_hello_message *message, struct interface *in_if, const union
     struct ipaddr_str buf;
 #endif
     OLSR_DEBUG(LOG_LINKS, "Willingness for %s changed from %d to %d - UPDATING\n",
-               olsr_ip_to_string(&buf, &lnk->neighbor->neighbor_main_addr), lnk->neighbor->willingness, message->will);
+               olsr_ip_to_string(&buf, &lnk->neighbor->nbr_addr), lnk->neighbor->willingness, message->will);
     /*
      *If willingness changed - recalculate
      */
index 9430781..59ed12a 100644 (file)
@@ -242,7 +242,7 @@ olsr_change_myself_tc(void)
      */
     if (main_ip_change || entry->link_tc_edge == NULL) {
       struct nbr_entry *ne = entry->neighbor;
-      entry->link_tc_edge = olsr_add_tc_edge_entry(tc_myself, &ne->neighbor_main_addr, 0);
+      entry->link_tc_edge = olsr_add_tc_edge_entry(tc_myself, &ne->nbr_addr, 0);
 
       /*
        * Mark the edge local such that it does not get deleted
index f22f82c..5dae27a 100644 (file)
@@ -97,7 +97,7 @@ olsr_unlock_nbr2(struct nbr2_entry *nbr2)
    * Nobody is interested in this nbr2 anymore.
    * Remove all references to it and free.
    */
-  olsr_delete_two_hop_neighbor_table(nbr2);
+  olsr_delete_nbr2_entry(nbr2);
 }
 
 /*
@@ -147,7 +147,7 @@ olsr_delete_nbr_list_by_addr(struct nbr2_entry *nbr2, const union olsr_ip_addr *
  *@return nada
  */
 void
-olsr_delete_two_hop_neighbor_table(struct nbr2_entry *nbr2)
+olsr_delete_nbr2_entry(struct nbr2_entry *nbr2)
 {
   struct nbr_entry *nbr;
   struct nbr_list_entry *nbr_list;
@@ -276,7 +276,7 @@ olsr_add_nbr_list_entry(struct nbr_entry *nbr, struct nbr2_entry *nbr2)
   /*
    * Check if the entry exists.
    */
-  nbr_list = olsr_lookup_nbr_list_entry(nbr2, &nbr->neighbor_main_addr);
+  nbr_list = olsr_lookup_nbr_list_entry(nbr2, &nbr->nbr_addr);
   if (!nbr_list) {
 
     /*
@@ -288,7 +288,7 @@ olsr_add_nbr_list_entry(struct nbr_entry *nbr, struct nbr2_entry *nbr2)
     nbr_list->path_linkcost = LINK_COST_BROKEN;
     nbr_list->saved_path_linkcost = LINK_COST_BROKEN;
 
-    nbr_list->nbr_list_node.key = &nbr->neighbor_main_addr;
+    nbr_list->nbr_list_node.key = &nbr->nbr_addr;
     avl_insert(&nbr2->nbr2_nbr_list_tree, &nbr_list->nbr_list_node, AVL_DUP_NO);
   }
 }
@@ -318,7 +318,7 @@ olsr_print_two_hop_neighbor_table(void)
 {
 #if !defined REMOVE_LOG_INFO
   /* The whole function makes no sense without it. */
-  struct nbr2_entry *neigh2;
+  struct nbr2_entry *nbr2;
   struct nbr_list_entry *entry;
   struct ipaddr_str buf;
   struct lqtextbuffer lqbuffer;
@@ -327,17 +327,17 @@ olsr_print_two_hop_neighbor_table(void)
   OLSR_INFO(LOG_2NEIGH, "\n--- %s ----------------------- TWO-HOP NEIGHBORS\n\n"
             "IP addr (2-hop)  IP addr (1-hop)  Total cost\n", olsr_wallclock_string());
 
-  OLSR_FOR_ALL_NBR2_ENTRIES(neigh2) {
+  OLSR_FOR_ALL_NBR2_ENTRIES(nbr2) {
     first = true;
-    OLSR_FOR_ALL_NBR_LIST_ENTRIES(neigh2, entry) {
+    OLSR_FOR_ALL_NBR_LIST_ENTRIES(nbr2, entry) {
       OLSR_INFO_NH(LOG_2NEIGH, "%-15s  %-15s  %s\n",
-                   first ? olsr_ip_to_string(&buf, &neigh2->nbr2_addr) : "",
-                   olsr_ip_to_string(&buf, &entry->neighbor->neighbor_main_addr),
+                   first ? olsr_ip_to_string(&buf, &nbr2->nbr2_addr) : "",
+                   olsr_ip_to_string(&buf, &entry->neighbor->nbr_addr),
                    get_linkcost_text(entry->path_linkcost, false, &lqbuffer));
 
       first = false;
-    } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(neigh2, entry);
-  } OLSR_FOR_ALL_NBR2_ENTRIES_END(neigh2);
+    } OLSR_FOR_ALL_NBR_LIST_ENTRIES_END(nbr2, entry);
+  } OLSR_FOR_ALL_NBR2_ENTRIES_END(nbr2);
 #endif
 }
 
index afbd58a..90ee955 100644 (file)
@@ -106,7 +106,7 @@ void olsr_init_two_hop_table(void);
 void olsr_lock_nbr2(struct nbr2_entry *);
 void olsr_unlock_nbr2(struct nbr2_entry *);
 void olsr_delete_nbr_list_by_addr(struct nbr2_entry *, const union olsr_ip_addr *);
-void olsr_delete_two_hop_neighbor_table(struct nbr2_entry *);
+void olsr_delete_nbr2_entry(struct nbr2_entry *);
 struct nbr2_entry *olsr_add_nbr2_entry(const union olsr_ip_addr *);
 struct nbr2_entry *olsr_lookup_two_hop_neighbor_table(const union olsr_ip_addr *);
 struct nbr2_entry *olsr_lookup_nbr2_entry_alias(const union olsr_ip_addr *);