lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
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