RFC 2133 (rfc2133) - Page 2 of 32


Basic Socket Interface Extensions for IPv6



Alternative Format: Original Text Document



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

   While IPv4 addresses are 32 bits long, IPv6 interfaces are identified
   by 128-bit addresses.  The socket interface make the size of an IP
   address quite visible to an application; virtually all TCP/IP
   applications for BSD-based systems have knowledge of the size of an
   IP address.  Those parts of the API that expose the addresses must be
   changed to accommodate the larger IPv6 address size.  IPv6 also
   introduces new features (e.g., flow label and priority), some of
   which must be made visible to applications via the API.  This memo
   defines a set of extensions to the socket interface to support the
   larger address size and new features of IPv6.










Gilligan, et. al.            Informational