Skip to content

Pass base URI struct seperately to serialization function#11

Merged
JKRhb merged 17 commits into
wot_gcoapfrom
wot_gcoap_base_uri
Jan 15, 2021
Merged

Pass base URI struct seperately to serialization function#11
JKRhb merged 17 commits into
wot_gcoapfrom
wot_gcoap_base_uri

Conversation

@JKRhb

@JKRhb JKRhb commented Jan 2, 2021

Copy link
Copy Markdown
Collaborator

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-description request was sent to should be able to be determined, extracted from the CoAP packet, and added to the TD. Feedback is very much appreciated :)

@JKRhb JKRhb requested a review from Citrullin January 2, 2021 01:30
@Citrullin

Copy link
Copy Markdown
Owner

Why do you want to have another parameter in the function, when you can just update the thing itself?

@JKRhb JKRhb requested review from Citrullin and removed request for Citrullin January 4, 2021 22:04
@JKRhb

JKRhb commented Jan 6, 2021

Copy link
Copy Markdown
Collaborator Author

@Citrullin Do you think we could merge this into the wot_gcoap branch or should something else be implemented/optimized first?

Comment thread sys/net/wot/coap/coap.c
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) {

@JKRhb JKRhb Jan 9, 2021

Copy link
Copy Markdown
Collaborator Author

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).

Copy link
Copy Markdown
Collaborator Author

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.

@JKRhb JKRhb merged commit 013d5fd into wot_gcoap Jan 15, 2021
@JKRhb JKRhb deleted the wot_gcoap_base_uri branch May 16, 2021 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants