-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RDKBWIFI-5: Add Associated STA MLD Configuration Report TLV and relat…
…ed data model This change also cover the following EasyMesh v.6 requirement: If a Multi-AP Agent sends a 1905 Topology Response message (extended), the Multi-AP Agent shall include one Associated STA MLD Configuration Report TLV for each Client MLD and bSTA MLD that is associated.
- Loading branch information
1 parent
9c7f137
commit e7ced98
Showing
9 changed files
with
239 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Copyright 2023 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef DM_ASSOC_STA_MLD_H | ||
#define DM_ASSOC_STA_MLD_H | ||
|
||
#include "em_base.h" | ||
|
||
class dm_assoc_sta_mld_t { | ||
public: | ||
em_assoc_sta_mld_info_t m_assoc_sta_mld_info; | ||
|
||
public: | ||
int init() { memset(&m_assoc_sta_mld_info, 0, sizeof(em_assoc_sta_mld_info_t)); return 0; } | ||
em_assoc_sta_mld_info_t *get_ap_mld_info() { return &m_assoc_sta_mld_info; } | ||
int decode(const cJSON *obj, void *parent_id); | ||
void encode(cJSON *obj); | ||
|
||
bool operator == (const dm_assoc_sta_mld_t& obj); | ||
void operator = (const dm_assoc_sta_mld_t& obj); | ||
|
||
dm_assoc_sta_mld_t(em_assoc_sta_mld_info_t *ap_mld_info); | ||
dm_assoc_sta_mld_t(const dm_assoc_sta_mld_t& ap_mld); | ||
dm_assoc_sta_mld_t(); | ||
~dm_assoc_sta_mld_t(); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/** | ||
* Copyright 2023 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <string.h> | ||
#include <stdlib.h> | ||
#include <errno.h> | ||
#include <assert.h> | ||
#include <signal.h> | ||
#include <unistd.h> | ||
#include <arpa/inet.h> | ||
#include <net/if.h> | ||
#include <linux/filter.h> | ||
#include <netinet/ether.h> | ||
#include <netpacket/packet.h> | ||
#include <linux/netlink.h> | ||
#include <linux/rtnetlink.h> | ||
#include <sys/ioctl.h> | ||
#include <sys/socket.h> | ||
#include <sys/uio.h> | ||
#include <sys/time.h> | ||
#include <unistd.h> | ||
#include "dm_assoc_sta_mld.h" | ||
#include "dm_easy_mesh.h" | ||
#include "dm_easy_mesh_ctrl.h" | ||
|
||
int dm_assoc_sta_mld_t::decode(const cJSON *obj, void *parent_id) | ||
{ | ||
//TODO: needs to be implemnented | ||
|
||
return 0; | ||
} | ||
|
||
void dm_assoc_sta_mld_t::encode(cJSON *obj) | ||
{ | ||
//TODO: needs to be implemnented | ||
} | ||
|
||
void dm_assoc_sta_mld_t::operator = (const dm_assoc_sta_mld_t& obj) | ||
{ | ||
memcpy(&this->m_assoc_sta_mld_info.mac_addr ,&obj.m_assoc_sta_mld_info.mac_addr,sizeof(mac_address_t)); | ||
memcpy(&this->m_assoc_sta_mld_info.ap_mld_mac_addr ,&obj.m_assoc_sta_mld_info.ap_mld_mac_addr,sizeof(mac_address_t)); | ||
this->m_assoc_sta_mld_info.str = obj.m_assoc_sta_mld_info.str; | ||
this->m_assoc_sta_mld_info.nstr = obj.m_assoc_sta_mld_info.nstr; | ||
this->m_assoc_sta_mld_info.emlsr = obj.m_assoc_sta_mld_info.emlsr; | ||
this->m_assoc_sta_mld_info.emlmr = obj.m_assoc_sta_mld_info.emlmr; | ||
this->m_assoc_sta_mld_info.num_affiliated_sta = obj.m_assoc_sta_mld_info.num_affiliated_sta; | ||
memcpy(&this->m_assoc_sta_mld_info.affiliated_sta,&obj.m_assoc_sta_mld_info.affiliated_sta,sizeof(em_affiliated_sta_info_t)); | ||
} | ||
|
||
bool dm_assoc_sta_mld_t::operator == (const dm_assoc_sta_mld_t& obj) | ||
{ | ||
int ret = 0; | ||
|
||
ret += (memcmp(&this->m_assoc_sta_mld_info.mac_addr,&obj.m_assoc_sta_mld_info.mac_addr,sizeof(mac_address_t)) != 0); | ||
ret += (memcmp(&this->m_assoc_sta_mld_info.ap_mld_mac_addr,&obj.m_assoc_sta_mld_info.ap_mld_mac_addr,sizeof(mac_address_t)) != 0); | ||
ret += !(this->m_assoc_sta_mld_info.str == obj.m_assoc_sta_mld_info.str); | ||
ret += !(this->m_assoc_sta_mld_info.nstr == obj.m_assoc_sta_mld_info.nstr); | ||
ret += !(this->m_assoc_sta_mld_info.emlsr == obj.m_assoc_sta_mld_info.emlsr); | ||
ret += !(this->m_assoc_sta_mld_info.emlmr == obj.m_assoc_sta_mld_info.emlmr); | ||
ret += !(this->m_assoc_sta_mld_info.num_affiliated_sta == obj.m_assoc_sta_mld_info.num_affiliated_sta); | ||
ret += (memcmp(&this->m_assoc_sta_mld_info.affiliated_sta,&obj.m_assoc_sta_mld_info.affiliated_sta,sizeof(em_affiliated_ap_info_t)) != 0); | ||
|
||
if (ret > 0) | ||
return false; | ||
else | ||
return true; | ||
} | ||
|
||
dm_assoc_sta_mld_t::dm_assoc_sta_mld_t(em_assoc_sta_mld_info_t *assoc_sta_mld_info) | ||
{ | ||
memcpy(&m_assoc_sta_mld_info, assoc_sta_mld_info, sizeof(em_assoc_sta_mld_info_t)); | ||
} | ||
|
||
dm_assoc_sta_mld_t::dm_assoc_sta_mld_t(const dm_assoc_sta_mld_t& assoc_sta_mld) | ||
{ | ||
memcpy(&m_assoc_sta_mld_info, &assoc_sta_mld.m_assoc_sta_mld_info, sizeof(em_assoc_sta_mld_info_t)); | ||
} | ||
|
||
dm_assoc_sta_mld_t::dm_assoc_sta_mld_t() | ||
{ | ||
|
||
} | ||
|
||
dm_assoc_sta_mld_t::~dm_assoc_sta_mld_t() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters