1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

217 Commits

Author SHA1 Message Date
Fabian Nack
133aeedea5 sys/nhdp: Add interface specific packet sequence number 2015-03-13 07:06:40 +01:00
Fabian Nack
48ce3d467c sys/nhdp: Remove temp address lists to optimize hello processing 2015-03-13 06:57:06 +01:00
Fabian Nack
4d4b4bf348 sys/nhdp: Allocate memory for NHDP's if table static 2015-03-12 14:57:18 +01:00
Cenk Gündoğan
5d382b4ac8 rpl: use global ip addresses instead of link-local ones 2015-03-10 20:51:58 +01:00
kushalsingh007
3dbe4cd8af Reducing the scope of variable after running static code analyser.
- Part of fix for issue number 480 (variableScope)
- Suppression of warnings that are not needed.
2015-03-10 22:03:18 +05:30
Cenk Gündoğan
c60450df4c rpl: implement basic prefix information option for DIOs 2015-03-03 19:36:14 +01:00
Joakim Gebart
dcebfe55a4 Merge pull request #2491 from cgundogan/rpl_use_all_rpl_nodes_addr
rpl: use the all-RPL-nodes multicast address
2015-02-28 11:08:09 +01:00
Joakim Gebart
1eee289cb4 rpl: Make addr_str static 2015-02-26 09:56:52 +01:00
Cenk Gündoğan
1d4d3fa1c1 rpl: use the all-RPL-nodes multicast address 2015-02-25 20:33:13 +01:00
Fabian Nack
d9480cadfc sys - nhdp: Add nhdp impl 2015-02-24 11:50:58 +01:00
Cenk Gündoğan
d6e8e57d1f rpl: merge storing/non-storing to reduce the amount of redundant code 2015-02-21 15:36:28 +01:00
Cenk Gündoğan
fbf3296ca5 Merge pull request #2462 from BytesGalore/rpl_fix_hardfault_on_no_ocp
sys/net/routing/rpl: catch hardfault when OCP from DIO is not supported
2015-02-21 13:32:01 +01:00
Oleg Hahm
8ad299882c Merge pull request #2191 from cgundogan/rpl_remove_send_mutex
rpl: remove send mutex
2015-02-21 13:30:09 +01:00
BytesGalore
9e0ccc395a sys/net/routing/rpl: catch hardfault when OCP from DIO is not supported 2015-02-19 19:05:27 +01:00
BytesGalore
5a0eba2b1e sys/net/routing/rpl: apply correct byte order for RPL messages 2015-02-17 20:41:11 +01:00
BytesGalore
4b189b6e58 rpl: added configurable RPL MOP on compile time
- e.g. `make RPL_MOP=RPL_MOP_NON_STORING_MODE`
     - changed the MOP defines to have `RPL_MOP_*` prefix
2015-02-05 19:17:51 +01:00
Cenk Gündoğan
13e7bbccfc rpl: wrong length for DAO options 2015-02-03 11:47:07 +01:00
Cenk Gündoğan
c14217c68e rpl: introduce constants for PREFIX_INFO length with/without RPL_OPT_LEN 2015-02-03 10:41:28 +01:00
Cenk Gündoğan
26095013a1 rpl: introduce constants for DODAG_CONF length with and without RPL_OPT_LEN 2015-02-03 10:41:27 +01:00
Cenk Gündoğan
432688accb rpl: wrong length of DIO options
Currently, the DIO options `dodag conf` and `prefix info` are off by two
bytes in their `length` field. The RFC states, that the length field
should not include the option `type` field and the `length` field (two bytes).

For Prefix Info Option: Option Length: 30 (RFC 6550, P.61)
For Dodag Conf  Option: Option Length: 14 (RFC 6550, P.52)

