Chapter 8. Remote Procedure Call .........................131
RPC Model ..................................132
RPC Message Protocol ..............................133
RPC Authentication ...............................137
RPC Port Mapper Program ............................143
Programming in RPC ..............................146
RPC Features .................................153
RPC Language .................................154
rpcgen Protocol Compiler .............................159
List of RPC Programming References ........................161
Using UNIX Authentication Example .........................165
DES Authentication Example ............................167
Using the Highest Layer of RPC Example .......................169
Using the Intermediate Layer of RPC Example .....................169
Using the Lowest Layer of RPC Example .......................171
Showing How RPC Passes Arbitrary Data Types Example .................174
Using Multiple Program Versions Example .......................176
Broadcasting a Remote Procedure Call Example ....................176
Using the select Subroutine Example.........................177
rcp Process on TCP Example ...........................177
RPC Callback Procedures Example .........................180
RPC Language ping Program Example ........................183
Converting Local Procedures into Remote Procedures Example ...............183
Generating XDR Routines Example .........................187
Chapter 9. Sockets ...............................191
Sockets Overview ................................191
Sockets Interface ................................193
Socket Subroutines ...............................194
Socket Header Files ...............................195
Socket Communication Domains ..........................196
Socket Addresses ................................198
Socket Types and Protocols ............................201
Socket Creation ................................203
Binding Names to Sockets.............................204
Socket Connections ...............................206
Socket Options .................................208
Socket Data Transfer ..............................209
Socket Shutdown ................................211
IP Multicasts ..................................211
Network Address Translation ............................213
Domain Name Resolution .............................217
Socket Examples ................................219
Socketpair Communication Example .........................219
Reading Internet Datagrams Example Program .....................220
Sending Internet Datagrams Example Program .....................221
Reading UNIX Datagrams Example Program ......................221
Sending UNIX Datagrams Example Program ......................222
Initiating Internet Stream Connections Example Program .................223
Accepting Internet Stream Connections Example Program .................223
Checking for Pending Connections Example Program ..................224
Initiating UNIX Stream Connections Example Program ..................226
Accepting UNIX Stream Connections Example Program ..................226
Sending Data on an ATM Socket PVC Client Example Program ...............227
Receiving Data on an ATM Socket PVC Server Example Program ..............229
Sending Data on an ATM Socket Rate-Enforced SVC Client Example Program .........230
Contents v