Merge branch 'master' into mpr_rework
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 19 Jan 2016 13:22:01 +0000 (14:22 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 19 Jan 2016 13:22:01 +0000 (14:22 +0100)
15 files changed:
1  2 
src-plugins/nhdp/constant_metric/constant_metric.c
src-plugins/nhdp/ff_dat_metric/ff_dat_metric.c
src-plugins/nhdp/mpr/mpr.c
src-plugins/nhdp/mpr/mpr_internal.h
src-plugins/nhdp/mpr/neighbor-graph-routing.c
src-plugins/nhdp/nhdp/nhdp_db.c
src-plugins/nhdp/nhdp/nhdp_db.h
src-plugins/nhdp/nhdp/nhdp_domain.c
src-plugins/nhdp/nhdp/nhdp_domain.h
src-plugins/nhdp/nhdp/nhdp_reader.c
src-plugins/olsrv2/olsrv2/olsrv2.c
src-plugins/olsrv2/olsrv2/olsrv2.h
src-plugins/olsrv2/olsrv2/olsrv2_routing.c
src-plugins/olsrv2/olsrv2/olsrv2_routing.h
src-plugins/olsrv2/olsrv2/olsrv2_writer.c

@@@ -276,8 -286,18 +286,15 @@@ _cb_set_linkcost(void *ptr __attribute_
        nhdp_domain_set_incoming_metric(&_constant_metric_handler, lnk, RFC7181_METRIC_INFINITE);
      }
    }
 -
 -  /* update neighbor metrics */
 -  nhdp_domain_neighborhood_changed();
  }
  
+ /**
+  * compare two linkcosts with each other by comparing
+  * interface name and neighbor IP
+  * @param ptr1
+  * @param ptr2
+  * @return
+  */
  static int
  _avlcmp_linkcost(const void *ptr1, const void *ptr2) {
    const struct _linkcost *lk1, *lk2;
@@@ -665,9 -679,19 +676,14 @@@ _cb_dat_sampling(void *ptr __attribute_
      ldata->buckets[ldata->activePtr].received = 0;
      ldata->buckets[ldata->activePtr].total = 0;
    }
 -
 -  /* update neighbor metrics */
 -  if (change_happened) {
 -    nhdp_domain_neighborhood_changed();
 -  }
  }
  
- void
+ /**
+  * Calculate how many neigbors a link has
+  * @param lnk nhdp link
+  * @param data ff data link data
+  */
+ static void
  _calculate_link_neighborhood(struct nhdp_link *lnk, struct link_datff_data *data) {
    struct nhdp_l2hop *l2hop;
    struct nhdp_laddr *laddr;
Simple merge
Simple merge
@@@ -272,12 -259,12 +272,16 @@@ nhdp_db_neighbor_remove(struct nhdp_nei
    /* remove from global list and free memory */
    list_remove(&neigh->_global_node);
    oonf_class_free(&_neigh_info, neigh);
 +
 +  if (was_mpr) {
 +    nhdp_domain_recalculate_mpr(true);
 +  }
  }
  
+ /**
+  * Set a NHDP neighbor to unsymmetric
+  * @param neigh nhdp neighbor
+  */
  void
  nhdp_db_neighbor_set_unsymmetric(struct nhdp_neighbor *neigh) {
    struct nhdp_link *lnk;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -75,9 -88,10 +88,8 @@@ EXPORT bool olsrv2_mpr_shall_process
  EXPORT bool olsrv2_mpr_shall_forwarding(
      struct rfc5444_reader_tlvblock_context *context,
      struct netaddr *source_address, uint64_t vtime);
 -EXPORT uint16_t olsrv2_get_ansn(void);
 -EXPORT uint16_t olsrv2_update_ansn(void);
  EXPORT int olsrv2_validate_lan(const struct cfg_schema_entry *entry,
      const char *section_name, const char *value, struct autobuf *out);
- EXPORT int olsrv2_avl_cmp_sourcspec_prefix(const void *p1, const void *p2);
  
  /**
   * @return validity time of former originator IDs