|
42 | 42 | #include "6LoWPAN/ws/ws_common_defines.h"
|
43 | 43 | #include "6LoWPAN/ws/ws_llc.h"
|
44 | 44 | #include "6LoWPAN/lowpan_adaptation_interface.h"
|
| 45 | +#include "Service_Libs/mac_neighbor_table/mac_neighbor_table.h" |
45 | 46 |
|
46 | 47 | #include "net_rpl.h"
|
47 | 48 | #include "mac_api.h"
|
@@ -443,6 +444,23 @@ static void ws_bootstrap_asynch_confirm(struct protocol_interface_info_entry *in
|
443 | 444 | (void)asynch_message;
|
444 | 445 | }
|
445 | 446 |
|
| 447 | + |
| 448 | +static void ws_neighbor_entry_remove_notify(mac_neighbor_table_entry_t *entry_ptr, void *user_data) |
| 449 | +{ |
| 450 | + //TODO Remove from MAC helper remove, ETX, WS Table entry |
| 451 | + (void) entry_ptr; |
| 452 | + (void) user_data; |
| 453 | +} |
| 454 | + |
| 455 | + |
| 456 | +static bool ws_neighbor_entry_nud_notify(mac_neighbor_table_entry_t *entry_ptr, void *user_data) |
| 457 | +{ |
| 458 | + //TODO generate NS NUD |
| 459 | + (void) entry_ptr; |
| 460 | + (void) user_data; |
| 461 | + return true; |
| 462 | +} |
| 463 | + |
446 | 464 | int ws_bootstrap_init(int8_t interface_id, net_6lowpan_mode_e bootstrap_mode)
|
447 | 465 | {
|
448 | 466 | (void) bootstrap_mode;
|
@@ -481,6 +499,13 @@ int ws_bootstrap_init(int8_t interface_id, net_6lowpan_mode_e bootstrap_mode)
|
481 | 499 | //Disable allways by default
|
482 | 500 | lowpan_adaptation_interface_mpx_register(interface_id, NULL, 0);
|
483 | 501 |
|
| 502 | + mac_neighbor_table_delete(cur->mac_parameters->mac_neighbor_table); |
| 503 | + cur->mac_parameters->mac_neighbor_table = mac_neighbor_table_create(buffer.device_decription_table_size, ws_neighbor_entry_remove_notify |
| 504 | + , ws_neighbor_entry_nud_notify, cur, WS_NEIGHBOR_NUD_TIMEOUT); |
| 505 | + if (!cur->mac_parameters->mac_neighbor_table) { |
| 506 | + return -4; |
| 507 | + } |
| 508 | + |
484 | 509 | ws_llc_create(cur, &ws_bootstrap_asynch_ind, &ws_bootstrap_asynch_confirm);
|
485 | 510 |
|
486 | 511 | mpx_api_t *mpx_api = ws_llc_mpx_api_get(cur);
|
|
0 commit comments