Routing table creation based on LQ compiles. Not tested at all.
[olsrd.git] / src / link_set.h
index 8252eea..b066d6d 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $ Id $
+ * $Id: link_set.h,v 1.13 2004/11/07 17:51:20 tlopatic Exp $
  *
  */
 
@@ -53,6 +53,31 @@ struct link_entry
   double last_htime;
   olsr_u16_t olsr_seqno;
 
+#if defined USE_LINK_QUALITY
+  /*
+   * packet loss
+   */
+
+  double loss_hello_int;
+  struct timeval loss_timeout;
+
+  olsr_u16_t loss_seqno;
+  int loss_seqno_valid;
+  int loss_missed_hellos;
+
+  int lost_packets;
+  int total_packets;
+
+  double loss_link_quality;
+
+  int loss_window_size;
+  int loss_index;
+
+  unsigned char loss_bitmap[16];
+
+  double neigh_link_quality;
+#endif
+
   /*
    * Spy
    */
@@ -73,7 +98,7 @@ struct timeval  hold_time_neighbor_nw;
 /* Function prototypes */
 
 void
-olsr_init_link_set();
+olsr_init_link_set(void);
 
 struct interface *
 get_interface_link_set(union olsr_ip_addr *);
@@ -97,5 +122,14 @@ replace_neighbor_link_set(struct neighbor_entry *,
 int
 lookup_link_status(struct link_entry *);
 
+#if defined USE_LINK_QUALITY
+void olsr_update_packet_loss_hello_int(struct link_entry *entry, double htime);
+void olsr_update_packet_loss(union olsr_ip_addr *rem, union olsr_ip_addr *loc,
+                        olsr_u16_t seqno);
+void olsr_print_link_set(void);
+double olsr_neighbor_best_link_quality(union olsr_ip_addr *main);
+struct link_entry *olsr_neighbor_best_link(union olsr_ip_addr *main);
+struct link_entry *olsr_neighbor_best_inverse_link(union olsr_ip_addr *main);
+#endif
 
 #endif