Hi,

I have a user space program which "connects" to different kernel modules with generic netlink. Each module provides its own generic netlink family.

For each module to "connect" to I create a socket and bind it:
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
struct sockaddr_nl addr;
memset(&addr, 0, sizeof(addr));
bind(fd, (struct sockaddr *)&addr, sizeof(addr));

As far as I understand, this lets the generic netlink controller choose a unique pid, which shows up in the kernel module in the callback function as genl_info.snd_pid.

Is it possible to get this pid in userspace (without sending a message to the kernel module)?

Thanks!

Ariane




-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to