After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 138390 - patch for IPv6 support
patch for IPv6 support
Status: RESOLVED WONTFIX
Product: gnome-netstatus
Classification: Deprecated
Component: general
0.9
Other Linux
: High enhancement
: ---
Assigned To: Mark McLoughlin
Mark McLoughlin
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2004-03-29 10:08 UTC by Danielle Madeley
Modified: 2011-07-10 02:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
finalized patch (10.19 KB, patch)
2004-05-12 13:23 UTC, Danielle Madeley
none Details | Review
now with ./configure support (10.13 KB, patch)
2004-05-16 10:34 UTC, Danielle Madeley
needs-work Details | Review
somewhat cleaned up (11.67 KB, patch)
2004-06-25 07:30 UTC, Danielle Madeley
needs-work Details | Review

Description Danielle Madeley 2004-03-29 10:08:24 UTC
A patch for IPv6 support in gnome-netstatus is available at:
http://davyd.angrygoats.net/gnome-netstatus-ipv6.diff

A screenshot is available from:
http://davyd.angrygoats.net/images/gnome-netstatus-ipv6.png
Comment 1 alexander.winston 2004-04-03 21:29:10 UTC
Oooh, spicy. :)

Adding the PATCH keyword and bumping priority to high.
Comment 2 Danielle Madeley 2004-05-12 13:23:30 UTC
Created attachment 27636 [details] [review]
finalized patch

This patch cleans up some mess from my copy of the tree, it also stops
displaying the large number of assertion errors it was before.

Is it ok to commit?
Comment 3 Danielle Madeley 2004-05-16 10:34:36 UTC
Created attachment 27754 [details] [review]
now with ./configure support

configure support might be important. Not everyone has IPv6.
Comment 4 Mark McLoughlin 2004-06-24 16:33:53 UTC
Thanks for your patience :-)

 - The IPv6 support should always be compiled in available. Have a look
   at the check in gnome-session - it just tries to create an socket
   and doesn't build IPv6 support if it fails. I'd just copy that.

 - Please use GNU coding style everywhere. The existing coding style is
   very consistent - it should be easy to copy it.

 - I think we should be able to do this without /proc in using a similar
   method to get_inet4_details. Create an AF_INET6 socket, get the addr
   using SIOCGIFADDR and get the scope using the IN6_ADDR_IS_* macros
   in netinet/in.h. No idea whether that's more portable, but it certainly
   has a better chance of being portable.

 - If we have to use /proc, the code to parse it should be in 
   netstatus-sysdeps.c and should be similar to the other /proc parsing
   code.
Comment 5 Danielle Madeley 2004-06-25 04:49:55 UTC
Using the ioctl() SIOCGIFADDR won't work in Linux at least. This is what I
originally did (straight from Stevens), however there is a stub in the Linux
kernel which quite clearly indicates this is not implemented.

ifconfig parses /proc, so does iproute2. I'll try and get it rearranged and
sorted out.
Comment 6 Mark McLoughlin 2004-06-25 07:30:03 UTC
Ah, I see now you'd already tried SIOCGIFADDR. So, a bit more research leads me
to the following conclusions:

 1) SIOCGIFADDR can't be implemented for IPv6 since the ifreq structure is
    too small

 2) On Linux and BSDs we should be using the getifaddrs() function rather
    than using the SIOCGIFCONF/SIOCGIFADDR etc. ioctl()s (even for IPv4)

 3) On Solaris we should be using the SIOCGLIFCONF/SIOCGLIFADDR ioctl()s
    which are newly introduced ioctl()s which take a structure which is
    big enough to hold the IPv6 data.

So, this is a pretty big re-organisation of the code. At some point I want to do
it, but I'm happy to go with the /proc/net/if_inet6 parsing for now. 

Oh, and what ifconfig does is irrelevant - it makes no pretence of portability.
Comment 7 Danielle Madeley 2004-06-25 07:30:10 UTC
Created attachment 28995 [details] [review]
somewhat cleaned up

Ok, ./configure now autodetects IPv6, and the /proc parsing has been moved to
the sysdeps file. Haven't really done anything to change the coding style, or
parse proc in a similar way.

Pointers always appriciated.
Comment 8 Mark McClelland 2008-04-25 22:54:47 UTC
It looks like this patch never made it in. I'd be glad to forward-port and test it if no one else wants to.
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2008-11-26 20:47:28 UTC
Mark, please feel free to update this patch. Let us know if you have questions.
Comment 10 Akhil Laddha 2011-07-10 02:44:26 UTC
gnome-netstatus development has been stalled [1]. Maintainers don't have
future development plan so i am closing the bugs as WONTFIX.

[1] http://mail.gnome.org/archives/desktop-devel-list/2011-June/msg00073.html