Skip to contentSkip to conversation

genl: Add a genl_family getter for genl

PATCH Applied Andrew Zaborowski 2 participants 2 messages Dec 20, 2016 – Dec 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genl: Add a genl_family getter for genl

Add l_genl_family_get_genl function (redundant but accurate name)

---
 ell/genl.c | 8 ++++++++
 ell/genl.h | 1 +
 2 files changed, 9 insertions(+)
ell/genl.c +8 -0
index c522ae7..cff3a9a 100644
@@ -1173,6 +1173,14 @@ LIB_EXPORT uint32_t l_genl_family_get_version(struct l_genl_family *family)
 	return family->version;
 }
 
+LIB_EXPORT struct l_genl *l_genl_family_get_genl(struct l_genl_family *family)
+{
+	if (unlikely(!family))
+		return 0;
+
+	return family->genl;
+}
+
 static bool match_op_id(const void *a, const void *b)
 {
 	const struct genl_op *op = a;
ell/genl.h +1 -0
index fe188d9..8597c8f 100644
@@ -104,6 +104,7 @@ bool l_genl_set_unicast_handler(struct l_genl *genl,
 						l_genl_destroy_func_t destroy);
 
 uint32_t l_genl_family_get_version(struct l_genl_family *family);
+struct l_genl *l_genl_family_get_genl(struct l_genl_family *family);
 
 bool l_genl_family_can_send(struct l_genl_family *family, uint8_t cmd);
 bool l_genl_family_can_dump(struct l_genl_family *family, uint8_t cmd);
Signature · 1 line
2.9.3
#1 lore raw

Hi Andrew,

Quoted 6 lines · Andrew Zaborowski

Add l_genl_family_get_genl function (redundant but accurate name)

---
 ell/genl.c | 8 ++++++++
 ell/genl.h | 1 +
 2 files changed, 9 insertions(+)

Applied, thanks.

Regards,
-Denis