[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52D04B8B.3040306@imap.cc>
Date: Fri, 10 Jan 2014 20:35:39 +0100
From: Tilman Schmidt <tilman@...p.cc>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
CC: linux-man@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netdevice.7: document SIOCGIFCONF case ifc_req==NULL
Hello Michael,
Am 10.01.2014 18:52, schrieb Michael Kerrisk (man-pages):
> On 01/10/2014 12:30 PM, Tilman Schmidt wrote:
>> Add the missing description of the possibility to call SIOCGIFCONF
>> with ifc_req==NULL to determine the needed buffer size, as described
>> in http://lkml.indiana.edu/hypermail/linux/kernel/0110.1/0506.html
>> and verified against source files net/core/dev_ioctl.c and
>> net/ipv4/devinet.c in the current kernel git tree.
[...]>
> Thanks for the patch. I'm trying to verify this from the code, but
> am having some trouble finding the relevant pieces. Could you point
> me more specifically at the points in the kernel source where this
> case is handled?
Gladly.
Function dev_ifconf() [net/core/dev_ioctl.c line 67ff.] is the main
handler for SIOCGIFCONF. It calls the registered protocol specific
handlers via the table gifconf_list[]. The current kernel has only
one such handler, inet_gifconf() [net/ipv4/devinet.c line 1115ff.]
If ifc.ifc_buf is NULL, dev_ifconf() calls the protocol specific
handlers with NULL as second argument. [net/core/dev_ioctl.c line 96]
If inet_gifconf() is called with NULL as second argument it just
adds up the data sizes, skipping the size check and data transfer.
[net/ipv4/devinet.c line 1127f.]
Best regards,
Tilman
--
Tilman Schmidt E-Mail: tilman@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
--
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