Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2018 22:51:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 159099] [ioctl] ioctl SIOCGIFCONF does not export an array of struct ifreq
Message-ID:  <bug-159099-9-E37XQyVZBd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-159099-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-159099-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D159099

Brooks Davis <brooks@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|kern                        |Documentation
            Summary|[ioctl] ioctl SIOCGIFCONF   |[ioctl] ioctl SIOCGIFCONF
                   |reports interface names     |does not export an array of
                   |which are blank             |struct ifreq
           Assignee|freebsd-bugs@FreeBSD.org    |freebsd-doc@FreeBSD.org
                 CC|                            |brooks@FreeBSD.org
            Product|Base System                 |Documentation
            Version|unspecified                 |Latest

--- Comment #4 from Brooks Davis <brooks@FreeBSD.org> ---
The documented behavior of SIOCGIFCONF is to write an array of struct ifreq=
.=20
If all interface addresses (including link layer addresses) fit in struct
sockaddr's 14 bytes of sa_data this is true.  If any longer addresses exist
(e.g. IPv6 addresses) then the implementation writes out the ifr_name value
(16-bytes) followed by the sockaddr.  The next item follows the same rule.

Both the current implementation and tcpdump assume that there is no pad bet=
ween
ifr_name and ifr_addr.  This assumption holds for all current architectures.

[I believe this is a documentation bug in both the comments and the manpage=
s.=20
Documentation should note the above issues and this this interface is
non-portable.]

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-159099-9-E37XQyVZBd>