Skip to content
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

sys/net/app/cord: Support the addition of extra registration arguments #16113

Merged
merged 1 commit into from
Sep 4, 2021

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Mar 1, 2021

Contribution description

Registations at a Resouirce Directory can have extra arguments; this is useful for example to ask an RD to reverse-proxy you.

Testing procedure

With a board that gets a route to the Internet, add the following config to one of examples/cord_ep or examples/cord_epsim, and run it.

+CFLAGS += '-DCONFIG_CORD_EXTRAARGS="proxy=on","et=tag:riot-os.org,2020:board"'
+CFLAGS += '-DCONFIG_CORD_EP="myhost"'

The epsim version also needs

-RD_ADDR ?= \"[affe::1]\"
+RD_ADDR ?= \"[2a01:4f8:190:3064::5]\"

whereas the non-simple version needs the command

> cord_ep register [2a01:4f8:190:3064::5]

executed.

Then, you should see your device registering with a synthetic proxy URI (courtesy of the proxy=on argument) in the public RD indicated by the addresses:

$ ./aiocoap-client coap://rd.coap.amsuess.com/endpoint-lookup/ --observe
</reg/2/>; ep="myhost"; et="tag:riot-os.org,2020:board"; base="coap://myhost.proxy.rd.coap.amsuess.com"; rt="core.rd-ep"

(The endpoint name is added manually because this particular RD refuses proxying for devices with non-lowercase endpoint IDs to avoid the hassle of disambiguating the case insensitive host names).

Issues/PRs references

This has all the commits of #16112 in it (as the simple version would otherwise register to an outdated address); the latest commit is what counts.

[edit: all dependencies merged, only single commit left over]

@chrysn chrysn added Area: CoAP Area: Constrained Application Protocol implementations CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 1, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@chrysn chrysn added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label Sep 2, 2021
@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System and removed Area: CoAP Area: Constrained Application Protocol implementations labels Sep 2, 2021
@chrysn
Copy link
Member Author

chrysn commented Sep 2, 2021

Rebased onto master to be testable more easily. Own tests still pass, please review, this is really small.

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 4, 2021
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea sure, why not

@chrysn chrysn merged commit 7381fb6 into RIOT-OS:master Sep 4, 2021
@chrysn
Copy link
Member Author

chrysn commented Sep 4, 2021

Thanks :-)

@chrysn chrysn deleted the cord-extraargs branch September 4, 2021 21:43
@benpicco benpicco added this to the Release 2021.10 milestone Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants