This manual explains how to write programs with the X/Open Transport Interface (XTI) calls, STREAMS I/O calls, and the Berkeley Software Distribution (BSD) socket calls. For XTI and sockets, it provides conceptual and programming information. Additionally, it explains how to port applications from Transport Layer Interface (TLI) to XTI and from sockets to XTI. For STREAMS, this manual explains any differences between the Tru64 UNIX® implementation and the AT&T System V Release 4 implementation. It also provides information on the Extensible System Network Management Protocol (eSNMP) application programming interface, the Resource ReSerVation Protocol (RSVP) application programming interface, and AF_INET6 sockets.
After reading this manual, you should be able to:
Understand the programming support provided in Tru64 UNIX for networking
Write an XTI application by using either connection-oriented or connectionless service
Understand the Tru64 UNIX implementation of STREAMS
Write a socket application
Understand the differences between TLI and XTI and between sockets and XTI
Write an eSNMP application
This manual addresses experienced UNIX programmers. We assume you are familiar with the following:
C language
Programming interfaces for UNIX operating systems
Basic networking concepts, including an understanding of the Open Systems Interconnection (OSI) 7-layer model
Efforts required to write networking applications
This revision of the Network Programmer's Guide contains the following changes:
Chapter 6 has been revised. The chapter now includes four new calling interface routines.
Chapter 9has been revised. The chapter now includes the missing callouts for the sample client and server programs.
This manual is organized as follows:
Chapter 1 | Provides an overview of XTI, STREAMS, sockets, and the programming tasks required for network applications. |
Chapter 2 | Describes the
dlb
pseudodriver,
which implements a subset of the the Data Link Provider Interface (DLPI). |
Chapter 3 | Describes the fundamental concepts associated with XTI, how to write connection-oriented and connectionless applications, compatibility issues with TLI, and how to port applications to XTI. XTI errors are also covered in this chapter. |
Chapter 4 | Describes the concepts associated with the socket interface, and how to write socket applications. |
Chapter 5 | Describes Tru64 UNIX implementation of STREAMS. |
Chapter 6 | Describes the Extensible System Network Management Application Programming Interface. |
Chapter 7 | Describes the Resource ReSerVation Protocol Application Programming Interface. |
Chapter 8 | Describes the
ifnet
STREAMS
module and
dlb
STREAMS pseudodriver communication bridges. |
Chapter 9 | Describes how to write applications that use AF_INET6 sockets for communication. |
Appendix A | Provides a sample STREAMS module. |
Appendix B | Provides XTI and sockets programming examples. |
Appendix C | Provides Transport Protocol Control (TCP) specific programming information. |
Appendix D | Provides information required by token ring driver developers. |
Appendix E | Describes the Data Link Interface (DLI) and provides programming examples. |
This guide also contains a glossary of terms and an index.
Related Documents
For general information about programming with Tru64 UNIX, refer to the Programmer's Guide.
For additional information about networking APIs, refer to the following manual:
UNIX Network Programming, Networking APIs: Sockets and XTI by W. Richard Stevens, ISBN 0-13-490012-X, published by Prentiss-Hall
For additional information about XTI, refer to the following manuals:
X/Open Portability Guide Volume 7: Networking Services (XPG3), ISBN 0-13-685892-9
Application Environment Specification (AES) Operating System Programming Interfaces Volume, ISBN 0-13-043522-8, published by Prentice-Hall, includes all of the mandatory XTI calls
X/Open CAE Specification: Networking Services, Issue 4 (XNS4.0), ISBN 1-85912-049-0
For additional information about the STREAMS I/O framework, refer to the following manuals:
Programmer's Guide: STREAMS. Englewood Cliffs:Prentice-Hall, Inc., 1990.
This manual explains how to write applications, modules, and device drivers with STREAMS.
AT&T System V Release 4 Programmer's Reference Manual. Englewood Cliffs:Prentice-Hall, Inc., 1989.
This manual contains the reference pages for all programming interfaces, including those for STREAMS.
AT&T System V Release 4 System Administrator's Reference Manual. Englewood Cliffs:Prentice-Hall, Inc., 1989.
This manual contains the reference pages for STREAMS
ioctl
commands.
Transport Provider Interface (TPI) Specification, UNIX International
For additional information about the socket interface, refer to the following books:
Internetworking with TCP/IP: Principles, Protocols, and Architecture. Englewood Cliffs:Prentice-Hall, Inc., 1988.
This book, by Douglas Comer, includes a chapter that describes the socket interface.
X/Open CAE Specification: Networking Services, Issue 4 (XNS4.0), ISBN 1-85912-049-0
Protocol Independent Interfaces P1003.1g Draft 6.6. IEEE draft 1997.
Design and Implementation of the 4.3BSD UNIX Operating System. Reading:Addison-Wesley Publishing Company, 1989.
This book, by Leffler, McKusick, Karels, and Quarterman, includes information about the purpose and use of sockets.
For information about administering networking interfaces, refer to
the
System Administration
guide and the
Network Administration
guide.
Icons on Tru64 UNIX Printed Books
The printed version of the Tru64 UNIX documentation uses letter icons on the spines of the books to help specific audiences quickly find the books that meet their needs. (You can order the printed documentation from Compaq.) The following list describes this convention:
G | Books for general users |
S | Books for system and network administrators |
P | Books for programmers |
D | Books for device driver writers |
R | Books for reference page users |
Some books in the documentation help meet the needs of several audiences. For example, the information in some system books is also used by programmers. Keep this in mind when searching for information on specific topics.
The
Documentation Overview
provides
information on all of the books in the Tru64 UNIX documentation set.
Reader's Comments
Compaq welcomes any comments and suggestions you have on this and other Tru64 UNIX manuals.
You can send your comments in the following ways:
Fax: 603-884-0120 Attn: UBPG Publications, ZKO3-3/Y32
Internet electronic mail:
readers_comment@zk3.dec.com
A Reader's Comment form is located on your system in the following location:
/usr/doc/readers_comment.txt
Mail:
Compaq Computer Corporation
UBPG Publications Manager
ZKO3-3/Y32
110 Spit Brook Road
Nashua, NH 03062-2698
A Reader's Comment form is located in the back of each printed manual. The form is postage paid if you mail it in the United States.
Please include the following information along with your comments:
The full title of the book and the order number. (The order number is printed on the title page of this book and on its back cover.)
The section numbers and page numbers of the information on which you are commenting.
The version of Tru64 UNIX that you are using.
If known, the type of processor that is running the Tru64 UNIX software.
The Tru64 UNIX Publications group cannot respond to system problems or
technical support inquiries.
Please address technical questions to your
local system vendor or to the appropriate Compaq technical support office.
Information provided with the software media explains how to send problem
reports to Compaq.
Conventions
This document uses the following typographic conventions:
%
$
A percent sign represents the C shell system prompt. A dollar sign represents the system prompt for the Bourne, Korn, and POSIX shells.
#
A number sign represents the superuser prompt.
%
cat
Boldface type in interactive examples indicates typed user input.
Italic (slanted) type indicates variable values, placeholders, and function argument names.
In syntax definitions, brackets indicate items that are optional and braces indicate items that are required. Vertical bars separating items inside brackets or braces indicate that you choose one item from among those listed.
colored
text
In syntax definitions, literal elements are colored green. Variable values, placeholders, and function argument names are colored red. No special colored text is used outside of syntax descriptions.
In syntax definitions, a horizontal ellipsis indicates that the preceding item can be repeated one or more times.
cat
(1)A cross-reference to a reference page includes the appropriate section
number in parentheses.
For example,
cat
(1)
indicates that you can find information on the
cat
command in Section 1 of the reference pages.
In an example, a key name enclosed in a box indicates that you press that key.
This symbol indicates that you hold down the first named key while pressing the key or mouse button that follows the slash. In examples, this key combination is enclosed in a box (for example, [Ctrl/C] ).