-
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
net: add eui48 type including IPv6 IID conversion funcs #10567
Conversation
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.
LGTM. Untested ACK.
sys/include/net/eui48.h
Outdated
* | ||
* @see <a href="https://tools.ietf.org/html/rfc2464#section-4"> | ||
* E.g.: RFC 2464, section 4 | ||
* </a> |
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.
Rather use markdown style? It's more compact and more readable when reading the doc unparsed.
* @see [RFC 2464, section 4](https://tools.ietf.org/html/rfc2464#section-4)
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.
definitely, was just copy pasted, changed.
sys/include/net/eui48.h
Outdated
* | ||
* @see <a href="https://tools.ietf.org/html/rfc2464#section-4"> | ||
* E.g.: RFC 2464, section 4 | ||
* </a> |
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.
BTW, the reasoning for the flipping of the U/L bit can be found in RFC 4291, section 2.5.1, for those interested.
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.
added this also as reference
@haukepetersen I think you forgot to push ;-) |
the fuctionality was moved into eui48_to_ipv6_iid()
dd97764
to
bd48932
Compare
nope, simply found some other minors to fix:
all squashed right in. |
ACK. Tested with native by a) checking the IID of the auto-configured IPv6 address |
all green -> lets go. |
Contribution description
While working on the IID handling for GNRC and on implementing GNRC over NimBLE, I found that the IID handling is identical for BLE and Ethernet (and also ESP_NOW). So IMO it makes sense to factor the IID generation and reversal into its own header, as it should be the same for all IEEE EUI-48 based device addresses.
Further calling some
ethernet_get_iid()
function forswitch NETDEV_TYPE_BLE
looks pretty strange :-)Testing procedure
Make sure ping6 between
native
nodes (they use Ethernet) still works as expected.Issues/PRs references
follow up on #10513