0

I'm writing userspace IPC with generic netlink(API in libnl) since I never tried it before. Most code I found are about kernel & user space IPC, And their generic netlink family are registered in that kernel module.

I expect not to write a kernel module but it seems there is no user space API to create a family id by family name. Do I need the kernel module part for IPC between userspace?

Here's what I do before using the netlink socket:

sk = nl_socket_alloc();
genl_connect(sk);
genl_register_family(&gn_ops);
//at this point, the family id(gn_ops.o_id) is not filled
genl_ops_resolve(sk, &gn_ops);
//the family id is filled from kernel, can't I get a new family id just in userspace?

0 Answers0