|
33 | 33 | #include "6LoWPAN/MAC/mac_data_poll.h"
|
34 | 34 | #include "6LoWPAN/MAC/mpx_api.h"
|
35 | 35 | #include "6LoWPAN/MAC/mac_ie_lib.h"
|
| 36 | +#include "MPL/mpl.h" |
36 | 37 | #include "6LoWPAN/ws/ws_common_defines.h"
|
37 | 38 | #include "6LoWPAN/ws/ws_config.h"
|
38 | 39 | #include "6LoWPAN/ws/ws_common.h"
|
|
64 | 65 |
|
65 | 66 | #ifdef HAVE_WS
|
66 | 67 |
|
67 |
| -#define TRIGLE_IMIN_60_SECS (60 * 10) // |
| 68 | +#define TRICKLE_IMIN_60_SECS (60 * 10) // |
68 | 69 |
|
69 | 70 | static const trickle_params_t trickle_params_pan_discovery = {
|
70 |
| - .Imin = TRIGLE_IMIN_60_SECS, /* 60 second; ticks are 1s */ |
71 |
| - .Imax = TRIGLE_IMIN_60_SECS << 4, /* 960 seconds 16 min*/ |
| 71 | + .Imin = TRICKLE_IMIN_60_SECS, /* 60 second; ticks are 1s */ |
| 72 | + .Imax = TRICKLE_IMIN_60_SECS << 4, /* 960 seconds 16 min*/ |
72 | 73 | .k = 1, /* 1 */
|
73 | 74 | .TimerExpirations = TRICKLE_EXPIRATIONS_INFINITE
|
74 | 75 | };
|
@@ -596,6 +597,7 @@ static int8_t ws_bootstrap_up(protocol_interface_info_entry_t *cur)
|
596 | 597 | if (ret_val) {
|
597 | 598 | goto cleanup;
|
598 | 599 | }
|
| 600 | + |
599 | 601 | /* Disable SLLAO send/mandatory receive with the ARO */
|
600 | 602 | cur->ipv6_neighbour_cache.use_eui64_as_slla_in_aro = true;
|
601 | 603 | /* Omit sending of NA if ARO SUCCESS */
|
@@ -1326,6 +1328,25 @@ int ws_bootstrap_init(int8_t interface_id, net_6lowpan_mode_e bootstrap_mode)
|
1326 | 1328 | set_req.value_size = sizeof(bool);
|
1327 | 1329 | cur->mac_api->mlme_req(cur->mac_api, MLME_SET, &set_req);
|
1328 | 1330 |
|
| 1331 | + // Set the default parameters for MPL |
| 1332 | + cur->mpl_proactive_forwarding = true; |
| 1333 | + |
| 1334 | + cur->mpl_data_trickle_params.Imin = MPL_MS_TO_TICKS(DATA_MESSAGE_IMIN); |
| 1335 | + cur->mpl_data_trickle_params.Imax = MPL_MS_TO_TICKS(DATA_MESSAGE_IMAX); |
| 1336 | + cur->mpl_data_trickle_params.TimerExpirations = DATA_MESSAGE_TIMER_EXPIRATIONS; |
| 1337 | + cur->mpl_data_trickle_params.k = 8; |
| 1338 | + |
| 1339 | + // Specification is ruling out the compression mode, but we are now doing it. |
| 1340 | + cur->mpl_seed = true; |
| 1341 | + cur->mpl_seed_id_mode = MULTICAST_MPL_SEED_ID_IPV6_SRC_FOR_DOMAIN; |
| 1342 | + cur->mpl_seed_set_entry_lifetime = MPL_SEED_SET_ENTRY_TIMEOUT; |
| 1343 | + |
| 1344 | + cur->mpl_control_trickle_params.TimerExpirations = 0; |
| 1345 | + |
| 1346 | + mpl_domain_create(cur, ADDR_ALL_MPL_FORWARDERS, NULL, MULTICAST_MPL_SEED_ID_DEFAULT, -1, 0, NULL, NULL); |
| 1347 | + addr_add_group(cur, ADDR_REALM_LOCAL_ALL_NODES); |
| 1348 | + addr_add_group(cur, ADDR_REALM_LOCAL_ALL_ROUTERS); |
| 1349 | + |
1329 | 1350 | return 0;
|
1330 | 1351 |
|
1331 | 1352 | //Error handling and free memory
|
|
0 commit comments