Network Interface Guide

Preface

The SunOSTM 5.8 Network Interfaces Programmer's Guide describes the basic facilities to implement distributed applications, and guides the programmer in the use of these facilities.

All utilities, their options, and library functions in this manual reflect SunOS Release 5.8. SunOS 5.8 is a new operating system release developed by Sun Microsystems Inc. If you are using a different version of SunOS, some utilities and library functions might function differently.

Audience

A programmer who must convert an existing single-computer application to a networked, distributed application, design a distributed application, implement a distributed application, or maintain a distributed application on the SunOS 5.8 operating system platform should read this manual. Additional techniques for networked applications are described in ONC+ Developer's Guide. This manual assumes basic competence in programming, a working familiarity with the C programming language, and a working familiarity with the UNIX operating system. Previous experience in network programming is helpful, but is not required to use this manual.

Organization of the Manual

The services and capabilities of the Network Interfaces portion of the SunOS 5.8 platform are described in the following pages.

Chapter 1, Introduction to Network Interfaces describes this manual and its intent.

Chapter 2, Socket Interfaces describes the socket interface at the transport layer.

Chapter 3, Programming With XTI and TLI describes the UNIX System V System Transport Level Interface.

Chapter 4, Transport Selection and Name-to-Address Mapping describes the network selection mechanisms used by applications to select a network transport and its configuration.

Appendixes

Appendix A, UNIX Domain Sockets describes UNIX family sockets.

Appendix B, Live Code Example contains complete, functional listings of the code included in the document as examples. These modules are furnished as examples under the provision stated at the beginning of the appendix.

Ordering Sun Documents

Fatbrain.com, an Internet professional bookstore, stocks select product documentation from Sun Microsystems, Inc.

For a list of documents and how to order them, visit the Sun Documentation Center on Fatbrain.com at http://www1.fatbrain.com/documentation/sun.

Accessing Sun Documentation Online

The docs.sun.comSM Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.

What Typographic Conventions Mean

The following table describes the typographic changes used in this book.

Table P-1 Typographic Conventions

Typeface or Symbol 

Meaning 

Example 

AaBbCc123

 The names of commands, files, and directories; on-screen computer output

Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

AaBbCc123

 What you type, contrasted with on-screen computer outputmachine_name% su Password:

AaBbCc123

 Command-line placeholder: replace with a real name or value

To delete a file, type rm filename.

AaBbCc123

Book titles, new words, or terms, or words to be emphasized. 

Read Chapter 6 in User's Guide.

These are called class options.

You must be root to do this.

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table P-2 Shell Prompts

Shell 

Prompt 

 C shell promptmachine_name%
 C shell superuser promptmachine_name#
 Bourne shell and Korn shell prompt$
 Bourne shell and Korn shell superuser prompt#