-
Notifications
You must be signed in to change notification settings - Fork 1
Pass base URI struct seperately to serialization function #11
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
Conversation
|
Why do you want to have another parameter in the function, when you can just update the thing itself? |
|
@Citrullin Do you think we could merge this into the |
| static int get_base_ip_address(ipv6_addr_t *res) { | ||
| const int MAX_ADRESSES_TO_CHECK = 5; | ||
| netif_t* interface = NULL; | ||
| ipv6_addr_t local_address = {0}; | ||
| ipv6_addr_t ula_address = {0}; | ||
| bool link_local_found = false; | ||
| bool ula_found = false; | ||
| int netres; | ||
|
|
||
| while ((interface = netif_iter(interface)) != NULL) { |
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.
@Citrullin Do you think only the net interface that received the request should be checked for IPaddresses? I think that should be relatively easy to implement (using sock_aux_local).
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 merged the PR now into the wot_gcoap branch but this is probably something we should keep in mind.
This PR tries to lay the groundwork for passing the base URI from a CoAP packet to the serialization function. As soon as #8 (or a similar solution) is merged, the IP address a
GET /.well-known/wot-thing-descriptionrequest was sent to should be able to be determined, extracted from the CoAP packet, and added to the TD. Feedback is very much appreciated :)