genl: Add a genl_family getter for genl
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
@@ -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
@@ -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
Denis Kenzior
AppliedHi Andrew,
Quoted 6 lines · Andrew Zaborowski
Add
l_genl_family_get_genlfunction (redundant but accurate name)--- ell/genl.c | 8 ++++++++ ell/genl.h | 1 + 2 files changed, 9 insertions(+)
Applied, thanks.
Regards,
-Denis