Commit graph

2979 commits

Author SHA1 Message Date
Antonio Lignan bfef0b5d6a Merge pull request #2032 from simonduq/pr/tsch-ka-fix
TSCH bugfix: reset keep-alive timeout when switching time source
2017-01-10 08:47:30 +01:00
Nicolas Tsiftes 1537488e74 Merge pull request #2035 from simonduq/pr/csma-fix
CSMA bugfix: do not use field on a struct that may have been deallocated
2017-01-09 08:45:49 +01:00
Simon Duquennoy 0de3563ddb CSMA bugfix: do not use field on a struct that may have been deallocated 2017-01-05 10:47:11 +01:00
Antonio Lignan 53efcec1fa Merge pull request #1994 from yatch/pr/bugfix-framer802154-sender-addr
Bugfix on source address setting in framer_802154.create()
2017-01-04 14:10:57 +01:00
Simon Duquennoy fe99f1144a TSCH bugfix: reset keep-alive timeout when switching time source 2017-01-04 11:01:46 +01:00
Joakim Eriksson cbf4a843e2 fixed comment. 2016-12-29 22:49:01 +01:00
Yasuyuki Tanaka 4faf139523 TSCH: change the return type of the APIs (tsch-security.h)
The return type is changed to "int" to "unsigned int" because APIs
provided by tsch-security are supposed to return an integer larger than
or equal to zero. This change clarifies that.
2016-12-15 19:32:22 +01:00
Yasuyuki Tanaka da853386a6 TSCH: fix indentation in tsch-packet.c 2016-12-15 19:32:04 +01:00
Yasuyuki Tanaka 38ff8e5283 TSCH: add brief API explanations (tsch-security.h) 2016-12-15 19:16:28 +01:00
Yasuyuki Tanaka 5186fa2ef1 TSCH: set PACKETBUF_ADDR_SENDER before NETSTACK_framer.create() 2016-12-15 15:10:15 +01:00
Yasuyuki Tanaka da29a5f8e3 ContikiMAC: set PACKET_ADDR_SENDER in qsend_list() 2016-12-15 15:10:15 +01:00
Yasuyuki Tanaka 586fb9a7fe framer-802154: bugfix on source address setting 2016-12-15 15:10:15 +01:00
Yasuyuki Tanaka aa1f408825 packetbuf: add packetbuf_remaininglen()
packetbuf_freelen() returns the length of free space in packetbuf.
2016-12-14 14:19:46 +01:00
Yasuyuki Tanaka c48cfb6b9d Fix indentation in packetbuf.h 2016-12-14 14:16:55 +01:00
Yasuyuki Tanaka a3417b82b0 Fix indentation in packetbuf.c 2016-12-14 14:16:55 +01:00
Nicolas Tsiftes 9bb6286bb2 Merge pull request #1982 from nvt/coffee-io-semantics
Always enable the I/O semantics function in Coffee.
2016-12-09 16:09:32 +01:00
Nicolas Tsiftes 1249d9cf8d Merge pull request #1855 from MohamedSeliem/patch-5
DAD: Remove useless "if" that tests if the source address is unspecified
2016-12-08 20:08:58 +01:00
Nicolas Tsiftes d133ed898f Merge pull request #1914 from yatch/pr/802154-panid-handling
frame802154: comply with IEEE 802.15.4-2015 on PAN ID Field Handling
2016-12-08 18:37:58 +01:00
Yasuyuki Tanaka 5fdd731166 frame802154: fix a typo in a comment 2016-12-05 22:45:07 +01:00
Yasuyuki Tanaka 3872965362 frame802154: comply with IEEE 802.15.4-2015 on PAN ID Field Handling
This patch changes the behaviors of frame802154_has_panid() for frames
of frame version 0b10 so that it complies with the PAN ID Field Handling
specification in IEEE 802.15.4-2015. For the other frame versions, 0b00
and 0b01, no change is made in frame802154_has_panid().

