Add ability to resolve (and cache) multicast groups for a given family name#16
Open
Sh3Rm4n wants to merge 7 commits intorust-netlink:mainfrom
Open
Add ability to resolve (and cache) multicast groups for a given family name#16Sh3Rm4n wants to merge 7 commits intorust-netlink:mainfrom
Sh3Rm4n wants to merge 7 commits intorust-netlink:mainfrom
Conversation
6b3dfcf to
5e81adf
Compare
cathay4t
requested changes
Nov 22, 2025
| let mut genlmsg: GenlMessage<GenlCtrl> = | ||
| GenlMessage::from_payload(GenlCtrl { | ||
| cmd: GenlCtrlCmd::GetFamily, | ||
| nlas: vec![GenlCtrlAttrs::FamilyName( |
Member
There was a problem hiding this comment.
If this multicast group is also in GetFamily reply, I think we should merge this function into query_family_id(), so we have single netlink request to get both caches ready.
Contributor
Author
There was a problem hiding this comment.
Good point. But in that case query_family_ids function signature does not really fit anymore.
What about
fn query_family(&mut self, handle: &GenetlinkHandle, family_name: &str) -> (u16, HashMap<String, u32>)which returns both id and the groups. At this point, I should probably introduce a struct instead of the tuple from above.
We could still keep query_family_id (and query_family_multicast_groups, which would call query_family internally for backwards compatibility. WDTY?
Member
|
@Sh3Rm4n ping |
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.
Continuation of #12