-
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
netif: add functions to parse and output hardware addresses #2705
Conversation
@@ -90,6 +90,41 @@ void ng_netif_remove(kernel_pid_t pid); | |||
*/ | |||
kernel_pid_t *ng_netif_get(size_t *size); | |||
|
|||
/** | |||
* @brief Converts a hardware address to a human readable format. |
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.
maybe better: "Converts a hardware address to a \0 terminated string"
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 sounds misleading: a '\0'
terminated string can also just be the bytes of the address (not converted to hex strings!) + an appended '\0'
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.
hm, ok. Just wanted to stress that the string is NULL terminated to be used in string functions (as printf("%s", ...)
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.
Okay, I get your point will do s/format/string/
. Does that suffice?
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.
And done.
789b6d3
to
04a895e
Compare
Rebased to current master |
04a895e
to
325b128
Compare
Rebased to current master |
325b128
to
fe50e2a
Compare
Rebased to current master (again Oo) |
9f184dd
to
45554bf
Compare
size_t addr_len); | ||
|
||
/** | ||
* @brief Parses a string of colon-seperated hexadecimals to a hardware |
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.
seperate -> separate
Addressed comments and optimized |
thanks :) |
db0b14e
to
1a0d97f
Compare
Squashed. |
Kicked Travis... |
And it's done |
Here we go... ACK and go! :) |
netif: add functions to parse and output hardware addresses
Adds address parsing and string-conversion functions for hardware addresses in a similar way as I did for
ng_ipv6_addr
.