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

nanocoap_sock: add support for IPv4 #20476

Merged
merged 2 commits into from
Mar 17, 2024
Merged

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Mar 17, 2024

Contribution description

NanoCOAP is already agnostic towards the IP version, but there is one part where the code checks if the destination address is link-local, to see if an interface id is needed.
Since there are no link-local addresses with IPv4, we can simply not do that in the v4 only case.

Testing procedure

Build an LWIP IPv4 application with the nanocoap_vfs module (and default shell commands)

2024-03-17 17:42:20,985 # > ifconfig
2024-03-17 17:42:20,990 # Iface ET0 HWaddr: 7c:df:a1:02:ec:d4 Link: up State: up
2024-03-17 17:42:20,991 #         Link type: wireless
2024-03-17 17:42:20,998 #         inet addr: 10.53.4.195 mask: 255.255.0.0 gw: 10.53.0.1

2024-03-17 17:42:22,763 # > ncget coap://134.102.218.18/
2024-03-17 17:42:22,791 # /test
2024-03-17 17:42:22,792 # /validate
2024-03-17 17:42:22,814 # /hello
2024-03-17 17:42:22,843 # /blåbærsyltetøy
2024-03-17 17:42:22,843 # /sink
2024-03-17 17:42:22,867 # /separate
2024-03-17 17:42:22,867 # /large
2024-03-17 17:42:22,916 # /secret
2024-03-17 17:42:22,960 # /broken
2024-03-17 17:42:22,960 # /weird33
2024-03-17 17:42:22,961 # /weird44
2024-03-17 17:42:22,990 # /weird55
2024-03-17 17:42:22,991 # /weird333
2024-03-17 17:42:23,023 # /weird3333
2024-03-17 17:42:23,023 # /weird33333
2024-03-17 17:42:23,079 # /123412341234123412341234
2024-03-17 17:42:23,107 # /location-query
2024-03-17 17:42:23,136 # /create1
2024-03-17 17:42:23,137 # /large-update
2024-03-17 17:42:23,161 # /large-create
2024-03-17 17:42:23,161 # /query
2024-03-17 17:42:23,190 # /seg1
2024-03-17 17:42:23,191 # /path
2024-03-17 17:42:23,191 # /location1
2024-03-17 17:42:23,214 # /multi-format
2024-03-17 17:42:23,214 # /3
2024-03-17 17:42:23,239 # /4
2024-03-17 17:42:23,239 # /5

Issues/PRs references

@github-actions github-actions bot added Area: network Area: Networking Area: CoAP Area: Constrained Application Protocol implementations Area: sys Area: System labels Mar 17, 2024
@benpicco benpicco requested a review from mguetschow March 17, 2024 16:46
@maribu maribu enabled auto-merge March 17, 2024 17:10
@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 Mar 17, 2024
@riot-ci
Copy link

riot-ci commented Mar 17, 2024

Murdock results

✔️ PASSED

408218f nanocoap_sock: support build with IPv4

Success Failures Total Runtime
10009 0 10009 07m:55s

Artifacts

@maribu maribu added this pull request to the merge queue Mar 17, 2024
Merged via the queue into RIOT-OS:master with commit 4850881 Mar 17, 2024
27 checks passed
@benpicco benpicco deleted the nanocoap-ipv4 branch March 17, 2024 20:38
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants