Pass base URI struct seperately to serialization function#11
Merged
Conversation
Owner
|
Why do you want to have another parameter in the function, when you can just update the thing itself? |
Collaborator
Author
|
@Citrullin Do you think we could merge this into the |
JKRhb
commented
Jan 9, 2021
Comment on lines
+101
to
+110
| 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) { |
Collaborator
Author
There was a problem hiding this comment.
@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).
Collaborator
Author
There was a problem hiding this comment.
I merged the PR now into the wot_gcoap branch but this is probably something we should keep in mind.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 :)