Generate code for notification handling#15
Merged
kuba-moo merged 2 commits intolinux-netdev:mainfrom Jan 29, 2026
Merged
Conversation
added 2 commits
January 29, 2026 10:36
The code generator was not generating code to initialize ynl_ntf_info::alloc_sz() and ynl_ntf_info::free(). For type casting in and out of ynl_ntf_base_type, I had the code generator create structs in a similar way to the ynl-c repo. The code generator was already doing this but leaving them empty. In the free function, the C++ needs to be manually called before freeing the memory that was allocated with calloc() Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Add a sample binary that demonstrates PSP netlink usage: - Default mode: dumps all PSP devices on the system - With --ntf flag: subscribes to PSP netlink multicast groups and listens for device notifications (dev-add, dev-del, dev-change) Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
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.
It looks like this feature was never fully ported from the ynl-c code generator. We just need to implement the alloc_sz and free methods.