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: <1227788425.3809.92.camel@johannes.berg>
Date:	Thu, 27 Nov 2008 13:20:25 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Inaky Perez-Gonzalez <inaky@...ux.intel.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 09/39] wimax: provides user space with information
	needed when opening a WiMAX device

On Thu, 2008-11-27 at 10:54 +0100, Johannes Berg wrote:

> > +	result = -ENOMEM;
> > +	reply_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
> > +	if (reply_skb == NULL)
> > +		goto error_new;
> > +	data = genlmsg_put_reply(reply_skb, genl_info,
> > +				 &wimax_dev->gnl_family,
> > +				 0, WIMAX_GNL_RP_IFINFO);
> > +	if (data == NULL)
> > +		goto error_put_reply;
> > +
> > +	nla_groups = nla_nest_start(reply_skb, WIMAX_GNL_IFINFO_MC_GROUPS);
> > +	if (nla_groups == NULL)
> > +		goto error_groups_start;
> > +
> > +	list_for_each_entry(pipe_itr, &wimax_dev->pipe_list,
> > +			    list_node) {
> > +		nla_group = nla_nest_start(reply_skb,
> > +					   WIMAX_GNL_IFINFO_MC_GROUP);
> > +		if (nla_group == NULL)
> > +			goto error_group_start;
> > +
> > +		nla_put_u16(reply_skb, WIMAX_GNL_IFINFO_MC_ID,
> > +			    pipe_itr->mcg.id);
> > +		nla_put_string(reply_skb, WIMAX_GNL_IFINFO_MC_NAME,
> > +			       pipe_itr->mcg.name);
> 
> All this is discoverable via the genl controller and a pipe naming
> scheme, so I don't think you need this "open" command at all.

In fact, it's entirely trivial since you use a genl family for each
interface, thus you just have to ask the genl controller for the groups
associated with that family. If you need sample code, check out iw.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