Transport Interfaces Programming Guide
  Search only this book
Download this book in PDF

............................Contents


1. Introduction to Network Programming Interfaces
1
..The Client-Server Model 2
..Network Services in the Solaris Environment 3
..Layered Protocols 4
....Open Systems Interconnection Reference Model 5
....Internet Protocol Suite (TCP/IP) 7
....TCP/IP Protocol Stack 7
..Connection Oriented and Connectionless Protocols 8
....Connection-Oriented Protocols 9
....Connectionless Protocols 9
....Choosing Between COTS and CLTS 10

2. Programming With Sockets
11
..Sockets are Multithread Safe 11
..SunOS Binary Compatibility 11
..What Are Sockets 12
....Socket Libraries 13
....Socket Types 13
..Socket Tutorial 14
....Socket Creation 14
....Binding Local Names 14
....Connection Establishment 16
....Connection Errors 17
....Data Transfer 18
....Closing Sockets 18
....Connecting Stream Sockets 19
....Datagram Sockets 23
....Input/Output Multiplexing 28
..Standard Routines 31
....Host Names 31
....Network Names 32
....Protocol Names 32
....Service Names 32
....Other Routines 33
..Client-Server Programs 34
....Servers 34
....Clients 37
....Connectionless Servers 38
..Advanced Topics 41
....Out-of-Band Data 41
....Nonblocking Sockets 43
....Asynchronous Sockets 44
....Interrupt Driven Socket I/O 44
....Signals and Process Group ID 45
....Selecting Specific Protocols 46
....Address Binding 47
....Broadcasting and Determining Network Configuration 49
....Socket Options 52
....inetd Daemon 53
..Moving Socket Applications to Solaris 2.x 54

3. Programming With the Transport Layer Interface (TLI)
59
..TLI Is Multithread Safe 59
..What Is TLI 60
..Connectionless Mode 61
....Connectionless Mode Routines 62
..Connectionless Mode Service 62
....Endpoint Initiation 62
....Data Transfer 64
....Datagram Errors 67
..Connection Mode 67
....Connection Mode Routines 68
..Connection Mode Service 72
....Endpoint Initiation 72
....Connection Establishment 78
....Data Transfer 84
....Connection Release 88
..A Read/Write Interface 90
....write 91
....read 91
....close 92
..Advanced Topics 93
....Asynchronous Execution Mode 93
....Advanced Programming Example 93
..State Transitions 100
....TLI States 100
....Outgoing Events 101
....Incoming Events 102
....Transport User Actions 103
....State Tables 103
..Guidelines to Protocol Independence 106
..TLI Versus Socket Interfaces 107
..Socket-to-TLI Equivalents 108

4. Transport Selection and
..Name-to-Address Mapping 111
..Transport Selection Is Multithread Safe 111
..Transport Selection 112
....How Transport Selection Works 112
..../etc/netconfig File 113
......The NETPATH Environment Variable 116
......NETPATH Access to netconfig Data 116
......Accessing netconfig 118
......Loop Through All Visible netconfig Entries 119
......Looping Through User-Defined netconfig Entries 120
...Name-to-Address Mapping 120
......straddr.so Library 121
......Using the Name-to-Address Mapping Routines 122
......Portability From Previous Releases 126

Glossary
127

Index
131