| |
Part 1 --Introduction |
1. Introduction to Network Interfaces | 3 |
| ...Solaris Networking Features | 3 |
| ...Open Systems Interconnection Reference Model | 4 |
| ...Transport Interface Overview | 6 |
| ...NIS+ Overview | 7 |
Part 2 --Remote Procedure Call (RPC) |
2. Introduction to Remote Procedure Call (RPC) | 11 |
| ...RPC Server Is Multithread Safe | 11 |
| ...What Is RPC | 12 |
| ......RPC Levels | 13 |
| ......External Data Representation (XDR) | 13 |
| ...RPC Versions and Numbers | 14 |
| ...Network Selection | 14 |
| ...Transport Selection | 17 |
| |
| ......Name-to-Address Translation | 17 |
| ... Address Lookup Using rpcbind | 18 |
| ......Address Registration | 19 |
| ......The rpcinfo Utility | 20 |
3. rpcgen Programming Guide | 21 |
| ...What is rpcgen | 21 |
| ...SunOS 5.x Features | 22 |
| ...An rpcgen Tutorial | 23 |
| ......Converting Local Procedures to Remote Procedures | 23 |
| ......Passing Complex Data Structures | 30 |
| ......Preprocessing Directives | 35 |
| ......cpp Directive | 37 |
| ...Compile-Time Flags | 37 |
| ......Client and Server Templates | 38 |
| ......C-style Mode | 39 |
| ......MT-Safe Code | 42 |
| ......MT Auto Mode | 48 |
| ......TI-RPC or TS-RPC Library Selection | 49 |
| ...... ANSI C-compliant Code | 49 |
| ......xdr_inline Count | 50 |
| ...rpcgen Programming Techniques | 50 |
| ......Network Types/Transport Selection | 51 |
| ......Command Line Define Statements | 51 |
| ......Server Response to Broadcast Calls | 52 |
| |
| ......Port Monitor Support | 52 |
| ......Time-out Changes | 53 |
| ......Client Authentication | 54 |
| ......Dispatch Tables | 55 |
| ......Debugging Applications | 56 |
4. RPC Programming Guide | 59 |
| ...RPC Is Multithread Safe | 59 |
| ...Introduction to RPC Interface Levels | 60 |
| ...Simplified Interface | 63 |
| ......RPC Library-Based Network Services | 63 |
| ......rpc_call() Routine | 65 |
| ......rpc_reg() Routine | 66 |
| ......Passing Arbitrary Data Types | 67 |
| ...Lower Levels of RPC | 71 |
| ......Top Level Interface | 71 |
| ......Intermediate Level Interface | 75 |
| ......Expert Level Interface | 78 |
| ......Bottom Level Interface | 83 |
| ......Server Caching | 84 |
| ......Low-Level Data Structures | 85 |
| ...Testing Programs Using Low-level Raw RPC | 87 |
| ...Advanced RPC Programming Techniques | 90 |
| ......poll() on the Server Side | 90 |
| ......Broadcast RPC | 92 |
| |
| ......Batching | 94 |
| ......Authentication | 98 |
| ......Using Port Monitors | 106 |
| ......Multiple Server Versions | 109 |
| ......Multiple Client Versions | 111 |
| ...Multithreaded RPC Programming | 112 |
| ......MT Client Issues | 113 |
| ......MT Server Issues | 118 |
| ......MT Auto Mode | 121 |
| ......MT User Mode | 125 |
| ...Connection-Oriented Transports | 133 |
| ...Memory Allocation With XDR | 136 |
| ...Porting From TS-RPC to TI-RPC | 138 |
| ......Porting an Application | 138 |
| ......Benefits of Porting | 138 |
| ......Porting Issues | 139 |
| ......Differences Between TI-RPC and TS-RPC | 140 |
| ......Function Compatibility Lists | 141 |
| ......Comparison Examples | 144 |
Part 3 --Transport Level |
5. Transport Selection and Name-to-Address Mapping | 151 |
| ...Transport Selection Is Multithread Safe | 151 |
| ...Transport Selection | 152 |
| ......How Transport Selection Works | 152 |
| |
| ....../etc/netconfig File | 153 |
| ......The NETPATH Environment Variable | 156 |
| ......NETPATH Access to netconfig Data | 156 |
| ......Accessing netconfig | 158 |
| ......Loop Through All Visible netconfig Entries | 159 |
| ......Looping Through User-Defined netconfig Entries | 160 |
| ...Name-to-Address Mapping | 160 |
| ......straddr.so Library | 161 |
| ......Using the Name-to-Address Mapping Routines | 162 |
| ......Portability From Previous Releases | 166 |
6. Transport -level Interface (TLI) Programming Guide | 167 |
| ...TLI Is Multithread Safe | 167 |
| ...Transport Interface Overview | 168 |
| ...Connectionless Mode Overview | 169 |
| ......Connectionless Mode Routines | 169 |
| ...Connection Mode Overview | 170 |
| ......Connection Mode Routines | 171 |
| ...Connection Mode Service | 174 |
| ......Endpoint Initiation | 175 |
| ......Connection Establishment | 181 |
| ......Data Transfer | 187 |
| ......Connection Release | 190 |
| ...Connectionless Mode Service | 192 |
| ......Endpoint Initiation | 193 |
| |
| ......Data Transfer | 195 |
| ......Datagram Errors | 197 |
| ...A Read/Write Interface | 198 |
| ...Advanced Topics | 201 |
| ......Asynchronous Execution Mode | 201 |
| ......Advanced Programming Example | 201 |
| ...State Transitions | 208 |
| ......TLI States | 208 |
| ......Outgoing Events | 209 |
| ......Incoming Events | 210 |
| ......Transport User Actions | 211 |
| ......State Tables | 211 |
| ...Guidelines to Protocol Independence | 213 |
| ...TLI Versus Socket Interfaces | 215 |
| ...Socket-to-TLI Equivalents | 216 |
7. Socket Interface | 219 |
| ...Sockets are Multithread Safe | 219 |
| ...SunOS Binary Compatibility | 219 |
| ...What Are Sockets | 220 |
| ......Socket Libraries | 220 |
| ......Socket Types | 220 |
| ...Socket Tutorial | 221 |
| ......Socket Creation | 221 |
| ......Binding Local Names | 222 |
| |
| ......Connection Establishment | 223 |
| ......Connection Errors | 224 |
| ......Data Transfer | 225 |
| ......Closing Sockets | 226 |
| ......Connecting Stream Sockets | 226 |
| ......Datagram Sockets | 230 |
| ......Input/Output Multiplexing | 233 |
| ...Standard Routines | 236 |
| ......Host Names | 236 |
| ......Network Names | 237 |
| ......Protocol Names | 237 |
| ......Service Names | 237 |
| ......Other Routines | 238 |
| ...The Client/Server Model | 239 |
| ......Servers | 240 |
| ......Clients | 242 |
| ......Connectionless Servers | 243 |
| ...Advanced Topics | 246 |
| ......Out-of-Band Data | 246 |
| ......Nonblocking Sockets | 248 |
| ......Asynchronous Sockets | 249 |
| ......Interrupt Driven Socket I/O | 250 |
| ......Signals and Process Group ID | 250 |
| ......Selecting Specific Protocols | 252 |
| |
| ......Address Binding | 252 |
| ......Broadcasting and Determining Network Configuration | 254 |
| ......Socket Options | 257 |
| ......inetd Daemon | 258 |
| ...Moving Socket Applications to SunOS 5.x | 259 |
Part 4 --Naming Services |
8. NIS+ Programming Guide | 265 |
| ...NIS+ Overview | 265 |
| ......Domains | 265 |
| ......Servers | 266 |
| ......Tables | 266 |
| ......NIS+ Security | 267 |
| ......Name Service Switch | 268 |
| ......NIS+ Administration Commands | 268 |
| ...NIS+ API | 269 |
| ...NIS+ Sample Program | 273 |
Part 5 --Appendixes |
A. XDR Protocol Specification | 291 |
| ...XDR Protocol Introduction | 291 |
| ...XDR Data Type Declarations | 293 |
| ...The XDR Language Specification | 307 |
| ...RPC Language Reference | 312 |
B. XDR Technical Note | 321 |
| ...What is XDR | 321 |
| |
| ... A Canonical Standard | 325 |
| ...The XDR Library | 326 |
| ...XDR Library Primitives | 328 |
| ...XDR Stream Implementation | 347 |
| ...Advanced Topics | 349 |
C. RPC Protocol and Language Specification | 353 |
| ...Protocol Overview | 353 |
| ...Programs and Procedures | 356 |
| ...Authentication Protocols | 364 |
| ...The RPC Language Specification | 376 |
| ...Bibliography | 395 |
D. Writing a Port Monitor With the Service Access Facility (SAF) | 397 |
| ...What is the SAF | 397 |
| ...What is the SAC | 398 |
| ...Terminating a Port Monitor | 401 |
| ...SAF Files | 402 |
| ...The SAC/Port Monitor Interface | 402 |
| ...The Port Monitor Administrative Interface | 405 |
| ...Configuration Files and Scripts | 412 |
| ...Sample Port Monitor Code | 417 |
| ...Logic Diagram and Directory Structure | 423 |
E. The portmap Utility | 427 |
| ...System Registration Overview | 427 |
| ...portmap Protocol | 428 |