]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/blip/IPDispatch.h
commit svn HEAD of blip into core to start merge testing
[tinyos-2.x.git] / tos / lib / net / blip / IPDispatch.h
index ffb2641b3a684ed4424401509ebe0aaf11810fbb..b2e6caeca0801ed8e6848304c48102856bf22706 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <message.h>
 #include <lib6lowpan.h>
+#include <Statistics.h>
 
 enum {
   N_PARENTS = 3,
@@ -31,12 +32,13 @@ enum {
   N_EPOCHS_COUNTED = 1,
   N_RECONSTRUCTIONS = 2,
   N_FORWARD_ENT = IP_NUMBER_FRAGMENTS,
+  N_RETRIES = 5,
 };
 
 enum {
   CONF_EVICT_THRESHOLD = 5, // Neighbor is 'mature'
   CONF_PROM_THRESHOLD = 5, // Acceptable threshold for promotion
-  MAX_CONSEC_FAILURES = 40, // Max Failures before reroute is attempted
+  MAX_CONSEC_FAILURES = 11, // Max Failures before reroute is attempted
   PATH_COST_DIFF_THRESH = 10, // Threshold for 'similar' path costs
   LQI_DIFF_THRESH = 10, // Threshold for 'similar' LQI's
   LINK_EVICT_THRESH = 50, // ETX * 10
@@ -51,10 +53,18 @@ enum {
   BELOW_THRESH = 3,
 };
 
+#ifndef LOW_POWER_LISTENING
 enum {
   TGEN_BASE_TIME = 512,
   TGEN_MAX_INTERVAL = 60L * 1024L * 5L,
 };
+#else
+enum {
+  TGEN_MAX_INTERVAL = 60L * 1024L * 5L,
+  TGEN_BASE_TIME = TGEN_MAX_INTERVAL,
+};
+#endif
+
 
 struct epoch_stats {
   uint16_t success;
@@ -98,7 +108,7 @@ enum {
 typedef struct {
   // The extra 2 is because one dest could be from source route, other
   //  from the dest being a direct neighbor
-  hw_addr_t dest[N_FLOW_CHOICES + N_PARENT_CHOICES + 2];
+  ieee154_saddr_t dest[N_FLOW_CHOICES + N_PARENT_CHOICES + 2];
   uint8_t   current:4;
   uint8_t   nchoices:4;
   uint8_t   retries;
@@ -111,6 +121,7 @@ typedef struct {
   uint8_t frags_sent;
   bool failed;
   uint8_t refcount;
+  uint8_t local_flow_label;
 } send_info_t;
 
 typedef struct {
@@ -120,7 +131,7 @@ typedef struct {
 
 typedef struct {
   uint8_t timeout;
-  hw_addr_t l2_src;
+  ieee154_saddr_t l2_src;
   uint16_t old_tag;
   uint16_t new_tag;
   send_info_t *s_info;
@@ -193,7 +204,7 @@ struct flow_entry {
 struct neigh_entry {
   uint8_t flags;
   uint8_t hops; // Put this before neighbor to remove potential padding issues
-  hw_addr_t neighbor;
+  ieee154_saddr_t neighbor;
   uint16_t costEstimate;
   uint16_t linkEstimate;
   struct epoch_stats stats[N_EPOCHS];
@@ -227,46 +238,4 @@ typedef enum {
 } send_type_t;
 
 
-typedef nx_struct {
-  nx_uint16_t sent;
-  nx_uint16_t forwarded;
-  nx_uint8_t rx_drop;
-  nx_uint8_t tx_drop;
-  nx_uint8_t fw_drop;
-  nx_uint8_t rx_total;
-  nx_uint8_t real_drop;
-  nx_uint8_t hlim_drop;
-  nx_uint8_t senddone_el;
-  nx_uint8_t fragpool;
-  nx_uint8_t sendinfo;
-  nx_uint8_t sendentry;
-  nx_uint8_t sndqueue;
-  nx_uint8_t encfail;
-  nx_uint16_t heapfree;
-} ip_statistics_t;
-
-
-typedef nx_struct {
-  nx_uint8_t hop_limit;
-  nx_uint16_t parent;
-  nx_uint16_t parent_metric;
-  nx_uint16_t parent_etx;
-} route_statistics_t;
-
-typedef nx_struct {
-/*   nx_uint8_t sol_rx; */
-/*   nx_uint8_t sol_tx; */
-/*   nx_uint8_t adv_rx; */
-/*   nx_uint8_t adv_tx; */
-/*   nx_uint8_t unk_rx; */
-  nx_uint16_t rx;
-} icmp_statistics_t;
-
-typedef nx_struct {
-  nx_uint16_t total;
-  nx_uint16_t failed;
-  nx_uint16_t seqno;
-  nx_uint16_t sender;
-} udp_statistics_t;
-
 #endif