Basic Socket Interface Extensions for IPv6
RFC 3493

Document Type RFC - Informational (March 2003; No errata)
Obsoletes RFC 2553
Last updated 2015-10-14
Stream IETF
Formats plain text pdf html bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 3493 (Informational)
Consensus Boilerplate Unknown
Telechat date
Responsible AD Thomas Narten
IESG note published as RFC 3493.
Send notices to <mrw@windriver.com>
Network Working Group                                        R. Gilligan
Request for Comments: 3493                                Intransa, Inc.
Obsoletes: 2553                                               S. Thomson
Category: Informational                                            Cisco
                                                                J. Bound
                                                               J. McCann
                                                         Hewlett-Packard
                                                              W. Stevens
                                                           February 2003

               Basic Socket Interface Extensions for IPv6

Status of this Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2003).  All Rights Reserved.

Abstract

   The de facto standard Application Program Interface (API) for TCP/IP
   applications is the "sockets" interface.  Although this API was
   developed for Unix in the early 1980s it has also been implemented on
   a wide variety of non-Unix systems.  TCP/IP applications written
   using the sockets API have in the past enjoyed a high degree of
   portability and we would like the same portability with IPv6
   applications.  But changes are required to the sockets API to support
   IPv6 and this memo describes these changes.  These include a new
   socket address structure to carry IPv6 addresses, new address
   conversion functions, and some new socket options.  These extensions
   are designed to provide access to the basic IPv6 features required by
   TCP and UDP applications, including multicasting, while introducing a
   minimum of change into the system and providing complete
   compatibility for existing IPv4 applications.  Additional extensions
   for advanced IPv6 features (raw sockets and access to the IPv6
   extension headers) are defined in another document.

Gilligan, et al.             Informational                      [Page 1]
RFC 3493       Basic Socket Interface Extensions for IPv6  February 2003

Table of Contents

   1.  Introduction................................................3
   2.  Design Considerations.......................................4
       2.1  What Needs to be Changed...............................4
       2.2  Data Types.............................................6
       2.3  Headers................................................6
       2.4  Structures.............................................6
   3.  Socket Interface............................................6
       3.1  IPv6 Address Family and Protocol Family................6
       3.2  IPv6 Address Structure.................................7
       3.3  Socket Address Structure for 4.3BSD-Based Systems......7
       3.4  Socket Address Structure for 4.4BSD-Based Systems......9
       3.5  The Socket Functions...................................9
       3.6  Compatibility with IPv4 Applications..................10
       3.7  Compatibility with IPv4 Nodes.........................11
       3.8  IPv6 Wildcard Address.................................11
       3.9  IPv6 Loopback Address.................................13
       3.10 Portability Additions.................................14
   4.  Interface Identification...................................16
       4.1  Name-to-Index.........................................17
       4.2  Index-to-Name.........................................17
       4.3  Return All Interface Names and Indexes................18
       4.4  Free Memory...........................................18
   5.  Socket Options.............................................18
       5.1  Unicast Hop Limit.....................................19
       5.2  Sending and Receiving Multicast Packets...............19
       5.3  IPV6_V6ONLY option for AF_INET6 Sockets...............22
   6.  Library Functions..........................................22
       6.1  Protocol-Independent Nodename and
            Service Name Translation..............................23
       6.2  Socket Address Structure to Node Name
            and Service Name......................................28
       6.3  Address Conversion Functions..........................31
       6.4  Address Testing Macros................................33
   7.  Summary of New Definitions.................................33
   8.  Security Considerations....................................35
   9.  Changes from RFC 2553......................................35
   10. Acknowledgments............................................36
   11. References.................................................37
   12. Authors' Addresses.........................................38
Show full document text