Basic Socket Interface Extensions for IPv6
RFC 2133

Document Type RFC - Informational (April 1997; No errata)
Obsoleted by RFC 2553
Last updated 2013-03-02
Stream IETF
Formats plain text pdf html bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 2133 (Informational)
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                        R. Gilligan
Request for Comments: 2133                                      Freegate
Category: Informational                                       S. Thomson
                                                                Bellcore
                                                                J. Bound
                                                                 Digital
                                                              W. Stevens
                                                              Consultant
                                                              April 1997

               Basic Socket Interface Extensions for IPv6

Status of this Memo

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

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 [5].

Table of Contents

   1.  Introduction ................................................  2
   2.  Design Considerations .......................................  3
   2.1.  What Needs to be Changed ..................................  3
   2.2.  Data Types ................................................  5
   2.3.  Headers ...................................................  5
   2.4.  Structures ................................................  5
   3.  Socket Interface ............................................  5
   3.1.  IPv6 Address Family and Protocol Family ...................  5
   3.2.  IPv6 Address Structure ....................................  6

Gilligan, et. al.            Informational                      [Page 1]
RFC 2133            IPv6 Socket Interface Extensions          April 1997

   3.3.  Socket Address Structure for 4.3BSD-Based Systems .........  6
   3.4.  Socket Address Structure for 4.4BSD-Based Systems .........  7
   3.5.  The Socket Functions ......................................  8
   3.6.  Compatibility with IPv4 Applications ......................  9
   3.7.  Compatibility with IPv4 Nodes .............................  9
   3.8.  IPv6 Wildcard Address ..................................... 10
   3.9.  IPv6 Loopback Address ..................................... 11
   4.  Interface Identification .................................... 12
   4.1.  Name-to-Index ............................................. 13
   4.2.  Index-to-Name ............................................. 13
   4.3.  Return All Interface Names and Indexes .................... 14
   4.4.  Free Memory ............................................... 14
   5.  Socket Options .............................................. 14
   5.1.  Changing Socket Type ...................................... 15
   5.2.  Unicast Hop Limit ......................................... 16
   5.3.  Sending and Receiving Multicast Packets ................... 17
   6.  Library Functions ........................................... 19
   6.1.  Hostname-to-Address Translation ........................... 19
   6.2.  Address To Hostname Translation ........................... 22
   6.3.  Protocol-Independent Hostname and Service Name Translation  22
   6.4.  Socket Address Structure to Hostname and Service Name ..... 25
   6.5.  Address Conversion Functions .............................. 27
   6.6.  Address Testing Macros .................................... 28
   7.  Summary of New Definitions .................................. 29
   8.  Security Considerations ..................................... 31
   9.  Acknowledgments ............................................. 31
   10.  References ................................................. 31
   11.  Authors' Addresses ......................................... 32

1.  Introduction
Show full document text