Commit Graph

438 Commits

Author SHA1 Message Date
adamdunkels
3fa8ffda1a Moved the modules packetbuf, queuebuf, and packetqueue from net/rime to net/, since they are not Rime-specific 2010-06-14 19:19:16 +00:00
adamdunkels
8f8393aadc Moved ctimer.[ch] from their old and illogical location in core/net/rime to a more appropriate place in core/sys 2010-06-14 07:34:36 +00:00
adamdunkels
baa62e9314 Addresses are not const 2010-06-14 06:55:26 +00:00
adamdunkels
2647f879c2 Bugfix: select the best parent if current parent is NULL 2010-06-14 06:54:47 +00:00
nifi
f6e0b46f38 * Made Chameleon header processing module configurable (CHAMELEON_CONF_MODULE)
* Removed the unused init function from header processing modules
* Added option CHAMELEON_CONF_WITH_MAC_LINK_ADDRESSES to specify that
  MAC link addresses should be used instead of Chameleon's own encoding
  of sender and receiver. This avoids encoding the link addresses twice
  when the MAC RDC has its own addresses.
2010-05-28 06:18:39 +00:00
nifi
b7b2c8fcde Added macro to identify address attributes for use in header processing modules 2010-05-27 20:28:29 +00:00
nifi
6c86398778 Added check to not copy or create too large packets 2010-05-02 14:59:11 +00:00
nifi
a04372adc4 Fixed conversion of packetbuf address type to address index and corrected return value 2010-05-02 12:21:34 +00:00
adamdunkels
3d10dedecf Added a safety measure against a problem where a node in rare situations would turn itself into a sink. Not entirely sure why this happens, but the safety measure should at least avoid the results of the problem. Added more debug messages. 2010-04-30 07:33:51 +00:00
adamdunkels
55b6129bd2 Debug printout fix 2010-04-30 07:29:31 +00:00
adamdunkels
e523c36cdf Removed the (unused) header packet of the queuebuf. Added a function for accessing address attributes in the queuebuf 2010-04-30 07:29:08 +00:00
adamdunkels
3c735fcea4 Added a packetbuf flag that indicates if the link layer acks should be used or not 2010-04-30 07:25:51 +00:00
fros4943
18e5718c97 avoid freeing queuebuf multiple times, and free buffer after cancelling connection 2010-04-27 13:08:55 +00:00
nifi
875ad7ffda Fixed to not change the header if the header allocation fails 2010-04-26 22:05:40 +00:00
nvt-se
2e5d97366a ensure matching format and type in debug printf 2010-04-09 16:21:07 +00:00
adamdunkels
f2bf8965d5 MAC sequence number attribute 2010-04-08 09:46:30 +00:00
adamdunkels
83eaa70f03 Added pending flag 2010-04-03 13:34:20 +00:00
fros4943
59357e8b75 PRINTF():ed debugging output 2010-04-01 11:08:36 +00:00
adamdunkels
a8d8b6d31d Improved parent management: parent neighbor is retained until a better neighbor is found (with 1 ETX less than parent). Don't drop parent neighbors when loop is detected (loops are transient anyway). 2010-04-01 10:45:21 +00:00
adamdunkels
d7457bc340 Improved parent management: parent neighbor is retained until a better neighbor is found (with 1 ETX less than parent). Don't drop parent neighbors when loop is detected (loops are transient anyway). 2010-04-01 10:03:19 +00:00
adamdunkels
4e33112d3e Guard against malformed broadcast announcements 2010-03-31 12:17:24 +00:00
adamdunkels
4e3268e2e2 Added function that removes the header 2010-03-29 21:53:04 +00:00
adamdunkels
4c3b69dc07 Configuration parameter for number of MAC-layer retransmissions 2010-03-29 21:52:25 +00:00
fros4943
0fcbfae836 updated function: has_value argument was missing 2010-03-29 12:13:35 +00:00
nifi
9508d2c4d7 * Added configurable default number of transmissions for CSMA to use when not specified using packetbuf attributes (CSMA_CONF_MAX_MAC_TRANSMISSIONS).
* Renamed packetbuf attribute PACKETBUF_ATTR_MAX_MAC_REXMIT to PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS where value 0 (attribute not set) means that default number of transmissions should be used.
2010-03-26 12:29:29 +00:00
adamdunkels
a4f9e62295 Added a parameter to collect_open() that specifies whether or not the node should be a router for packets, or only an originator of packets. Updated the collect module to the new annoucement API. 2010-03-25 08:51:07 +00:00
adamdunkels
2559e27414 API change to the announcement module: an annoucement can now be registered without a value. Such announcements are never transmitted to neighbors, until the announcement's value is set. 2010-03-25 08:49:56 +00:00
fros4943
95e870cc46 bugfix: structs should be declared static 2010-03-22 11:32:29 +00:00
adamdunkels
9d06d84255 Renamed the neighbor module to collect-neighbor, as it is only used by the collect module and is not a generic neighbor module 2010-03-19 13:25:15 +00:00
adamdunkels
2e8bfa5d9a Include new broadcast-announcement and renamed collect-neighbor in compilation 2010-03-19 13:21:24 +00:00
adamdunkels
f2c9b3e813 Remove old neighbor.h inclusion 2010-03-19 13:20:40 +00:00
adamdunkels
3a5be4a7e4 Added broadcast announcement module and collect-neighbor module 2010-03-19 13:17:55 +00:00
adamdunkels
14453e9fb7 Slight API change to support bump functionality 2010-03-19 13:17:31 +00:00
adamdunkels
7b0606cd58 Renamed the neighbor module to collect-neighbor, as it is only used by the collect module and is not a generic neighbor module 2010-03-19 13:17:00 +00:00
adamdunkels
137e02baac Added a bump method that tells the announcement module that a value has changed sufficiently much for it to be pushed out quicker 2010-03-19 13:16:11 +00:00
adamdunkels
17db783fb0 Broadcast announcement back-end that sends announcement data as broadcasts, with increasing transmission intervals 2010-03-19 13:15:19 +00:00
fros4943
55f780ec19 removed debugging output 2010-03-17 14:36:46 +00:00
adamdunkels
36b995cc9a Reenabled announcement support 2010-03-16 18:12:34 +00:00
adamdunkels
a9bad71fbd Increased the number of bits that repressent the MAX_RETRANSMITS attribute to allow for more than 7 hop-by-hop retransmissions 2010-03-14 23:01:12 +00:00
dak664
0236c6e725 Leave compiler warning for 16 bit timers 2010-03-12 17:51:07 +00:00
dak664
52c9f4bde3 Remove compiler warning 2010-03-12 15:21:14 +00:00
adamdunkels
5a6fc2ade0 Bugfix: set up rtmetric before starting to announce it. Set the number of MAC layer retransmissions correctly 2010-03-09 13:21:28 +00:00
dak664
c65e09ceb2 Remove compiler warnings 2010-03-02 15:41:23 +00:00
adamdunkels
524625dfd2 Removed debug string names of packet attribtues 2010-02-28 20:20:19 +00:00
adamdunkels
ec928a2a19 Make max queueing time depend on retransmission timeout 2010-02-28 14:15:58 +00:00
adamdunkels
f95a6cce85 Added function for obtaining packet queue length 2010-02-28 09:20:32 +00:00
adamdunkels
8fe15f7b45 New packet attribute for specifiying MAC layer retransmissions; reorder and commented packet attributes 2010-02-28 09:19:43 +00:00
adamdunkels
970a9eb9c7 Increased neighbor lifetime to allow for longer neighbor announcement intervals 2010-02-28 09:19:04 +00:00
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
adamdunkels
6bf8e0b478 Bugfix by Takahide Matsutsuka: too few items in array, which caused problems with sdcc 2009-05-08 08:52:55 +00:00
zhitao
48d4800f08 removed reference to undefined function in mspgcc 2009-05-06 15:34:28 +00:00