Add ability to resolve (and cache) multicast groups for a given family name#16
Add ability to resolve (and cache) multicast groups for a given family name#16Sh3Rm4n wants to merge 8 commits intorust-netlink:mainfrom
Conversation
6b3dfcf to
5e81adf
Compare
| let mut genlmsg: GenlMessage<GenlCtrl> = | ||
| GenlMessage::from_payload(GenlCtrl { | ||
| cmd: GenlCtrlCmd::GetFamily, | ||
| nlas: vec![GenlCtrlAttrs::FamilyName( |
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.
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?
|
@Sh3Rm4n ping |
|
I've unified the interface based on #16 (comment) Instead of removing, I've deprecated obsolete functions, so that this PR is not a breaking change. If this doesn't matter, I could remove those deprecated functions as well. |
34fed9d to
77e85fa
Compare
77e85fa to
c7e6ba3
Compare
Continuation of #12