Skip to content

Commit

Permalink
Wi-sun LLC Data request IE update
Browse files Browse the repository at this point in the history
Added BT-IE header data to all 6lowpan messages.

Change-Id: I123435256c6b23c82e7f82249a921bf86a25bffa
  • Loading branch information
Juha Heiskanen committed Sep 19, 2018
1 parent a27076f commit 7e3c16c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static uint16_t ws_mpx_header_size_get(llc_data_base_t *base, uint16_t user_id)
//TODO add WS_WP_NESTED_IE support
uint16_t header_size = 0;
if (user_id == MPX_LOWPAN_ENC_USER_ID) {
header_size += 7+ 5 + 2; //UTT+ MPX + Padding
header_size += 7 + 8 + 5 + 2; //UTT+BTT+ MPX + Padding
if (base->ie_params.vendor_header_length) {
header_size += base->ie_params.vendor_header_length + 3;
}
Expand Down Expand Up @@ -615,6 +615,7 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
wp_nested_ie_sub_list_t nested_wp_id;
memset(&nested_wp_id, 0, sizeof(wp_nested_ie_sub_list_t));
ie_header_mask.utt_ie = true;
ie_header_mask.bt_ie = true;
if (base->ie_params.vendor_header_length && user_id == MPX_LOWPAN_ENC_USER_ID) {
ie_header_mask.vh_ie = true;
}
Expand Down Expand Up @@ -675,6 +676,7 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
//Write UTT

ptr = ws_wh_utt_write(ptr, message->messsage_type);
ptr = ws_wh_bt_write(ptr);

if (user_id == MPX_LOWPAN_ENC_USER_ID && ie_header_mask.vh_ie) {
ptr = ws_wh_vh_write(ptr, base->ie_params.vendor_header_data, base->ie_params.vendor_header_length);
Expand Down

0 comments on commit 7e3c16c

Please sign in to comment.