LQ messages are now processed. MPRs are selected based on the link
[olsrd.git] / src / packet.h
index 886b13f..13334a0 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: packet.h,v 1.6 2004/11/01 19:27:11 tlopatic Exp $
+ * $Id: packet.h,v 1.9 2004/11/05 20:58:10 tlopatic Exp $
  *
  */
 
@@ -43,6 +43,10 @@ struct hello_neighbor
 {
   olsr_u8_t             status;
   olsr_u8_t             link;
+#if defined USE_LINK_QUALITY
+  double                link_quality;
+  double                neigh_link_quality;
+#endif
   union olsr_ip_addr    main_address;
   union olsr_ip_addr    address;
   struct hello_neighbor *next;
@@ -61,33 +65,11 @@ struct hello_message
   
 };
 
-#if defined USE_LINK_QUALITY
-struct lq_hello_neighbor
-{
-  olsr_u8_t                link_type;
-  olsr_u8_t                neigh_type;
-  double                   link_quality;
-  union olsr_ip_addr       main;
-  union olsr_ip_addr       addr;
-  struct lq_hello_neighbor *next;
-};
-
-struct lq_hello_message
-{
-  double                   vtime;
-  double                   htime;
-  union olsr_ip_addr       main;
-  olsr_u16_t               seqno;
-  olsr_u8_t                hops;
-  olsr_u8_t                ttl;
-  olsr_u8_t                will;
-  struct lq_hello_neighbor *neigh;
-};
-#endif
-
 struct tc_mpr_addr
 {
-
+#if defined USE_LINK_QUALITY
+  double             link_quality;
+#endif
   union olsr_ip_addr address;
   struct tc_mpr_addr *next;
 };
@@ -104,27 +86,6 @@ struct tc_message
   struct tc_mpr_addr  *multipoint_relay_selector_address;
 };
 
-#if defined USE_LINK_QUALITY
-struct lq_tc_neighbor
-{
-  double                link_quality;
-  union olsr_ip_addr    main;
-  struct lq_tc_neighbor *next;
-};
-
-struct lq_tc_message
-{
-  double                vtime;
-  union olsr_ip_addr    main;
-  union olsr_ip_addr    orig;
-  olsr_u16_t            seqno;
-  olsr_u8_t             hops;
-  olsr_u8_t             ttl;
-  olsr_u16_t            ansn;
-  struct lq_tc_neighbor *neigh;
-};
-#endif
-
 /*
  *HNA message format:
  *NET
@@ -206,18 +167,4 @@ olsr_destroy_hna_message(struct hna_message *);
 void
 olsr_destroy_tc_message(struct tc_message *);
 
-#if defined USE_LINK_QUALITY
-int
-olsr_build_lq_hello_packet(struct lq_hello_message *, struct interface *);
-
-int
-olsr_build_lq_tc_packet(struct lq_tc_message *);
-
-void
-olsr_destroy_lq_hello_message(struct lq_hello_message *);
-
-void
-olsr_destroy_lq_tc_message(struct lq_tc_message *);
-#endif
-
 #endif