Repository navigation
Conversation
include/netpacket/netlink.h in nuttx is being split, so that each netlink protocol has its own header and a user includes only what it speaks: the rtnetlink definitions move to netpacket/rtnetlink.h and the netfilter ones to netpacket/nfnetlink.h. Include the header that each file actually needs. No functional change. Assisted-by: Kiro:claude-opus-4 Signed-off-by: daichuan <daichuan@xiaomi.com>
checkpatch reports a missing blank line after a declaration in each of these files, and one misaligned brace in netlib_getdevs.c. They are pre-existing, but the previous commit touches every one of these files, so fix them here rather than leave the series reporting errors. Whitespace only: a blank line after seventeen declarations and the indentation of one closing brace. Assisted-by: Kiro:claude-opus-4 Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
xiaoxiang781216
approved these changes
Nov 27, 2026
xiaoxiang781216
approved these changes
Nov 27, 2026
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.
Summary
include/netpacket/netlink.h in nuttx is being split, so that each
netlink protocol has its own header and a user includes only what it
speaks: the rtnetlink definitions move to netpacket/rtnetlink.h and the
netfilter ones to netpacket/nfnetlink.h.
Include the header each file actually needs. Six files, one include line
each, no functional change.
Impact
None on its own: the headers already exist in nuttx after the companion
pull request, and netpacket/netlink.h keeps everything these files use
until then. Afterwards, these files would no longer compile without this
change, so the two must land together.
Companion: apache/nuttx PR net/netlink: add the Generic Netlink protocol.
depends-on: apache/nuttx#22487
Testing
Built sim:dynconns (CI config, tools/ci/testlist/sim-02.dat) against
the companion nuttx branch, with gcc 13.4 and gcc 11. Without this change
the build fails on the netlib files:
netlib_getarptab.c:49:19: error: field 'gen' has incomplete type
netlib_getarptab.c:150:26: error: 'RTM_GETNEIGH' undeclared
With it, the build is clean and the netlink paths still work: the
RTM_GETLINK dump through netlib_get_devices() and the conntrack
listing through netlib_conntrack.c return the same results as before.