From: Tilman Schmidt <tilman-ZTO5kqT2PaM@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] netdevice.7: document SIOCGIFCONF case ifc_req==NULL
Date: Fri, 10 Jan 2014 20:35:39 +0100 [thread overview]
Message-ID: <52D04B8B.3040306@imap.cc> (raw)
In-Reply-To: <52D03351.20501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-ZTO5kqT2PaM@public.gmane.org
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 linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-01-10 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 23:30 [PATCH] netdevice.7: document SIOCGIFCONF case ifc_req==NULL Tilman Schmidt
[not found] ` <20140109233018.886FA140064-MSQiN3VOO+MkAF8ESQKhnNBPR1lH4CV8@public.gmane.org>
2014-01-10 17:52 ` Michael Kerrisk (man-pages)
[not found] ` <52D03351.20501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-10 19:35 ` Tilman Schmidt [this message]
2014-01-16 4:23 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D04B8B.3040306@imap.cc \
--to=tilman-zto5kqt2pam@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).