Wireshark complains about DIOs as malformed packets, otherwise.
Can be reproduced by running the rpl_udp example and logging the DIOs
via wireshark.
2015-02-03 10:41:27 +01:00
Cenk Gündoğan
eb202ffe6d rpl: remove unsused warning 2015-02-02 12:54:58 +01:00
Cenk Gündoğan
f3c6ef7e66 rpl: remove common globals by prefixing with static 2015-02-02 12:54:58 +01:00
Oleg Hahm
6715bccf5b Merge pull request #2190 from cgundogan/rpl_new_parent_dodag_assignment
rpl: wrong dodag assignment to parent
2015-01-29 11:24:38 +01:00
Cenk Gündoğan
993f7cc7c6 rpl: remove rpl_send_mutex
This PR is based on #2155.
Since RPL/Trickle is only using one thread in #2155, the send mutex becomes
obsolete and can be removed safely.
2015-01-27 12:35:41 +01:00
Joakim Gebart
f71f8322d9 Merge pull request #2348 from gebart/pr/fno-common-fixes1
Removing (some) common globals, working towards #2346
2015-01-26 09:11:10 +01:00
Joakim Gebart
c5e1683a8c rpl: Make ipv6_buf local. 2015-01-23 19:46:26 +01:00
Joakim Gebart
526a84093b rpl: Remove extra definition of rpl_process_pid. 2015-01-23 19:46:26 +01:00
Joakim Gebart
6a810fe989 sys/net/routing: reduce scope of globals in etx_beaconing.c 2015-01-23 18:01:28 +01:00
Cenk Gündoğan
c4b01b87bc rpl: RPL/Trickle with only *one* thread
This PR proposes an approach to reduce the thread count of RPL.

The current RPL/Trickle stack needs about 5 threads to handle tasks
like updating the trickle timer, routing entries and the transmission of
DAOs.

This PR modifies RPL to use only one thread with a looped `msg_recv()` call.
The message is then multiplexed to the right task.
2015-01-14 19:42:13 +01:00
Oleg Hahm
34908f11a9 Merge pull request #2257 from cgundogan/rpl_fix_srh_for_storing_mode
rpl: node-to-node communication broken (rpl_udp)
2015-01-13 18:49:14 +01:00
Oleg Hahm
a31bc97e1c Merge pull request #2253 from cgundogan/rpl_srh_remove_relay_debugf
rpl: move msg_send_receive outside of DEBUGF
2015-01-13 14:43:18 +01:00
Ludwig Ortmann
154a6b5d22 Merge pull request #2268 from cgundogan/rpl_cleanup_no_routing_table
rpl: remove routing table dependent code
2015-01-13 14:09:32 +01:00
Oleg Hahm
0421ab96ee Merge pull request #2245 from cgundogan/rpl_remove_routing_decision_in_rpl_send
rpl: remove decision to drop packets in rpl_send
2015-01-13 14:04:53 +01:00
Cenk Gündoğan
a06c667af5 rpl: remove routing table dependent code
This PR removes code depending on a routing table with an entries
size > 0. Currently, all those functions and symbols are compiled into the binary,
even when there is no effective space in the routing table (as it is the
case for normal nodes in non-storing mode)
2015-01-13 13:11:32 +01:00
Cenk Gündoğan
22f466ab80 rpl: remove needless call to rpl_get_of_for_ocp
This line has no further significance to the application other than burning cpu cycles.
2015-01-08 09:40:08 +01:00
Cenk Gündoğan
da12f62751 rpl: remove return value completely as it is not really used, gives
`unsused` warning otherwise
2015-01-08 09:31:30 +01:00
Lotte Steenbrink
3591894698 aodvv2: fix calls to DEBUG()
``debug.h`` was included before ``ENABLE_DEBUG`` was set to 0 or 1. In consequence, setting ``ENABLE_DEBUG`` to 1 had no effect. This should be fixed now.
2015-01-06 15:57:12 -08:00
Lotte Steenbrink
465f9096b1 aodvv2: call aodv_packet_reader_handle_packet() when recieved packet is *not* our own.
For some reason the call to aodv_packet_reader_handle_packet() got lumped in with the check if a received packet is ours. In consequence, all packets which were not sent by the node that received them (i.e. the important ones) were silently ignored, preventing any routes from being established.
This should be fixed now: foreign packets are now handled again, while own packets are ignored.
Also, I made the corresponding comment a bit less passive-aggressive.
2015-01-06 12:54:14 -08:00
Cenk Gündoğan
40c28dd3bf rpl: node-to-node communication broken (rpl_udp)
Calling ipv6_iface_set_srh_indicator with storing mode breaks the
neighbour discovery code in **ip.c:480**.
Thus, it is not possible to use `send <n> test` from node to node.
2015-01-06 18:04:54 +01:00
Cenk Gündoğan
843be5ad6d rpl: minor changes to comments in rpl_storing.c 2015-01-06 13:24:42 +01:00
Cenk Gündoğan
d4b57b301d rpl: move msg_send_receive outside of DEBUGF
When the debug flag is set to off, the call to msg_send_receive will be
ignored. @fabianbrandt am I missing something?
2015-01-06 13:04:26 +01:00
Oleg Hahm
be67f662ac Merge pull request #2248 from cgundogan/rpl_remove_faulty_comment
rpl: remove faulty comment
2015-01-06 12:55:15 +01:00
Cenk Gündoğan
8b7386fc8b rpl: remove faulty comment
Can be misleading since we also support non-storing mode now.
2015-01-06 10:24:25 +01:00
Cenk Gündoğan
652b4f84a6 rpl: remove decision to drop packets in rpl_send
The dicision to drop a packet if no next hop exists is made by the
`rpl_get_next_hop` function, which is initialized as the routing
provider for rpl applications. Hence, it seems needless to do this in the
`rpl_send` function.
2015-01-06 09:34:15 +01:00
Cenk Gündoğan
36893ded6d rpl: typo childs -> children 2015-01-06 09:23:56 +01:00
Cenk Gündoğan
aca1ade01c rpl: cleanup, changing structdefs into typedefs 2014-12-26 21:13:33 +01:00
Cenk Gündoğan
eeafd426d5 rpl: wrong dodag assignment to parent
`dodag` is the representation of the incoming DIO and thus is temporary.
Assigning this to the parent would lead to failure when reading/writing
to/from the parent's dodag attribute later.
`my_dodag`on the other hand is the local persistent representation of
the DIO's dodag and therefore the right choice.
2014-12-14 09:41:42 +01:00
BytesGalore
0ced7338e4 sys:net:routing:rpl made the number of routing entries configurable on compile time. 2014-12-12 09:42:33 +01:00
Cenk Gündoğan
42d0fe3f78 rpl: removing unnecessary recv_mutex
In the main function of RPL (rpl_process thread)
a mutex is used after receiving a message via msg_recv.
However, this mutex is never used in another thread and thus is rendered
obsolete.
2014-12-05 16:31:41 +01:00
Oleg Hahm
312e2b10a8 Merge pull request #2146 from cgundogan/rpl_unused_parameter_warning_nonstoring
rpl: make unused parameter warning disappear
2014-12-05 15:11:01 +01:00
Cenk Gündoğan
6bfb82ca13 rpl: make unused parameter warning disappear 2014-12-05 14:16:11 +01:00
Cenk Gündoğan
8d31f8b8ed rpl: fix offset for transit buf
As a result of PR #1404, entries will not be added to the routing table
when running in storing mode, although it is supposed to do so.
You can verify by running rpl_udp and call *route* on the dodag-root.

