[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070606121338.72lwb34vc4soogw8@email.ee.ethz.ch>
Date: Wed, 06 Jun 2007 12:13:38 +0200
From: Ariane Keller <arkeller@...ethz.ch>
To: netdev@...r.kernel.org
Subject: [GENETLINK] get pid from userspace
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists