George Oikonomou
15f6e1d7a3
Change the way of accessing the default v6 prefix
...
This commit changes the method of accessing the default v6 prefix. Instead of always using `UIP_DS6_DEFAULT_PREFIX`, we store the default prefix in a variable. We subsequently retrieve the prefix by calling `uip_ds6_default_prefix()`.
`uip_ds6_init()` will set this variable to the value of `UIP_DS6_DEFAULT_PREFIX`, but only if the startup code has not set a different default prefix before `uip_ds6_init()` gets called.
This approach has the following benefits:
* It allows us to change the default prefix at run time.
* It allows the startup code to set a prefix different than the one specified by `UIP_DS6_DEFAULT_PREFIX`, which can be useful if the default prefix comes from a different source (e.g. the command line for native, or a configuration stored on a node's flash)
* In many places the current code assumes that the prefix contains 6 bytes of zeros (e.g. `FDxx::/64`). Changing to a different prefix (e.g. `FD00:ABCD::`) would need extensive code changes. This change here makes it easy to use a prefix of any length.
2018-11-11 18:30:54 +00:00
Simon Duquennoy
d286854bb4
Merge branch 'develop' into csma-improvements-pr
2018-11-10 15:20:35 +01:00
kkrentz
0c0d7b3e46
CSMA: Assert that n and q are non-NULL in csma-output.c#packet_sent
2018-11-07 03:06:50 -08:00
Joakim Eriksson
ecb214bb2d
clear uipbuf including its attributes before creating a packet
2018-11-02 15:44:45 +01:00
kkrentz
f71db7cc90
CSMA: Discard frames that come from ourselves
2018-11-02 07:14:25 -07:00
kkrentz
74780d5962
CSMA: Do not parse twice/Acknowledge MAC command frames, too
2018-11-02 07:13:23 -07:00
kkrentz
e4dcba32c9
CSMA: Do not depend depend on sequence numbers to identify packets
2018-11-02 07:13:23 -07:00
Simon Duquennoy
bda7c329ba
Merge branch 'develop' into contrib/csma-llsec
2018-11-02 01:13:14 +01:00
Joakim Eriksson
16ac869645
removed some no longer needed hard-coded calculations in the sicslowpan code
2018-10-31 23:02:14 +01:00
Joakim Eriksson
35123e9dd8
fixed better packet size assumptions
2018-10-30 16:36:55 +01:00
Joakim Eriksson
42dfc81af2
added LLSEC attributes form packetbuf to uipbuf when receiving IP packet, and a few other minor fixes
2018-10-30 16:06:11 +01:00
Simon Duquennoy
a2b7b996e4
Merge branch 'develop' into contrib/uip-cleanup
2018-10-29 10:18:10 +01:00
kkrentz
468a14b528
moved initialization of queuebuf to contikimac-main.c
2018-10-27 07:13:36 -07:00
Yasuyuki Tanaka
4d8bb2f550
uip-ds6-nbr: check memb availability before adding an nbr_table entry
2018-10-24 07:03:10 -07:00
Yasuyuki Tanaka
319b70345a
uip-ds6-nbr: introduce UIP_DS6_NBR_MAX_6ADDRS_PER_NBR
2018-10-24 07:01:57 -07:00
Yasuyuki Tanaka
17aa75f0cf
uip-ds6-nbr: add doxygen comments (and re-order some functions)
2018-10-24 07:01:57 -07:00
Yasuyuki Tanaka
ee452b5287
uip-ds6-nbr: introduce UIP_DS6_NBR_MULTI_IPV6_ADDRS
...
This feature, which is disabled by default, extends the neighbor cache
management in order to have multiple IPv6 address associated with a
single link-layer address as neighbor caches.
To use this feature, set 1 to UIP_DS6_NBR_CONF_MAX_NEIGHBOR_CACHES.
2018-10-24 07:01:57 -07:00
Yasuyuki Tanaka
8ef5c8b8c6
uip-ds6-nbr: make ds6_neighbors a local variable
...
All the nbr_table API calls with ds6_neighbors are replaced with
uip_ds6_nbr APIs accordingly.
2018-10-24 07:01:57 -07:00
Toshio Ito
0997932bcb
tsch: skip resynchronization when time source has been already changed.
...
See #712
Plus, now `resynchronize` is a separate function.
2018-10-23 16:31:34 +09:00
Joakim Eriksson
008cffe81a
fixed compilation issues
2018-10-23 08:12:55 +02:00
Joakim Eriksson
a2eec4c985
fixed csma-security debug output
2018-10-20 22:41:02 +02:00
Joakim Eriksson
c42fae82da
added uipbuf attributes for llsec level and key and added payloadlen in mac
2018-10-20 22:25:55 +02:00
George Oikonomou
e96a325588
Merge branch 'develop' into tsch-handle-prepare-error
2018-10-19 21:17:50 +01:00
Simon Duquennoy
9194e82168
uip6: sanitize parsing of ext header options
2018-10-19 16:13:03 +02:00
Toshio Ito
cb962855a4
fix code style for else
2018-10-19 22:32:52 +09:00
Atis Elsts
9faa834f57
Allow the user to configure COAP_CONF_OBSERVE_REFRESH_INTERVAL and allow it to be zero
2018-10-19 13:15:43 +01:00
Simon Duquennoy
ff825daaea
Merge remote-tracking branch 'origin/develop' into wip/uip6-cleanup
2018-10-18 20:28:00 +02:00
Simon Duquennoy
655faf0dca
Further simplification of uip.h buffers
2018-10-18 20:27:30 +02:00
Simon Duquennoy
6c583efa37
Rework ext_hdr_options_process
2018-10-18 20:27:03 +02:00
Simon Duquennoy
6c11da58d8
Rework rpl-ext-header.c
2018-10-18 20:27:03 +02:00
Simon Duquennoy
8456c544d8
Simplify uip.h definitions
2018-10-18 20:26:12 +02:00
Simon Duquennoy
9b66b6931d
Removed UIP_IP_BUF_CHAR
2018-10-18 20:26:12 +02:00
Simon Duquennoy
ea32ab0f12
Removed UIP_LLH_LEN
2018-10-18 20:26:12 +02:00
Simon Duquennoy
999e7dc3a7
Rework uip6.c
2018-10-18 20:26:11 +02:00
George Oikonomou
8014524dd1
Merge branch 'develop' into contrib/cc13xx-tsch
2018-10-18 15:36:50 +01:00
Simon Duquennoy
aaf06754ea
uipbuf_set_len_field
2018-10-18 15:50:54 +02:00
Simon Duquennoy
4018b31123
Removed need for global uip_ext_opt_offset
2018-10-18 15:50:54 +02:00
Simon Duquennoy
d4bc09e002
Move function for clearing uip_buf to uipbuf module
2018-10-18 15:50:54 +02:00
Simon Duquennoy
b4d45d7f56
Removed comment that was no longer necessary
2018-10-18 15:50:54 +02:00
Simon Duquennoy
22f4a19994
Clean up usage of uip_ext_len
2018-10-18 15:50:34 +02:00
Olav Frengstad
df130952c7
Ensure correct setup LLSEC for CSMA
...
* Add `LLSEC_KEY_INDEX` for switching between implicit/explicit keys
* Add missing `LLSEC_CONF_*
* Conditionally include required CSMA setup for IPv6 (enable security
when calculating frame length)
* Setup default key
* Always export `csma_security_set_key/2`
2018-10-18 11:28:58 +02:00
Joakim Eriksson
c5d59843c4
added linklayer security for CSMA
2018-10-18 11:28:58 +02:00
Toshio Ito
fc8ccac560
tsch: report MAC_TX_ERR if prepare() fails
...
Before this fix, uninitialized mac_tx_status was reported in this case.
2018-10-18 16:05:45 +09:00
Simon Duquennoy
56b85b6475
uip.h: clarify comment
2018-10-17 17:47:57 +02:00
Simon Duquennoy
3384de64b7
Rework buffer access in roll-tm.c
2018-10-17 17:37:12 +02:00
Simon Duquennoy
0531c555e8
Minor enhancements to uip6.c
2018-10-17 17:25:04 +02:00
Simon Duquennoy
bbb641a450
Rework uip-nd6 buffer access
2018-10-17 17:24:53 +02:00
Simon Duquennoy
01b795a4c2
Rework uIP6 extension header options access
2018-10-17 17:07:17 +02:00
Simon Duquennoy
8152342c11
Rework uIP6 extension header access
2018-10-17 16:33:48 +02:00
Simon Duquennoy
4035d840dd
Rework uip.h buffer definitions
2018-10-17 16:25:17 +02:00