This PR fixes the wrong offset calculation.
2014-12-05 13:45:22 +01:00
Ludwig Ortmann
28e5b1bb9a Merge pull request #2134 from cgundogan/rpl_addr_str_debug_fix
rpl: addr_str not renamed to addr_str_mode
2014-12-04 11:34:40 +01:00
Cenk Gündoğan
0f66a9e06e rpl: addr_str not renamed to addr_str_mode
In PR #1404 addr_str was renamed to addr_str_mode,
but at some places it was still referenced as addr_str.
When enabling debug messages, the compiler complains.
2014-12-04 10:46:59 +01:00
Oleg Hahm
c92effaead debug: removed superfluous additional debug flag 2014-12-03 22:59:14 +01:00
Hinnerk van Bruinehsen
59a6e5836b lint: fix uselessAssignmentArg start_index 2014-11-28 01:10:35 +01:00
Fabian Brandt
12cd62c689 Introduction of RPL non-storing mode.
This implementation is based on RFC 6550 with addition of RFC 6554 (Source Routing Header for RPL). Both can be found under the following links:
- http://tools.ietf.org/html/rfc6550
- http://tools.ietf.org/html/rfc6554

The PR provides basic functionality for handling and forwarding packages in non-storing mode. In addition the structure of the previous implemented RPL storing mode is now revised, so that readability and modularity is increased. The following features are implemented:
- building function for a SRH and integration in common packets
- source-route build algorithm based on the structure of the DODAG
- an RPL-based interpretation of the SRH and removal at destination
- new structure for RPl-module with extracted beaconing-functionality
- leaf nodes are now supported

There are some missed goals and should be included in future updates:
- building a common routing table structure for different types of routing protocols
- routing tables are statically assigned via source code, future update should have an optional variable at build-time, which sets the size of the routing table depending on the desired functionality of a node in the network (root, node, leaf)
2014-11-27 21:42:40 +01:00
Oleg Hahm
b358d8517f Merge pull request #1080 from fabianbrandt/of_manager
Introduction of an of-manager for RPL.
2014-11-27 18:17:18 +01:00
Fabian Brandt
38d9b42762 Introduction of a of-manager for RPL.
The of-manager should gather all available of´s and initialize the prefered one, based on rpl_config.h.
2014-11-27 17:18:54 +01:00
Lotte Steenbrink
0c67c02047 Add the AODVv2 Routing Protocol
This PR depends on #1766.

It contains a minimal implementation of the AODVv2 routing protocol.
*Not* implemented are:

	- AckReqs
	- alternate metrics
	- multiple interfaces
	- clients and Client Networks
	- buffering
	- all addresses, TLVs, and features that are marked as optional

An example application can be found at https://github.com/Lotterleben/RIOT-AODVv2/tree/master/aodvv2_demo.

The implementation relies heavily on a functioning Neighbor Discovery Protocol.
It might be necessary to fill the neighbor cache manually with the current state
of RIOTs NDP implementation.

The value of AODVV2_MAX_UNREACHABLE_NODES has been chosen arbitrarily and will be subject to
future improvement.

Please note that based on my experience, with the default transceiver
buffer size (3) of the native port, about 2/3 of the route discoveries
will fail. This has been addressed in issue #1747. It is advised to increase
the transceiver buffer size when using AODVv2 as a routing protocol.
2014-11-27 03:50:20 -08:00
Lotte Steenbrink
c0ffbf52d2 Simplify rpl_clear_routing_table()
Instead of looping over the entire table and setting every entry to 0, memset the entire table at once.
2014-11-25 12:01:21 -08:00
BytesGalore
de3c3cebd0 c++: sys: add extern C to header files 2014-11-08 20:09:55 +01:00
Oleg Hahm
5cf154223b trickle: increase stacksize for timer thread
printf is used in this thread
2014-10-30 21:27:12 +01:00
Oleg Hahm
762e9492a6 Merge pull request #1528 from OlegHahm/silent_rpl
rpl: mute RPL
2014-09-29 10:56:10 +02:00
Hinnerk van Bruinehsen
57b998e4a1 cpu/examples/sys/drivers: reduce scope of variables 2014-09-13 19:03:40 +02:00
Oleg Hahm
46d5947044 rpl: mute RPL
Removes all but one occurrence of printf and puts within routing (the
remaining puts is called from a debug function.
2014-09-10 18:04:17 +02:00
Ludwig Ortmann
b7992922ce fix license headers in non-.c files 2014-08-23 16:16:26 +02:00
Oleg Hahm
400fb29a6b licenses: updated some missing licenses in headers 2014-08-21 23:52:42 +02:00
Oleg Hahm
8b34d323e2 rpl: moved headers to sys/net/include 2014-08-21 21:34:45 +02:00
Oleg Hahm
aa2ecf6216 initialize kernel_pid_t correctly 2014-08-07 16:31:27 +02:00
Oleg Hahm
c2b0423918 core: renamed KERNEL_PID_NULL to KERNEL_PID_UNDEF
As @authmillenon pointed out the "null" in the old name is somewhat
misleading, since the actual value is -1.
2014-08-07 16:31:27 +02:00
Oleg Hahm
983d056c75 core: harmonizes the data type for the process ID
Instead of using differing integer types use kernel_pid_t for process
identifier. This type is introduced in a new header file to avoid
circular dependencies.
2014-08-01 12:02:54 +02:00
Ludwig Ortmann
d55da67fb6 Merge pull request #1329 from LudwigOrtmann/riot_license
RIOT default license header change
2014-07-31 23:12:47 +02:00
Ludwig Ortmann
3ca4f18479 doc: use lgplv2.1-short license header instead of lgpl-short-riot 2014-07-31 22:57:20 +02:00
Cenk Gündoğan
ca5b45e264 converting tabs to spaces in sys (#1439)
This PR converts tabs to white spaces.
The statement I used for the conversion:
```find . -name "*.[ch]" -exec zsh -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;```
Afterwards, I had a quick overview of the converted files to prevent odd indentation.
2014-07-31 20:51:50 +02:00
René Kijewski
6fae042a60 core: remove unneeded calls to mutex_init() 2014-07-29 09:33:24 +02:00
René Kijewski
ba1a15535b core: remove extra thread_create_arg() function 2014-07-09 10:28:23 +02:00
Fabian Brandt
7fb462cd2c Split RPL into core and mode related functions. 2014-07-03 20:23:57 +02:00
René Kijewski
3063e3c2b1 Fix all warnings for native and qemu-i386
Missing returns, unused variables (only used for debugging), empty
translation units, missing function prototypes, and GNU extensions.
2014-06-24 16:50:32 +02:00
Oleg Hahm
eedc16815c Merge pull request #891 from OlegHahm/rpl_debug
net: some debug code
2014-06-22 19:27:18 +02:00
René Kijewski
840c0f0a57 make: detect their module name automatically
For many modules the `Makefile` contains a line like
```
MODULE:=$(shell basename $(CURDIR))
```
This conclusively shows that we do not have to set the module name
manually.

This PR removes the need to set the module name manually, if it is the
same as the basename. E.g. for `…/sys/vtimer/Makefile` the variable
make `MODULE` will still be `vtimer`, because it is the basename of the
Makefile.
2014-06-17 15:49:32 +02:00
Oleg Hahm
4298918ba7 rpl: debug: use DEBUGF where necessary 2014-06-03 15:08:50 +02:00
Oleg Hahm
fe788838ef net: IPv6: RPL: more debug output 2014-06-03 15:04:53 +02:00
Oleg Hahm
4f62ef4547 some minor fixes and debugging 2014-06-03 15:04:50 +02:00
Oleg Hahm
e87e6bedca you can never have enough debugging in RPL 2014-06-03 15:01:48 +02:00
Martin Lenders
2362623490 Fix trailing whitespaces
Fixes #1138
2014-05-26 14:54:23 +02:00
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +02:00
Christian Mehlis
1e9b9ed0bd Merge pull request #917 from fabianbrandt/rpl_config_split
Splitting rpl_structs.h into structs and config part
2014-04-25 11:42:27 +02:00
Fabian Brandt
85d8cd8e0a Four macros changed to static inline type functions and style fixes 2014-04-25 11:40:22 +02:00
Fabian Brandt
ef5eaff1bc ETX-functionality is now part of a common routing-module 2014-04-25 11:30:28 +02:00
Fabian Brandt
2634b3c400 Splitting rpl_structs.h into structs and config part 2014-04-25 11:04:52 +02:00
Oleg Hahm
b23e157b54 Merge pull request #792 from OlegHahm/etx_fixes
rpl: moved debugging statements from header to c file
2014-03-19 10:23:09 +01:00
Oleg Hahm
6fc1f5843b RPL byte order issues 2014-03-01 19:24:18 +01:00
Oleg Hahm
e8e424f8cd enhanced RPL debugging 2014-03-01 19:24:16 +01:00
Martin Lenders
bdced318bc Eliminate side effects in icmpv6_csum and make it public 2014-03-01 15:08:19 +01:00
Martin Lenders
6c9578c028 Add sixlowpan to auto_init 2014-03-01 15:08:19 +01:00
Martin Lenders
00acab920b Let IPv6 and ICMP use new 6LoWPAN layer (+fixes) 2014-03-01 15:08:18 +01:00
Oleg Hahm
e2e62596be Byte order and rpl problems 2014-03-01 15:08:18 +01:00
Martin Lenders
108989b65d Use net_if in 6LoWPAN MAC layer 2014-03-01 14:44:21 +01:00
Martin Lenders
78b5f2ae5d Decouple ICMPv6 from 6LoWPAN 2014-03-01 14:44:21 +01:00
Martin Lenders
bc4befb4e9 Fix coding conventions for sixlowpan and rpl module 2014-03-01 14:44:21 +01:00
Oleg Hahm
1dc3b5910e amendment - to be squashed 2014-02-26 19:07:02 +01:00
Oleg Hahm
28513fce9a moved debugging statements from header to c file
Additionally, declaring the stacks as static.
2014-02-26 18:16:40 +01:00
Christian Mehlis
3e980184a8 Merge pull request #748 from authmillenon/fix-possible-null-pointer-errors
bughunt: Fix possible null pointer dereference
2014-02-20 21:41:50 +01:00
Martin Lenders
4119e15e6b Fix possible null pointer dereference 2014-02-20 02:29:33 +01:00
Christian Mehlis
0309fecc19 fix warning: invalid suffix on literal
C++11 requires a space between
literal and identifier [-Wliteral-suffix]
2014-02-18 17:05:01 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Christian Mehlis
14cb81d914 Merge pull request #639 from mehlis/remaining-license
added licenses to some files
2014-02-10 10:18:01 +01:00
Christian Mehlis
050b714e78 added licenses to some files 2014-02-08 12:20:28 +01:00
Oleg Hahm
70747d8bb4 streamlined driver include pathes 2014-02-05 18:56:47 +01:00
Oleg Hahm
1bca52495e Merge pull request #545 from OlegHahm/problematic_stack_sizes
replaced stack sizes in etx_beaconing by variables
2014-01-29 15:01:49 -08:00
Oleg Hahm
9991991f92 replaced stack sizes in etx_beaconing by variables
resolves #356
2014-01-29 23:54:30 +01:00
Christian Mehlis
f2f36f8179 math.h: remove unneeded math.h includes 2014-01-24 15:41:30 +01:00
Christian Mehlis
348971e4db trickle: replace call to pow (base of 2) 2014-01-20 16:43:01 +01:00
Oleg Hahm
70c59c3f4b size of msg_queue must be power of two 2014-01-09 18:19:57 +01:00
Oleg Hahm
593ee623b6 simplify and unify include pathes
additional:
* exporting include path in sys is mandatory for subfolders
* removed duplicate object file in linker call
2014-01-05 16:11:07 +01:00
Oleg Hahm
acd304e1cc moved RPL into routing subfolder 2013-12-19 19:13:26 +01:00