For more information, please refer to:
https://github.com/contiki-os/contiki/pull/1914/
2016-12-05 22:45:07 +01:00
Nicolas Tsiftes f09e84976a Merge pull request #1950 from yatch/pr/update-for-tsch-cooja-mote
Miscellaneous updates for tsch-cooja-mote
2016-12-05 18:40:28 +01:00
Antonio Lignan 95f69d92a8 Merge pull request #1918 from adamdunkels/pr-websocket-2
Contiki websocket client
2016-12-05 06:46:43 +01:00
George Oikonomou d6656ccde1 Fix minor typo 2016-12-03 23:26:25 +00:00
Nicolas Tsiftes 238e8b4dcf Merge pull request #1949 from simonduq/pr/non-storing-fix-dtsn
RPL non-storing: more conservative DTSN update
2016-12-01 16:27:38 +01:00
Simon Duquennoy 7bb50da178 Merge pull request #1271 from drugo72/pr-rpl
RPL: fix clock_time_t calculations
2016-12-01 16:22:43 +01:00
Yasuyuki Tanaka 106731cec1 TSCH: update README.md
- add cooja / Cooja mote as supported platform
- correct Rx mode requirements
2016-11-26 11:47:59 +01:00
George Oikonomou 610eefc2ff Merge pull request #1741 from simonduq/pr/tsch-adaptive-control-traffic
TSCH adaptive control traffic
2016-11-25 15:53:32 +00:00
Simon Duquennoy 3e00adacc0 RPL non-storing: more conservative DTSN update, as per RFC 6550, section 9.6. 2016-11-25 16:30:08 +01:00
Nicolas Tsiftes edf3a27920 Merge pull request #1879 from pernin/master
Change on DIO trickle timer condition for DIO sending
2016-11-25 16:15:08 +01:00
Nicolas Tsiftes 5281908018 Always enable the I/O semantics function in Coffee. 2016-11-25 16:02:44 +01:00
Benoît Thébaudeau 81805129f8 mt: Fix preemption
Preemption was supposed to be supported, but it had no means of safely
updating the state of a thread, so mt_exec() could fail to resume a
preempted thread.

mt_exec() is allowed to be called only from the main Contiki thread, so
the mt threads passed to it may be only ready or exited, not running.
Consequently, there is no need for a distinction between the ready and
running states, so merge them as a started state, which avoids having to
update the state of a thread upon preemption.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-11-24 22:30:26 +01:00
Benoît Thébaudeau 927e9b8150 mt: Fix missing call to mtarch_pstop()
If mt_yield() needs it, then mt_exit() too. A thread could indeed be
preempted while calling mt_exit().

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-11-24 22:30:26 +01:00
Benoît Thébaudeau 82afa72c13 mt: Remove unused code
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-11-24 22:30:26 +01:00
Luca Pernini 5803971adc Changing DIO timer condition - merge 2016-11-24 10:52:10 +01:00
Simon Duquennoy 86dbd590db Merge pull request #1400 from pablocorbalan/nud-with-acks
Refresh nbr reachable state after received IPv6 unicast message
2016-11-23 12:00:13 +01:00
Simon Duquennoy ecd1d57eec Merge pull request #1661 from yatch/pr-tsch-cooja-mote
TSCH on Cooja mote
2016-11-23 11:59:29 +01:00
Cristiano De Alti 1bdec853e1 Prevent interger overflow on the AVR
Compiling examples/er-rest-example for the avr-raven gives:

  integer overflow in expression [-Woverflow]

On the AVR int is 16 bit and some calculations may overflow.
This happens for example with multiplications involving
CLOCK_SECOND where all the operands are of type int.
Casting one of the operands to clock_time_t forces
the arithmetic to clock_time_t without increasing the size
of the program (the calculation is performed at compile time).
2016-11-05 22:46:42 +01:00
Adam Dunkels 36afb693b0 Removed left-over debug printout 2016-11-02 21:54:15 +01:00
Adam Dunkels 869df3bc36 Updated copyright statements 2016-11-02 21:54:02 +01:00
Adam Dunkels 937fddbedf Removed blanks 2016-11-02 21:53:43 +01:00
Adam Dunkels c484ee4998 Added comments 2016-11-02 21:53:31 +01:00
Adam Dunkels ae4801bba6 Bugfix: make sure the TCP connection is polled immediately after tcp_socket_send() is called so that the TCP segment goes out directly 2016-11-02 15:16:00 +01:00
Adam Dunkels f11d344d4d Add a tcp_socket_queuelen() function that returns the length of the current TCP output queue 2016-11-02 15:16:00 +01:00
Adam Dunkels 6ab9822fc2 Make debug printouts be PRINTF() statements to avoid including them in non-debug builds 2016-11-02 15:16:00 +01:00
Adam Dunkels bb071a7fba Contiki websocket HTTP client code 2016-11-02 15:16:00 +01:00
Adam Dunkels a7cbbe496f Contiki websocket client code 2016-11-02 15:16:00 +01:00
Oliver Schmidt d864e73579 Added directory functions to the Commodore Platform File System.
They reduce the Telnet server's run size by 1231 bytes.
2016-10-15 18:36:54 +02:00
Garret Kelly 42c4cb94e0 rpl: fix debugging PRINTF in find_removable_dio 2016-09-22 10:54:55 -04:00
George Oikonomou be1f19ad73 Merge pull request #1851 from kqorany/patch-1
Improve multicast documentation
2016-09-14 06:53:14 +01:00
Mohamed Seliem f6795b4972 Neighbor Solicitation Processing (ns_input)
In the newest version of contiki, the function uip_nd6_ns_input() is obsolete.
ns_input function is defined static to be restrictively used in uip-nd6.c file, so removing the obsolete function requires moving the function description to the new function
2016-09-13 09:24:46 +02:00
Nicolas Tsiftes 2d49edfc57 Merge pull request #1849 from MohamedSeliem/patch3
Make UIP_CONF_DS6_ROUTE_NBU and DS6_NBR_NBU, DS6_ROUTE_NBU obsolete
2016-09-12 14:25:59 +02:00
Mohamed Seliem 675d9325b9 DAD: Remove useless "if" that tests if the source address is unspecified
No need to do the unspecified address twice.

