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  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]
Date:	Mon, 16 Jun 2008 22:39:19 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Amar Mudrankit <amar.mudrankit@...gic.com>
CC:	netdev@...r.kernel.org, rdreier@...co.com,
	general@...ts.openfabrics.org, poornima.kamath@...gic.com
Subject: Re: [ofa-general] Re: [PATCH v4 14/14] QLogic VNIC: sysfs Documentation

Amar Mudrankit wrote:
>>> I was looking at latest release of iproute2, in which I could not
>>> locate fill_xstats. Can you help me to locate this?
>> ->fill_xstats is in the kernel, in iproute its ->print_xstats.
> 
> I was looking at kernel code net/8021q/vlan_netlink.c on which I have
> following queries:
> 
> a.  Is it a correct file in kernel I m referring to?

Yes.

> b.  vlan_fill_info is a function to send parameters back to user
> level. What is the role of skb as an argument to function? Is some
> network operation expected?

netlink is a (local) networking protocol, this is the message
sent to userspace.

> c.  How exactly the kernel API ops->get_size comes into play? I guess
> user prog should first get the size of parameters that will be
> returned by driver before calling ops->fill_info.

No, its used internally for skb allocation. It should return
the size of all encapsulated netlink attributes that will be
dumped by ->fill_info (in most cases, just a constant value).

> d.  Can somebody briefly introduce struct nlattr? It looks like all
> parameters flow through this structure.

Not much to say about it, nla_type contains the numerical
attribute type, nla_len the length without padding. Data
follows the attribute, followed by padding to a multiple
of four. The netlink construction functions and macros
from include/net/netlink.h take care of all of this for
you.
--
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