TCP/IP Programming Manual

1 Introduction to Programming to the Guardian Sockets
Library
This section discusses topics relating to sockets programming in the Guardian environment, including:
“NonStop TCP/IP Subsystems and the Guardian Sockets Application Program Interface (API)”
(page 23)
“TCP/IP Programming Fundamentals” (page 24)
“Programming Using the Guardian Sockets Interface” (page 32)
“Basic Steps for Programs” (page 35)
“Programmatic Interface to Raw Sockets” (page 41)
“Programming Considerations” (page 43)
“Multicasting Operations” (page 44)
“Input/Output Multiplexing” (page 48)
NonStop TCP/IP Subsystems and the Guardian Sockets Application
Program Interface (API)
This manual documents the Guardian sockets API for the following four NonStop TCP/IP subsystems:
NonStop TCP/IP (also called conventional TCP/IP)
Parallel Library TCP/IP
NOTE: Parallel Library TCP/IP is only supported on NonStop S-series servers.
NonStop TCP/IPv6
Cluster I/O Protocols (CIP)
Parallel Library TCP/IP and NonStop TCP/IPv6 share the same architecture; however, their
architectures differ from that of conventional NonStop TCP/IP. For the most part, the different
subsystem architectures do not affect the sockets API, with some exceptions. (See Multiple NonStop
TCP/IP Processes and Logical Network Partitioning (LNP) (NonStop TCP/IPv6, H-Series and G06.22
and Later G-Series RVUs Only) (page 43)). For a comparison of the architectures of the three
subsystems, see the TCP/IPv6 Configuration and Management Manual.
The greater difference, from a program-interface standpoint, lies in the difference between support
for Internet Protocol version 4 (IPv4) and IPv6. NonStop TCP/IPv6 is the only NonStop TCP/IP
subsystem that supports IPv6 communications. Writing and porting applications for IPv6 is discussed
in Chapter 2. Where structures, header files, and library routines apply only to IPv6 and, therefore,
only to the NonStop TCP/IPv6 product, this restriction is indicated in the text.
NonStop TCP/IPv6 has three operating modes: INET, INET6, and DUAL. When NonStop TCP/IPv6
runs in INET mode, it supports only IPv4 communications. In this mode, NonStop TCP/IPv6 is similar
to Parallel Library TCP/IP and can be used instead of Parallel Library TCP/IP to achieve the same
architectural advantages without the need to use the IPv6 capabilities. NonStop TCP/IPv6 continues
to be enhanced and contains new features not available in Parallel Library TCP/IP, such as logical
network partitioning. For this reason, your network administrator might have chosen to install the
NonStop TCP/IPv6 subsystem instead of Parallel Library TCP/IP. If so, you can use NonStop
TCP/IPv6 in INET or DUAL mode without any changes to your sockets applications. (In DUAL mode,
if you do not change your application to support IPv6 addresses, your application can use the IPv4
addresses supplied by the subsystem.)
Parallel Library TCP/IP and NonStop TCP/IPv6 can coexist with conventional NonStop TCP/IP on
the same system but not with each other.
NonStop TCP/IP Subsystems and the Guardian Sockets Application Program Interface (API) 23