-
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
gnrc: link-type flag #3697
gnrc: link-type flag #3697
Conversation
|
|
||
printf("Link type: %s ", (entry->flags & GNRC_IPV6_NETIF_FLAGS_IS_WIRED) ? | ||
"wired" : "wireless"); | ||
linebreak= true; |
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.
Can we put this in an extra line? Though it is a flag internally, the way you print it does not show it as a flag.
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.
I have no opinion on this. What do I need to do? Apparently the linebreak = true
isn't enough.
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.
Just put it above https://github.com/RIOT-OS/RIOT/pull/3697/files#diff-ad63ecb056f596bac854115d8ccb46ebR300 e.g.
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.
This one still needs fixing, though
Anything else apart from https://github.com/RIOT-OS/RIOT/pull/3697/files#diff-c385624ce7895442f48edbb1bc19963fR276 ? |
Ah, overlooked that ^^ |
* | ||
* @note Setting this option will always return -EONOTSUP. | ||
*/ | ||
NETOPT_IS_WIRED, |
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.
Can you use the netopt_enable_t
type here too? That -ENOTSUP
is returned for set
(or when the interface is not wired) is given if you document this option only for "getting". Look at the other flags to get an idea about how they are documented/use netopt_enable_t
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.
I don't know what I should change here.
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.
NETOPT_IS_WIRED, /**< get if interface is wired as type
* netopt_enable_t. */
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.
For the record: IIRC we concluded that no change is necessary. Correct me, if I'm wrong. To me the current version seems the most descriptive one.
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.
Yes. Later PRs can update the other option types.
addressed comment |
ACK, please squash. |
5802187
to
8fdf121
Compare
squashed and waiting for Travis |
Unittests need adaptation. |
8fdf121
to
7b967a1
Compare
adapted and squashed immediately |
Re-ACK |
@OlegHahm Somehow this PR breaks ping6 (didn't try more networking) on trifecta using cc110x. |
Weird, I certainly tested on iotlab-m3 and native last week. Will investigate. |
Got it. Setting 0 to flags overrides setting other flags from above. |
(have a fix ready, wait) |
Dammit, 2 hrs of bisecting. |
sorry |
no problemo ;) |
Alternative to #3632.
Introduces a netopt type to indicate a wired link. To save code-lines for the default case (aka wireless tranceivers) a non-wired interface can just return
-ENOTSUP
. A corresponding flag is set on an IPv6 interface.