RDKBACCL-1343: Utilizing rfcmgr for BPI#23
Open
pganna856 wants to merge 1 commit intordkcentral:developfrom
Open
RDKBACCL-1343: Utilizing rfcmgr for BPI#23pganna856 wants to merge 1 commit intordkcentral:developfrom
pganna856 wants to merge 1 commit intordkcentral:developfrom
Conversation
Reason for change:
Adding required changes to support rfcMgr for BPI
Test Procedure:
Verify RFC feature is working or not. Feature should work and generate dcmrfc logs.
Risks: None
Signed-off-by: Prabhudas Gannavarapu <prabhudas_gannavarapu@comcast.com>
41183c9 to
637a9ac
Compare
manigandanj
reviewed
Mar 2, 2026
| } | ||
|
|
||
| RDK_LOG(RDK_LOG_INFO, LOG_RFCMGR, "[%s] Recevied eRouterMac(eSTBMac): %s\n", __FUNCTION__,erouterMac.c_str()); | ||
| return erouterMac; |
There was a problem hiding this comment.
Is it okay to return local object in CPP?
manigandanj
reviewed
Mar 2, 2026
|
|
||
| RDK_LOG(RDK_LOG_INFO, LOG_RFCMGR, "[%s] Recevied eRouterMac(eSTBMac): %s\n", __FUNCTION__,erouterMac.c_str()); | ||
| return erouterMac; | ||
|
|
There was a problem hiding this comment.
Minor: Please remove this extra line.
cpokuru
reviewed
Mar 2, 2026
| // FEATURE_RDKB_WAN_MANAGER Get WANINTERFACE ( | ||
| std::string wanInterfaceName = getWanInterfaceName(); | ||
|
|
||
| std::string cmd = std::string("cat /sys/class/net/") + wanInterfaceName + "/address | tr '[a-f]' '[A-F]'"; |
Contributor
There was a problem hiding this comment.
can you read it from HAL rather than using popen.
| std::string wanInterface = getWanInterfaceName(); | ||
| std::string cmd; | ||
|
|
||
| cmd = std::string("cat /sys/class/net/") + wanInterface + "/address | tr '[a-f]' '[A-F]'"; |
|
|
||
| // If empty, fallback to sysevent get eth_wan_mac | ||
| if (erouterMac.empty()) { | ||
| pipe = popen("sysevent get eth_wan_mac | tr '[a-f]' '[A-F]'", "r"); |
Contributor
There was a problem hiding this comment.
can we use standard api's .for example sysevent_get.
for example
sysevent_get(sysevent_fd, sysevent_token, cmd, ipv6_addr, sizeof(ipv6_addr));
| std::string interfaceName; | ||
|
|
||
| // Execute sysevent get current_wan_ifname | ||
| FILE* pipe = popen("sysevent get current_wan_ifname", "r"); |
Contributor
There was a problem hiding this comment.
use standard apis
sysevent_get(sysevent_fd, sysevent_token, cmd, ipv6_addr, sizeof(ipv6_addr));
|
|
||
| // Check if sysevent failed (non-zero exit status) or returned empty string | ||
| if (exitStatus != 0 || interfaceName.empty()) { | ||
| interfaceName = "erouter0"; |
Contributor
There was a problem hiding this comment.
Pls dont hardcode interface name
| } | ||
| } else { | ||
| // If popen failed, default to erouter0 | ||
| interfaceName = "erouter0"; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change:
Adding required changes to support rfcMgr for BPI
Test Procedure:
Verify RFC feature is working or not. Feature should work and generate dcmrfc logs.
Risks: None