Commit Graph

340 Commits

Author SHA1 Message Date
adamdunkels
7165a3866f Significant rework of the Contiki data collection protocol:
* the new version makes use of MAC-layer feedback so that bad paths
  can be identified quicker and then avoided.

* the new code uses transport layer ACKs that contain feedback from
  the collect protocol: when a packet cannot be forwarded due to lack
  of resources, the ACK contains a flag that indicates that the packet
  could not be forwarded. ACKs also contain the routing metric of the
  sender, which improves agility in face of rapid path changes.

* loop detection and management has been improved: with higher path
  metric agility, the system is more prone to short-lived routing
  loops. Instead of dropping looping packets, the new version adjusts
  the routing metric for the routes that exhibit loops so that the
  risk for future loops is reduced.

* make use of packet attributes to inform the MAC layer of how many
  times packets should be retransmitted.
2010-02-28 09:18:01 +00:00
nifi
c20047f657 Changed the network stack to use different structures for the different layers (network_driver, mac_driver, rdc_driver, radio_driver). This helps to avoid incorrect configuration. 2010-02-23 20:09:11 +00:00
adamdunkels
ca0417a923 Added the MAC layer callback functionality so that the Rime network layer gets information from the MAC about the status of sent packets: were they successfully transmitted, or was there a collisions? How many retries were there? 2010-02-23 18:38:05 +00:00
adamdunkels
f10eedab3e Added debug printout 2010-02-23 18:37:15 +00:00
adamdunkels
2d13fecea7 Improved backoff management: timer is now doubled on every transmission, until the using module calls the neighbor_discovery_start() function again. Don't cancel the transmission even if a lower value arrives (this fixes a problem with multi-hop ETX propagaion). 2010-02-23 18:36:50 +00:00
adamdunkels
0eade2886c Better loop handling: when a loop is detected, the neighbor to which the packet was originally sent gets an inflated ETX; made sure that collect without announcments work; increased timeouts, to work nicer in larger networks 2010-02-23 18:35:23 +00:00
adamdunkels
a4d9d6651b Added the option to specify the old value to observers so that they can determine if the announcement should be sent out quicklier than otherwise 2010-02-23 18:32:44 +00:00
adamdunkels
b746b7fc06 Reworked the Rime/Chameleon interface so that packets now always hit Rime before Chameleon. Chameleon is now only called by Rime. This makes packet sniffing easier, and allows for sniffing packets after their header has been processed by Chameleon, thereby making per-packet power profiling much easier to implement 2010-02-23 18:29:53 +00:00
adamdunkels
f49ebfe1c4 Temporarily disabled rime route udp because it breaks with newest MAC interfaces 2010-02-18 21:53:08 +00:00
adamdunkels
e34eb54960 A work-in-progress rework of the Contiki MAC and radio layers. The
main ideas are:

* Separates the Contiki low-layer network stack into four layers:
  network (e.g. sicslowpan / rime), Medium Access Control MAC
  (e.g. CSMA), Radio Duty Cycling RDC (e.g. ContikiMAC, X-MAC), and
  radio (e.g. cc2420).
* Introduces a new way to configure the network stack. Four #defines
  that specify what mechanism/protocol/driver to use at the four
  layers: NETSTACK_CONF_NETWORK, NETSTACK_CONF_MAC, NETSTACK_CONF_RDC,
  NETSTACK_CONF_RADIO.
* Adds a callback mechanism to inform the MAC and network layers about
  the fate of a transmitted packet: if the packet was not possible to
  transmit, the cause of the failure is reported, and if the packets
  was successfully transmitted, the number of tries before it was
  finally transmitted is reported.
* NULL-protocols at both the MAC and RDC layers: nullmac and nullrdc,
  which can be used when MAC and RDC functionality is not needed.
* Extends the radio API with three new functions that enable more
  efficient radio duty cycling protocols: channel check, pending
  packet, and receiving packet.
* New initialization mechanism, which takes advantage of the NETSTACK
  #defines.
