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

463 Commits

Author SHA1 Message Date
Joakim Gebart
578eb38c38 sixlowpan: Properly print source address when ENABLE_DEBUG 2015-02-26 19:22:07 +01:00
Joakim Gebart
db59de6c2e sixlowpan: Refactor DAC/DAM decoding to match SAC/SAM implementation. 2015-02-26 13:53:07 +01:00
Joakim Gebart
9933a431e3 sixlowpan: Refactor SAC/SAM decoding. 2015-02-26 12:19:30 +01:00
Joakim Gebart
ff6f8ff82b sixlowpan: Invert local/universal bit in EUI-64 when forming IPv6 Interface Identifiers. 2015-02-26 09:59:28 +01:00
Martine Lenders
ff36abb2cf ng_ipv6_addr: initial import
The motivation behind this module is to allow for address handling
functions where they, but not the full IPv6 functionality might be
needed. This new version of the IPv6 address data type utilizes the
byteorder.h header to enforce network byte-order on its members.
2015-02-20 17:40:26 +01:00
Johann Fischer
ce423816af sys/net/network_layer/sixlowpan/mac.c: add missing p->processing--; 2015-02-11 11:57:46 +01:00
BytesGalore
c7eea4d0d5 sys/net/sixlowpan: change to release lowpan.c::lowpan_context_mutex when no context is recognized 2015-02-10 12:27:56 +01:00
Cenk Gündoğan
4347039e88 ip: make addr_str static
When setting the `ENABLE_DEBUG` flag to *1* in ip.c,
the **rpl_udp** example won't compile, because the variable `addr_str`
is also defined in **rpl_udp.h** as extern.
Prefixing `addr_str` with `static` in ip.c solves this problem.
2015-02-08 22:07:19 +01:00
Martine Lenders
0eb2d78dda doc: use my real name 2015-02-08 18:52:16 +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
3f4478e2bb sixlowpan: Reduce scope on some globals in ip.c 2015-01-23 19:46:26 +01:00
Joakim Gebart
cd248f89f0 sixlowpan: reduce scope of globals in mac.c 2015-01-23 14:04:59 +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
Lotte Steenbrink
a8b3c9f535 exclude `ipv6_iface_set_routing_provider() from #ifdef MODULE_RPL` so that other routing protocols can use it too. 2014-12-17 02:09:09 -08:00
Ludwig Ortmann
68ca082dcc sixlowpan: handle malloc error
The return value of malloc wasn't checked before, resulting in
possibly undefined behavior.
2014-12-14 11:32:30 +01:00
Ludwig Ortmann
5e6d5ab522 sixlowpan: remove redundant assignment 2014-12-14 11:32:30 +01:00
Cenk Gündoğan
2a7ce79947 ip: check for null before ip_get_next_hop is used 2014-12-11 15:43:16 +01:00
Cenk Gündoğan
6ee5e737f9 vtimer: set custom msg_t.type with vtimer_set_msg
Currently, when using vtimer_set_msg the corresponding msg_t is filled
with the MSG_TIMER ("12345") type.
This approach makes it difficult to differentiate between incoming
messages via vtimer_set_msg.

In this PR I introduce another parameter for the vtimer_set_msg
function to specify a custom msg_t type.
2014-12-09 10:07:26 +01:00
Oleg Hahm
000450c894 Merge pull request #2117 from OlegHahm/doxygen_eliminate_warnings
Doxygen eliminate warnings pt. 2
2014-12-04 17:18:42 +01:00
Oleg Hahm
c92effaead debug: removed superfluous additional debug flag 2014-12-03 22:59:14 +01:00
Fabian Nack
eebfd5011a drivers - cc110x: Initial import of new cc110x driver 2014-12-01 17:14:02 +01:00
Oleg Hahm
dc74bd48bf doc: removed superfluous (and broken) @file params 2014-11-30 21:52:54 +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
Martine Lenders
c9219b87d6 net_help: prefix csum properly and add documentation 2014-11-18 14:59:37 +01:00
Martine Lenders
ba1527593f ipv6: fix IPv6 address matching algorithm 2014-11-13 00:16:34 +01:00
Oleg Hahm
d1d8972b0c 6lowpan: do not overrun in context_remove 2014-11-10 15:33:49 +01:00
Oleg Hahm
365bfd81af IPv6: allow complete in ipv6_addr_init_prefix
If the specified prefix is a full IPv6 address, no bits remain.
Fixes a possible buffer overrun.
2014-11-10 15:33:48 +01:00
Oleg Hahm
b96b995d76 6lowpan: fix buffer overrun in decompression 2014-11-10 15:33:48 +01:00
Oleg Hahm
e06dce55b1 6lowpan: free fragment buffer in error case 2014-11-10 15:33:48 +01:00
BytesGalore
de3c3cebd0 c++: sys: add extern C to header files 2014-11-08 20:09:55 +01:00
Hinnerk van Bruinehsen
a5aeaab87b lint: fix unreadVariable warnings 2014-10-31 01:24:30 +01:00
Oleg Hahm
313d5b4e56 doc: added and fixed some copyright boilerplates 2014-10-30 19:30:14 +01:00
Fabian Nack
07fff37efe drivers - cc110x_ng: rename ng driver to legacy 2014-10-24 09:55:31 +02:00
5146c66786 core: adapt to msg_try_send 2014-10-22 12:37:33 +02:00
Fabian Brandt
cd80cc166e Fixes when a packet is not for me, but an interface is defined. 2014-10-10 17:17:40 +02:00
Martine Lenders
d63e98786e sixlowpan: fix ipv6_addr_init_prefix 2014-10-09 14:42:35 +02:00
Oleg Hahm
cbb1aff0ce sixlowpan: fixed net_if counter
This is a fixup for 11254577eb which
caused this function to always return a positive number, when any
interfaces was configured.
2014-10-01 18:19:35 +02:00
Hinnerk van Bruinehsen
2faf813793 board/sys: move bounds check before array access 2014-09-14 01:56:11 +02:00
Hinnerk van Bruinehsen
57b998e4a1 cpu/examples/sys/drivers: reduce scope of variables 2014-09-13 19:03:40 +02:00
René Kijewski
0cc699c0ce lint: reduce scope
Fix some lint warnings of kind
```
style (variableScope): The scope of the variable '…' can be reduced
```
2014-09-12 11:50:12 +02:00
Cenk Gündoğan
710c7e6cf6 transport_layer: Splitting UDP and TCP
Currently, the tcp and udp implementations are bound to each other in a
module called *destiny*. Thus, when using only one of them then the
other one gets also compiled into the binary and initialized,
which results in unnecessary RAM usage and workload for the CPU.