#if UIP_ND6_DEF_MAXDADNS > 0
    if(uip_is_addr_unspecified(&UIP_IP_BUF->srcipaddr)) {
      /* DAD CASE */
       ..........
#else /* UIP_ND6_DEF_MAXDADNS > 0 */
    if(uip_is_addr_unspecified(&UIP_IP_BUF->srcipaddr)) {
      /* DAD CASE */
      goto discard; 
#endif /* UIP_ND6_DEF_MAXDADNS > 0 */

this logic will bring confusion, especially if you analyze the other ND functions (NUD, address resolution)  .
2016-09-10 10:56:19 +02:00
Nicolas Tsiftes 2c5c7d4f26 Merge pull request #1719 from jcook/master
RPL: Remove useless `else' block as def_route will be removed before if ex…
2016-09-09 16:48:01 +02:00
Yasuyuki Tanaka 0ff474e393 Fix indentation in nullrdc.c 2016-09-06 15:14:10 +02:00
Yasuyuki Tanaka 6869dc7004 Yield inside busywaiting loops under cooja-ip64 (nullrdc.c)
The while loops waiting ACK_WAIT_TIME and AFTER_ACK_DETECTED_WAIT_TIME
cause infinite loop under the cooja-ip64 platform. This is because
RTIMER_NOW(), rtimer_arch_now(), has been changed not to call
cooja_mt_yield() in it since rtimer was reimplemented as a higher
resolution timer.

In order to avoid the infinite loop, cooja_mt_yield() needs to be
called inside the while loops under the platform as well as the cooja
platform.
2016-09-06 15:14:10 +02:00
Yasuyuki Tanaka 0201208664 TSCH: manage busy waiting on Cooja motes 2016-09-06 15:14:10 +02:00
Khaled Qorany ddae68bce3 Referring to the ESMRF engine that was recently merged 2016-09-06 11:24:17 +02:00
Simon Duquennoy 406e517d52 Merge pull request #1848 from afonsomota/noprobingfix
fix misplaced bracket causing compilation error when probing is disabled
2016-09-06 08:50:08 +02:00
Mohamed Seliem 1d32a00ebd Fix uip-ds.h table configuration comment
this PR to update uip-ds.h comments, this small change is made to ease the track of Tables implementation places

remove definition of UIP_CONF_DS6_ROUTE_NBU

retire 2 old macros DS6_NBR_NBU, DS6_ROUTE_NBU

Update uip-ds6.h

Update contiki-conf.h

Update contiki-conf.h

Update contiki-conf.h

fix doxygen comment

Update uip-ds6.h
2016-09-05 20:59:36 +02:00
Afonso Oliveira 0217776d6e fixed identantion on code below alteration 2016-09-05 16:24:55 +01:00
Nicolas Tsiftes 8e0ecf9b3a Merge pull request #1802 from marcas756/PullReq-SWITCH_BITS_IN_BYTE_STATIC
Make set_bits_in_byte() static (like for get_bits_in_byte)
2016-09-05 16:50:25 +02:00
Nicolas Tsiftes 7cfbbe97af Merge pull request #1740 from simonduq/pr/tsch-minor
TSCH minor enhancements
2016-09-05 16:33:48 +02:00
Afonso Oliveira 4c5b70e628 fix misplaced bracket causing compilation error when probing is deactivated (RPL_WITH_PROBING=0) 2016-09-05 14:49:41 +01:00
Joakim Eriksson 616b65c962 added support for 6-bytes link-layer address 2016-08-27 22:30:32 +02:00
Nicolas Tsiftes 4c7d8d0214 Merge pull request #1739 from simonduq/pr/tsch-seqno
Improved TSCH sequence number handling
2016-08-16 14:49:21 +02:00
Nicolas Tsiftes 9fa777d4f4 Merge pull request #1738 from simonduq/pr/mac-seqno-timeout
mac-seqno: add a lifetime to sequence numbers in history
2016-08-16 14:48:21 +02:00
Nicolas Tsiftes d43f2e2a34 Merge pull request #1797 from gebart/pr/rpl-func-prototype
core/net/rpl: Fix function declaration isn’t a prototype
2016-08-08 11:38:38 +02:00
Simon Duquennoy e4241fbeb9 Updated TSCH readme 2016-08-02 18:07:20 +02:00
marcas756 520117b188 Make set_bits_in_byte() static (like for get_bits_in_byte) 2016-07-30 12:57:09 +02:00
Joakim Nohlgård e37c522c2f core/net/rpl: Fix more function declaration isn’t a prototype 2016-07-26 15:21:59 +02:00
Simon Duquennoy dbb82f2439 Merge pull request #1158 from bkozak-scanimetrics/contikimac_fix_first_cycle_start
Fixed wrong first cycle_start
2016-07-25 14:57:38 +02:00
Simon Duquennoy cda89aaaf2 Merge pull request #1217 from tiagoshibata/c64_compilation_fixes
Fixes compilation targeting c64
2016-07-25 14:57:24 +02:00
Simon Duquennoy 21387b954f Merge pull request #1493 from simonduq/pr/add-missing-ext-hdr
Insert RPL ext header before sending ICMP, UDP and TCP messages
2016-07-25 14:56:25 +02:00
Simon Duquennoy ff5a4751c8 Merge pull request #1610 from simonduq/pr/tsch-rime
TSCH with Rime
2016-07-25 14:55:37 +02:00
George Oikonomou 9d3e4bc591 Merge pull request #1789 from tidyjiang8/tidy.0718
Update comments: RFC3513 is obsoleted by RFC4921
2016-07-24 15:18:56 +01:00
Sumankumar Panchal 6dfd358821 TSCH port for CC2538 based platforms. 2016-07-22 09:38:25 +05:30
Kitty(chun hua) Jiang b5bc140680 Update comments: RFC3513 is obsoleted by RFC4921 2016-07-18 17:29:16 +08:00
Atis Elsts 081ec100a4 TSCH: add RADIO_DELAY_BEFORE_DETECT to rx guard time when waiting for a packet to be received 2016-07-16 18:08:41 +01:00
Nicolas Tsiftes 8a5886dfa1 Merge pull request #1767 from simonduq/pr/missing-return
RPL: added missing return, to not join instances with unsupported MOP
2016-07-15 21:10:57 +02:00
Simon Duquennoy 80b9bfea93 Merge pull request #1723 from gebart/pr/ieee802154-addr-mode-bugfix
core/net/mac/frame802154: Fix typo in PAN ID compression condition
2016-07-05 18:10:21 +02:00
Simon Duquennoy 4ceaaba4bd RPL: added missing return, to not join instances with unsupported MOP 2016-07-05 12:13:46 +02:00
Joakim Nohlgård 6f8306a465 core/net/mac/frame802154: Fix typo in PAN ID compression condition 2016-07-04 18:18:55 +02:00
Simon Duquennoy 5d7ce4e9f2 Merge pull request #920 from cetic/pr-slip-queue
Support more than one pending slip message
2016-07-01 13:50:18 +02:00
Mohamed Seliem 5d99008afb remove duplicate include
Update uip-ds6-nbr.h
2016-07-01 11:12:52 +02:00
Simon Duquennoy 00f2344b4a RPL insert_srh_header: return success when no SRH is needed because the destination is a direct child 2016-06-29 17:26:01 +02:00
Simon Duquennoy d73b229624 Fix and cleanup RPL ext header handling 2016-06-29 17:26:01 +02:00
Simon Duquennoy e584a54608 Insert RPL ext header in tcpip_ipv6_output for consistency 2016-06-29 17:25:10 +02:00
Simon Duquennoy 5eb022fdd8 Merge pull request #1750 from yatch/pr/improve-rpl-ext-hdr
Improve RPL extension headers handling
2016-06-29 10:38:17 +02:00
George Oikonomou a509aa7136 Merge pull request #1689 from kqorany/kqorany-esmrf
A new multicast engine called ESMRF for RPL
2016-06-28 23:23:30 +01:00
George Oikonomou 5e66770aaf Merge pull request #1734 from yatch/pr/pr-fix-mcast6-macro
Fix the source address selection for multicast packets
2016-06-28 23:22:08 +01:00
Yasuyuki Tanaka ffdc53718d RPL: code cleanup (rpl-ext-header.c) 2016-06-27 20:57:48 +02:00
Yasuyuki Tanaka 13f18fd842 RPL: update uip_ext_len whenever moving to next header (rpl-ext-header.c) 2016-06-27 20:57:48 +02:00
Yasuyuki Tanaka 5a79bad4b1 RPL: prevent unintended memory access (rpl_remove_header)
When it goes to the default label in the switch statement of
rpl_remove_header(), UIP_EXT_BUF does not always point to an IPv6 extension
header. "Move to next header" process should be done only in case of
UIP_PROTO_DESTO. Otherwise, it returns with doing nothing.
2016-06-27 20:57:48 +02:00
Yasuyuki Tanaka e361c49f14 RPL non-storing: fix a bug causing an infinite loop
It falls into an infinite loop if it goes to the default label in the switch
statement of rpl_srh_get_next_hop() or rpl_process_srh_header().
2016-06-27 20:57:48 +02:00
Simon Duquennoy 54957e4e03 mac-seqno: add a lifetime to sequence numbers in history 2016-06-24 11:23:19 +02:00
Simon Duquennoy 27b20b09a3 TSCH: enable adaptive time synchronization by default 2016-06-23 22:39:54 +02:00
Simon Duquennoy 15dc86aeb1 TSCH: reduce keep-alive traffic as we get more accurate drift estimates 2016-06-23 22:39:44 +02:00
Simon Duquennoy beb532e7e8 TSCH: use sequence number only for unicast data frames 2016-06-23 22:36:00 +02:00
Benoît Thébaudeau 8fd7719c07 noncoresec: Fix build errors with DEBUG set to 1
Fix these build errors, which are generated if DEBUG is set to 1:

../../core/net/llsec/noncoresec/noncoresec.c: In function 'parse':
../../core/net/llsec/noncoresec/noncoresec.c:198:54: error: expected ')' before 'PRIu32'
     PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n",
                                                      ^
../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF'
 #define PRINTF(...) printf(__VA_ARGS__)
                            ^
../../core/net/llsec/noncoresec/noncoresec.c:198:12: warning: spurious trailing '%' in format [-Wformat=]
     PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n",
            ^
../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF'
 #define PRINTF(...) printf(__VA_ARGS__)
                            ^
../../core/net/llsec/noncoresec/noncoresec.c:198:12: warning: spurious trailing '%' in format [-Wformat=]
     PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n",
            ^
../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF'
 #define PRINTF(...) printf(__VA_ARGS__)
                            ^
../../core/net/llsec/noncoresec/noncoresec.c:231:54: error: expected ')' before 'PRIu32'
        PRINTF("noncoresec: received replayed frame %"PRIu32"\n",
                                                      ^
../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF'
 #define PRINTF(...) printf(__VA_ARGS__)
                            ^
../../core/net/llsec/noncoresec/noncoresec.c:231:15: warning: spurious trailing '%' in format [-Wformat=]
        PRINTF("noncoresec: received replayed frame %"PRIu32"\n",
               ^
../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF'
 #define PRINTF(...) printf(__VA_ARGS__)
                            ^
../../core/net/llsec/noncoresec/noncoresec.c:231:15: warning: spurious trailing '%' in format [-Wformat=]
        PRINTF("noncoresec: received replayed frame %"PRIu32"\n",
               ^
../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF'
 #define PRINTF(...) printf(__VA_ARGS__)
                            ^

PRIu32 is not defined, so replace it with a standard format directive.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-06-23 22:10:43 +02:00
Simon Duquennoy ab706a6f33 TSCH: map RPL trickle interval to TSCH EB period 2016-06-23 18:48:01 +02:00