-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell/gnrc_netif: Use netif API for ifconfig #12355
shell/gnrc_netif: Use netif API for ifconfig #12355
Conversation
1887acf
to
ab85840
Compare
Rebased now that #11879 has been merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git mv sys/shell/commands/sc_gnrc_netif.c sys/shell/commands/sc_netif.c
?
Maybe it's better to rename it after all GNRC dependencies are removed |
need time for testing, won't block either though
ab85840
to
9864fb0
Compare
Rebased to current master |
Yes, that would make sense. There is no specific reason why I added the |
9864fb0
to
7bdd0ed
Compare
@miri64 I removed the prefix from the name and reverted the changes in tests. |
I've adapted the GNRC netif tests according to the new names. |
@smlng can you start testing this? |
I was asked to run the gnrc_tcp tests on this PR because they rely on the output of ifconfig. From my point of view everything works as it should. |
The current > ifconfig
ifconfig
-Iface 6 HWaddr: C2:1F:EE:FD:61:CB
+Iface 6 HWaddr: C2:1F:EE:FD:61:CB
L2-PDU:1500 MTU:1500 HL:64 RTR |
Thanks @rosetree! I added the missing spaces. |
At the Hack ’n’ ACK I tested the following commands, some native and some on the SAMR21 board:
I executed the commands on both the |
@rosetree as discussed offline, please report about the other tests that you did (which succeeded). Furthermore, I ran gnrc_networking on a samr21-xpro using this PR and current master, and compared different outputs, all of which looked similar (besides that IPv6 address generation has changed in the meantime). In more detail I compared:
-> all good |
@smlng hope this helps you a bit :-) |
please rebase and squash |
328f5f6
to
cb28400
Compare
@smlng done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested ACK, though I couldn't test all possible interface variants out there
let's see how Murdock feels about it 😄 |
Thanks all for reviewing and testing! |
Contribution description
This PR modifies the
ifconfig
andtxtsnd
command implementations to use the new netif API introduced in #11879.Some changes had to be made in tests as now the name for GNRC interfaces returnsif<n>
(that's the value returned by GNRC's implementation ofnetif_get_name
).This may be a first step towards having a generic implementation of this command, that does not depend on the stack that is currently being used.
For now the PR includes commits of #11879, I will rebase when it gets merged, but the changes on the commands can be reviewed anyway.Testing procedure
Run the modified tests, they should still work.Issues/PRs references
Depends on #11879