The approach in this PR defines a common module named *socket_base*,
which contains functions used by the posix layer. Compiled by it's own,
those functions return negative error codes, to symbolize upper layers
that they are not supported. When also including the modules *udp* or
*tcp* respectively, functions from *socket_base* get overwritten with the
correct functionality.

Defining *udp* or *tcp* in a Makefile also includes *socket_base*.
Defining *pnet* in a Makefile also includes *socket_base*.
2014-09-11 20:07:46 +02:00
Oleg Hahm
c924075722 sixlowpan: documented internal is_our_address() 2014-09-10 14:37:43 +02:00
Oleg Hahm
11254577eb sixlowpan: ignore incoming packets if unconfigured
If there's no IPv6 address configured so far to any interface, 6lowpan
should not try to  handle incoming packets. This can easily lead to
looping packets.
2014-09-10 14:37:43 +02:00
Ludwig Ortmann
b7992922ce fix license headers in non-.c files 2014-08-23 16:16:26 +02:00
Oleg Hahm
e879e2aba2 fix low-level sending destination address 2014-08-21 21:34:45 +02:00
Oleg Hahm
1de5c2b4a0 fixed remaining variables to kernel_pid_t 2014-08-07 17:29:53 +02:00
Oleg Hahm
74fbff1df2 net: changed name of internal variable
To avoid naming conflicts + made variable static and volatile as it
should be.
2014-08-07 16:31:27 +02:00
Oleg Hahm
0ad7b170ed make kernel_pid_t comparisons consistent 2014-08-07 16:31:27 +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
4b1a2f32eb net: fix kernel_pid_t checks
KERNEL_PID_NULL is a negative number. If kernel_pid_t variables are
initialized to this value, one have to check for lt/gte 0.
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
Oleg Hahm
5dc38a3e8c sixlowpan: some additional debugging 2014-08-01 00:15:34 +02:00
Oleg Hahm
f2b9e20716 sixlowpan: decrement processing semaphore when discarding 2014-08-01 00:14:45 +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
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
fe788838ef net: IPv6: RPL: more debug output 2014-06-03 15:04:53 +02:00
Oleg Hahm
6dbeacd2ce documentation: fixed sixlowpan doxygen filename 2014-05-22 13:01:44 +02:00
Oleg Hahm
f8168c86d3 documentation: fixed organization of 6LoWPAN doxygen 2014-05-22 13:01:37 +02:00
Jan S
ba907471f3 fixed printf specifiers 2014-05-15 17:42:57 +02:00
Thomas Eichinger
7a031e5669 net: handle macro redefinitions for OS X
undefine macros and reorder header includes to get rid of system
defined macros on OS X

