Skip to content

pkg/lwip: add LWP_IP4_ADDR_INIT macro#21969

Merged
miri64 merged 2 commits intoRIOT-OS:masterfrom
krzysztof-cabaj:lwip_utils_addr_init_macro
Jan 12, 2026
Merged

pkg/lwip: add LWP_IP4_ADDR_INIT macro#21969
miri64 merged 2 commits intoRIOT-OS:masterfrom
krzysztof-cabaj:lwip_utils_addr_init_macro

Conversation

@krzysztof-cabaj
Copy link
Contributor

@krzysztof-cabaj krzysztof-cabaj commented Dec 29, 2025

Contribution description

This PR adds LWIP_IP4_ADDR_INIT macro which could be used for setting LWIP ip4_addr_t address.

This macro is similar to IPV4_ADDR_INIT for ipv4_addr_t and the issue was spotted in PR #21519 see comment.

update 2025.01.09

Currently as @miri64 suggested I add this macro as a patch for LWIP package. To be aligned with LWIP naming, current name of the macro is IP4_ADDR_INIT. The code from the patch is added in PR for LWIP github repository - see for details.

Testing procedure

I use this macro in examples/lwip_ipv4 - check if everything still works.

Issues/PRs references

PR #21519

@github-actions github-actions bot added Area: network Area: Networking Area: pkg Area: External package ports Area: examples Area: Example Applications labels Dec 29, 2025
@krzysztof-cabaj krzysztof-cabaj force-pushed the lwip_utils_addr_init_macro branch from 466eddd to 4830f3a Compare December 29, 2025 13:53
@crasbe crasbe added Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 30, 2025
@riot-ci
Copy link

riot-ci commented Dec 30, 2025

Murdock results

✔️ PASSED

6ddf4f5 pkg/lwip: add patch with IP4_ADDR_INIT macro

Success Failures Total Runtime
10984 0 10984 12m:13s

Artifacts

@miri64
Copy link
Member

miri64 commented Dec 31, 2025

This initializes a data type defined by lwIP upstream. Why not provide it there (and in the meantime until the next release, add a patch to the package)?

@krzysztof-cabaj
Copy link
Contributor Author

Ok. This is a good idea.

I prepare PR for LWIP and when I have it - I provide appropriate patch in this PR.

@krzysztof-cabaj krzysztof-cabaj force-pushed the lwip_utils_addr_init_macro branch from 4830f3a to 6ddf4f5 Compare January 9, 2026 12:21
@miri64 miri64 enabled auto-merge January 12, 2026 16:01
@miri64 miri64 added this pull request to the merge queue Jan 12, 2026
Merged via the queue into RIOT-OS:master with commit 4f248e3 Jan 12, 2026
26 checks passed
@leandrolanzieri leandrolanzieri added this to the Release 2026.01 milestone Jan 13, 2026
@krzysztof-cabaj
Copy link
Contributor Author

@miri64 Thanks for idea and support with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: examples Area: Example Applications Area: network Area: Networking Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants