I have no experience in IPv6 programming, perhaps this chapter will be filled by others or moved away to another HOWTO.
More Information can be found here:
RFC 3493 / Basic Socket Interface Extensions for IPv6
RFC 3542 / Advanced Sockets Application Program Interface (API) for IPv6
Porting applications to IPv6 HowTo by Eva M. Castro