2010-02-18 21:48:39 +00:00
adamdunkels
4a522c96dd Added debugging statements for packet drops 2010-02-08 21:59:49 +00:00
adamdunkels
2eba08e8f6 Made queuebuf statistics configurable, and off by default 2010-02-08 21:10:32 +00:00
adamdunkels
a68b4c40c4 Added a function to clear only the header part of the packetbuf 2010-02-06 07:48:52 +00:00
oliverschmidt
e88d209214 Adjusted process name to title case. 2010-02-05 19:13:05 +00:00
adamdunkels
d7b7b05d0e Moved the neigbor_init() call to the collect module, since it is the only one that currently uses it 2010-02-03 20:38:33 +00:00
adamdunkels
36db5eb70b Added debug printout 2010-02-03 01:18:24 +00:00
adamdunkels
f66cd6d44e Increased the forwarding queue to six packets to improve collection robustness 2010-02-02 21:44:05 +00:00
adamdunkels
f94d6df6f0 Bugfix: copy the originator address from the packetbuf into a local variable to avoid it being overwritten 2010-01-27 08:12:56 +00:00
adamdunkels
9e5823f060 Made retransmission timeout configurable 2010-01-26 10:19:26 +00:00
adamdunkels
b728c0927c Made number of duplicate announcements configurable 2010-01-26 10:18:55 +00:00
adamdunkels
cc3f609eaa Bugfix for alignment issue. Added mechanism that allows five duplicate announcements before suppressing one's own. 2010-01-25 13:55:17 +00:00
adamdunkels
71ffde578e Moved route_init() into mesh instead of the generic rime initialiation 2010-01-25 13:54:26 +00:00
adamdunkels
423e37f426 Added parameter to ipolite that specifies how many dups that are acceptable, before suppressing one's own packet 2010-01-25 13:54:06 +00:00
fros4943
26e0bab11a bugfix: alignment problem caused by previous bugfix 2010-01-21 11:39:35 +00:00
adamdunkels
c962f49516 Alignment bugfix 2010-01-18 21:27:21 +00:00
nvt-se
a03e899c27 Signal the result of transmissions attempts made in the mesh module. Patch from Moritz Struebe 2009-12-18 14:57:15 +00:00
nifi
7b2b93e6e6 clear transmission flag if send failed 2009-12-18 14:49:42 +00:00
adamdunkels
f4e6758b22 Use RTIMER_NOW() instead of rtimer_arch_now() 2009-12-09 18:08:26 +00:00
nifi
1f2c226d8e * Added ctimer_restart(). Patch by Moritz Struebe.
* Added ctimer_expired().
2009-11-19 18:32:05 +00:00
fros4943
9b20f11cd8 chameleon returns 1 only on successful rime_output() 2009-11-13 09:14:52 +00:00
fros4943
583dd11c55 rime_output() now returns RIME_OK or RIME_ERR depending on the MAC return value.
this patch may affect Rime sniffers running on top of MAC protocols that do not yet return generic MAC return values
2009-11-13 09:10:24 +00:00
adamdunkels
60a3fc0cae Fixed alignment issue 2009-11-09 08:22:40 +00:00
adamdunkels
56218aba3b Made rimeaddr_t pointers const where they should be. 2009-11-08 19:40:16 +00:00
adamdunkels
5aab2eb77d A simple addition with significant performance implications:
sicslowpan tags TCP packets with the PACKETBUF_ATTR_PACKET_TYPE_STREAM
flag, which makes the underlying power-saving MAC layer keep the radio
on for some time after transmitting the packet. This allows reply
packets to be processed directly, significantly increasing TCP latency
and throughput.
2009-11-02 11:58:56 +00:00
zhitao
1913e1a936 prevent neighbor ETX from wrap-over 2009-10-22 13:11:20 +00:00
nifi
df32fde58c Made max number of neighbors configurable 2009-10-21 21:25:10 +00:00
adamdunkels
91579fbaab Removed debug strings to save ROM 2009-10-20 08:06:43 +00:00
adamdunkels
a5ea7ef966 Increased default number of queue buffers 2009-10-19 21:28:59 +00:00
adamdunkels
4d9b05c2ce Increased default header size in packetbuf to accomodate 802.15.4 headers 2009-10-19 21:28:11 +00:00
nvt-se
31f41d842e * decline route discovery requests if we have one in the air
* and, by popular demand, switched PRINTF to printf in the debug macro. :-)
2009-10-08 16:30:26 +00:00
adamdunkels
1980253ba3 Refresh routes when hearing a packet from a neighbor 2009-09-09 21:10:21 +00:00
adamdunkels
786ed3cf84 Fixed sdcc compiler problem: function pointers cannot be NULL, so added a dummy function instead 2009-09-09 21:09:42 +00:00
oliverschmidt
e60db62b10 Added prototype missing for quite some time now - do we need -Werror ? 2009-08-20 20:27:17 +00:00
nvt-se
38fff1b527 mac_driver structure has been changed to include the init function. 2009-06-24 16:31:49 +00:00
nvt-se
33909cc2fd made neighbor discovery method configurable. default is announcements. 2009-05-30 19:54:05 +00:00
nvt-se
83f2b9ae57 include ctimer.h, since ctimer's are used in the neighbor_discovery_conn struct. 2009-05-30 19:40:39 +00:00
nvt-se
9277f922f1 fixed some documentation typos.
also uc -> unicast, stuc -> stunicast.
2009-05-26 13:58:53 +00:00
adamdunkels
5308a09dd3 Added debug output 2009-05-10 21:10:23 +00:00
adamdunkels
02734c9806 Bugfix: must copy the sender and receiver addresses from the packetbuf buffer, otherwise an application program may overwrite them 2009-05-10 21:10:02 +00:00
adamdunkels
fe30886b37 Added functionality for decaying routes: when a packet is sent over a route, it is decayed. If the route is not refreshed within four packets (with the route_refresh() function, which is called when a new packet arrives), the route is dropped. A route can be decayed at most once per second 2009-05-10 21:08:01 +00:00