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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070528140110.GA3733@sortiz.org>
Date:	Mon, 28 May 2007 17:01:10 +0300
From:	Samuel Ortiz <samuel@...tiz.org>
To:	Rodolfo Giometti <giometti@...eenne.com>
Cc:	Johannes Berg <johannes@...solutions.net>,
	Thomas Graf <tgraf@...g.ch>, netdev@...r.kernel.org
Subject: Re: Generic netlink interface help

On Sun, May 27, 2007 at 07:47:59PM +0200, Rodolfo Giometti wrote:
> On Sun, May 27, 2007 at 03:54:30PM +0200, Johannes Berg wrote:
> 
> > It's written in python without using libnl:
> > http://git.sipsolutions.net/pynl80211.git
> 
> If I well understand I should do something like this:
> 
> 	s = socket(PF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
> 
>         memset(&src_addr, 0, sizeof(src_addr));
>         src_addr.nl_family = AF_NETLINK;
>         src_addr.nl_pid = 0;            /* ask kernel to choose an unique ID */
>         src_addr.nl_groups = 0;         /* not in mcast groups */
>         ret = bind(handle->socket, (struct sockaddr *) &src_addr, sizeof(src_add
> 
> to get access to the generic netlink, then I should request the
> generic family name but I don't understand in which structure I should
> put this request... Can you please halp me?
You should first fetch your attributed family ID by sending a generic
netlink request (CTRL_CMD_GETFAMILY) to the generic netlink control family (GENL_ID_CTRL).
Once you have your family ID, you can build generic netlink messages and
send them there.
I'm linking with libnl, but you can have a look at my irconfig draft at
http://sortiz.org/irda/irconfig.c

Cheers,
Samuel.


> Thanks a lot,
> 
> Rodolfo
> 
> -- 
> 
> GNU/Linux Solutions                  e-mail:    giometti@...eenne.com
> Linux Device Driver                             giometti@...dd.com
> Embedded Systems                     		giometti@...ux.it
> UNIX programming                     phone:     +39 349 2432127
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