Previous Next Table of Contents

6. IPv6 application information

6.1 How to write for and port to IPv6

libc5, glibc, and where the #includes are

This section is a bit in flux - there's a big discussion going back and forth on the netdev mailing list about where the proper place to put things is. This means that you need to prepare yourself for some Makefile hackery or other such work when you try and compile IPv6 apps. However, there's currently a few ways to approach this:

  1. Using libc5 and a set of new include files: From Philip Blundell

    "Please check out:
    
            ftp://kc.london.uk.eu.org/pub/ipv6-inc.tar.gz
    
            You should unpack this under /usr.  It provides the following stuff:
    
            /usr/include/ipv6/netdb.h
            /usr/include/ipv6/netinet/in.h
            /usr/include/ipv6/netinet6/in6.h
    
            The first two are just wrappers round the corresponding libc5 headers that
            define some new stuff.  netinet6/in6.h is a dummy file that just includes
            <netinet/in.h> so that while we go through this period of confusion people
            can use either naming scheme.
            The idea is that you compile IPv6 applications with -I/usr/ipv6/include,
            so they pick up these headers first.  You will need to link with libinet6
            from the inet6-apps package.
    
            I don't refer to <linux/in6.h> so this should be independent of kernel
            version.  At the moment there is no support for the advanced API.  I will
            do this later."
    
            
    

  2. Using a patched glibc (which, at present, supports the Basic API only)

    Also from Philip Blundell:

            This afternoon I've been working on merging support for IPv6 into glibc.
    
            For those who want to give it a go quickly, there is a patch (against the
            latest snapshot, but I think it ought to go cleanly into 2.0.x as well) at
    
                    ftp://kc.london.uk.eu.org/pub/glibc-2.0.90-glibc-diff
    
            I believe support for the basic API is essentially complete.  Please let
            me know if you notice omissions or errors.  I have not tried to implement
            the advanced API at the moment; this will have to wait until it is more
            stable.  This means that, with a patched glibc, you should be able to
            build most of the inet6-apps suite without using the `libinet6' support
            library or its header files.  `ping' and `traceroute' are the exceptions
            to this. 
    
            I have decided to go for the approach of putting all the inet6 stuff in
            <netinet/in.h> rather than creating <netinet6/in6.h>.  This is what the
            standard says, and I would rather not put Linux-specific deviations into
            glibc if I can possibly help it.
    
            Bad things will happen if you have conflicting header files lying around.
            You should probably apply the attached patch to the inet6-apps makefile
            (to stop it using its own headers) and destroy any <netinet6/in6.h> that
            you might already have installed.  You may want to create a dummy
            /usr/include/netinet6/in6.h that just contains the line
                
                        #include <netinet/in.h>
    
            in order to keep Linux code happy.  If you want to compile things that
            need the advanced API you will need to do some hacking, as the glibc
            headers don't currently coexist very well with the ones from inet6-apps.
    
            
    

6.2 Applications under IPv6

Is there an IPv6-porters mailing list?

Yes. Thanks to bound@zk3.dec.com for pointing this out. Subscribe via ipv6imp-request@munnari.oz.au


Previous Next Table of Contents