Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154413829
D48308.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
917 B
Referenced Files
None
Subscribers
None
D48308.diff
View Options
diff --git a/sys/netlink/netlink_snl_generic.h b/sys/netlink/netlink_snl_generic.h
--- a/sys/netlink/netlink_snl_generic.h
+++ b/sys/netlink/netlink_snl_generic.h
@@ -127,6 +127,24 @@
return (attrs.family_id);
}
+static inline uint16_t
+snl_get_genl_mcast_group(struct snl_state *ss, const char *family_name,
+ const char *group_name, uint16_t *family_id)
+{
+ struct _getfamily_attrs attrs = {};
+
+ snl_get_genl_family_info(ss, family_name, &attrs);
+ if (attrs.family_id == 0)
+ return (0);
+ if (family_id != NULL)
+ *family_id = attrs.family_id;
+ for (u_int i = 0; i < attrs.mcast_groups.num_groups; i++)
+ if (strcmp(attrs.mcast_groups.groups[i]->mcast_grp_name,
+ group_name) == 0)
+ return (attrs.mcast_groups.groups[i]->mcast_grp_id);
+ return (0);
+}
+
static const struct snl_hdr_parser *snl_all_genl_parsers[] = {
&_genl_ctrl_getfam_parser, &_genl_ctrl_mc_parser,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 10:00 AM (4 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32341891
Default Alt Text
D48308.diff (917 B)
Attached To
Mode
D48308: netlink: add snl(3) primitive to obtain group ID
Attached
Detach File
Event Timeline
Log In to Comment