fixes #1165
2014-05-14 19:43:58 +02:00
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +02:00
Benjamin Valentin
8ec8b3f100 net/ip: fix wrong double negative in the comments 2014-05-12 17:28:05 +02:00
Benjamin Valentin
143b6560da net/ip: apply workaround to fix IP forwarding
When sending a packet a workaround is applied when ndp_get_ll_address() returns NULL as is's not implemented properly yet.
The same should happen when a packet is forwarded as it's dropped otherwise.
2014-05-12 17:01:36 +02:00
Martine Lenders
0e4d2909a6 Merge pull request #830 from authmillenon/fix_test_pnet
tests: Fix test_pnet
2014-04-17 01:40:27 +02:00
Martin Lenders
4e1da23817 Fix test_pnet
fixes #829
2014-04-16 17:44:46 +02:00
Martin Lenders
9ee7956e53 Fix length of fragmentation buffer in 6LoWPAN 2014-04-09 16:07:46 +02:00
Martine Lenders
139da0a5b4 Merge pull request #873 from OlegHahm/on_link_check
net: sixlowpan: removing possible invalid check
2014-04-09 16:02:56 +02:00
Martin Lenders
d9fdbca9de Fix dereferencing of type-punned pointer
Fixes #897
2014-04-05 20:42:08 +02:00
Martine Lenders
951cc0cdc2 Merge pull request #928 from authmillenon/ndp-nce-remove
Make neighbor cache remove function public
2014-04-01 16:39:06 +02:00
Martin Lenders
69903e4cb8 Make neighbor cache remove function public 2014-03-28 10:20:08 +01:00
Benjamin Valentin
113fd6a9cf icmp.c: remove empty else clause 2014-03-28 10:06:44 +01:00
Martine Lenders
03b49e849b Merge pull request #875 from OlegHahm/ip_forwarding
net: IPv6: use forwarding table entry when routing
2014-03-24 15:39:24 +01:00
Martine Lenders
ddebe8ed1a Merge pull request #876 from OlegHahm/iphc_decompression_shift
net: 6lowpan: added missing hdr position shift
2014-03-24 15:36:44 +01:00
René Kijewski
d6ad19b410 Fix issue #896 2014-03-19 14:56:35 +01:00
Oleg Hahm
153f2f9e95 notify lowpan_transfer when IP packet is not routable
The IP process silently discarded an unroutable packet without replying to the 6LoWPAN layer, causing that thread to starve.
2014-03-10 19:58:52 +01:00
Oleg Hahm
3945a06851 added missing hdr position shift 2014-03-09 19:14:18 +00:00
Oleg Hahm
05ebad4380 use forwarding table entry when routing
So far the entry was looked up, but ignored in the case where the packet
has to be forwarded.
2014-03-09 19:03:59 +00:00
Oleg Hahm
72e1c667a7 removing possible invalid check
Checking for a link local address to determine if a node is on-link is
probably not a valid assumption in most wireless networks.
2014-03-09 18:51:48 +00:00
Martin Lenders
332485e466 Fix source address IPHC 2014-03-03 17:16:29 +01:00
Oleg Hahm
9255c9cbef removed obsolete buffer 2014-03-02 23:34:07 +00:00
Martin Lenders
bdced318bc Eliminate side effects in icmpv6_csum and make it public 2014-03-01 15:08:19 +01:00
Oleg Hahm
2c76f99f04 nbr_cache_auto_rem does not need an extra thread 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
c9e8adc414 Use net_if in 6LoWPAN layer 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
470d8745e9 Add capability to set and get variable default hop limit 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
4e39cbdd54 Put 6LoWPAN border router in its own module 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
Christian Mehlis
8556403f8f Merge pull request #680 from benpicco/fix_crash
set up message queues for the IP and UDP thread
2014-02-24 15:10:19 +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
Benjamin Valentin
95d3aae48c actually use msg_queue in ip.c
msg_queue is defined but never used, hook it up so IP packets get queued instead of dropped when there is more than one.
change the name to ip_msg_queue to avoid naming conflicts.
2014-02-13 07:07:07 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Christian Mehlis
8076d1c3a6 Merge pull request #647 from benpicco/patch-1
proper line breaks in payload debug output
2014-02-08 12:23:28 +01:00
benpicco
86b2df0ca6 proper line breaks in payload debug output
I guess the idea was to make a new line after every 16 elements, not every element except for every 16th
2014-02-07 09:05:28 +01:00
Oleg Hahm
70747d8bb4 streamlined driver include pathes 2014-02-05 18:56:47 +01:00
Christian Mehlis
860b499fb6 lowpan: fix wrong printf usage 2014-01-18 01:18:37 +01:00
Christian Mehlis
8539517c11 icmp: fix warning of unused parameter 2014-01-18 01:17:31 +01:00
Oleg Hahm
420dc8953b Merge pull request #504 from mehlis/ipv6-send-return-value
ipv6_sendto: return the success
2014-01-16 08:04:00 -08:00
Christian Mehlis
8cfab9d014 ipv6_sendto: return the success 2014-01-14 07:29:28 +01:00
Christian Mehlis
31849f0771 lowpan.c: fix usage of timex_t 2014-01-09 16:36:40 +01:00
Christian Mehlis
aa159fa4fe flowcontrol.c: fix usage of timex_t 2014-01-09 16:36:40 +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
59e55c354c moved sixlowpan into network_layer subfolder 2013-12-19 19:13:26 +01:00