-
Notifications
You must be signed in to change notification settings - Fork 3k
Add API to get ipv6 link local address #11279
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,16 @@ class OnboardNetworkStack : public NetworkStack { | |
|
||
virtual char *get_ip_address(char *buf, nsapi_size_t buflen) = 0; | ||
|
||
/** Copies IPv6 link local address of the network interface in SocketAddress format | ||
* | ||
* @address SocketAddress representation of the link local IPv6 address | ||
* @return NSAPI_ERROR_OK on success, negative error code on failure | ||
*/ | ||
virtual nsapi_error_t get_ipv6_link_local_address(SocketAddress *address) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this here? There is a default implementation in NetworkInterface already for this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some mesh interfaces, for example LoWPANNDInterface, don't inherit from |
||
{ | ||
return NSAPI_ERROR_UNSUPPORTED; | ||
} | ||
|
||
/** Copies IP address of the network interface to user supplied buffer | ||
* | ||
* @param buf buffer to which IP address will be copied as "W:X:Y:Z" | ||
|
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.
Why this is here, instead of
LWIPStack.cpp
where rest of the LWIP class members are.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.
get_ipv6_link_local_addr is a private function of the class. Public API's name is get_ipv6_link_local_address