
Asun® • mlcrosystems Network ProgralTIlTIing Part Number: 800-1779-10 Revision A, of9 May 1988 Sun™, Sun-2™, Sun-3™, and Sun-4TM are trademarks of Sun Microsystems, Incorporated. Sun Workstation® is a registered trademark of Sun Microsys­ terns, Inc. Multibus is a trademark of Intel Corporation. UNIX is a trademark of AT&T Bell Laboratories. VMEbus is a trademark of Motorola, Incorporated. VAX is a trademark of Digital Equipment Corporation. mM-PC and IBM 370 are trademarks of International Business Machines Cor­ poration. Cray is a trademark of Cray Research. All other products or services mentioned in this document are identified by the trademarks or service marks of their respective companies or organizations Sun equipment generates, uses, and can radiate radio frequency energy and if not installed and used in accordance with the instructions manual, may cause interference to radio communications. It has been tested and found to comply with the limits for a Class A computing device pursuant to Subpart J of Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference when operated in a commercial environment. Operation of Sun equipment in a residential area is likely to cause interference in which case the user at his own expense will be required to take whatever measures may be required to correct the interference. Copyright © 1987, 1988 by Sun Microsystems, Inc. This publication is protected by Federal Copyright Law, with all rights reserved. No part of this publication may be reproduced, stored in a retrieval system, translated, transcribed, or transmitted, in any fonn, or by any means manual, electric, electronic, electro-magnetic, mechanical, chemical, optical, or other­ wise, without prior explicit written pennission from Sun Microsystems. Contents Chapter 1 Network Services ............................................................................................. 3 The Major Network Services ................................................................................. 4 Note: NO Elimination ................................................................................................ 5 1.1. Network Programming Manual Overview ........................................................ 5 1.2. Sun's Network File System ....................................................................................... 6 Computing Environments ........................................................................................ 7 Example NFS usage .................................................................................................... 8 Example 1: Mounting a Remote Filesystem ............................................ 8 Example 2: Exporting a Filesystem .............................................................. 9 Example 3: Administering a Server Machine ......................................... 10 NFS Architecture .......................................................................................................... 10 Transparent Infonnation Access ..................................................................... 10 Different Machines and Operating Systems ............................................ 10 Easily Extensible ..................................................................................................... 11 Ease of Network Administration .................................................................... 11 Reliability .................................................................................................................... 11 High Perfonnance 11 The Sun NFS Implementation 12 The NFS Interface ................................................................. ,: ........ ~ ................. :." ........ :, ....... O:::. The NFS and the Mount Protocol .................... :....... ,;;;;;; ... :;;:«;,<~, ............ ; .... ;;;;;;; •• , ••• ::::: .. A Stateless Protocol .............................................. ;;; ..;;; ......... ,.. ·.......... ;·; ... :;;·;.;: ......... ·..• :': ... i;':::::::· Note: Non-NFS Network Operations ......................... ""';" •... ;;~.~;" ... ~,.~~ ... ~,' ...;.:;; .... ;;:.::':;:: 1.3. The Portmapper .................................... '................................................. ;-;;;:~" ...... ~:.;;:, ..... ;.. ;; ...... 19 Port Registration ......................................................................................... ,;.;; .. ;;.;.; ............. 20 - iii- Contents - Continued 1.4. The Yellow Pages Database Service .................................................................... 22 What Are The Yellow Pages? ................................................................................ 22 Yellow Pages Maps ..................................................................................................... 22 Yellow Pages Domains .............................................................................................. 23 Servers and Oients ...................................................................................................... 23 Masters and Slaves ....................................................................................................... 23 Naming .......................................................................................................................... 24 Data Storage ............................................................................................................... 24 Servers ........................................................................................................................... 24 Clients ............................................................................................................................ 25 Default yP Files ............................................................................................................ 25 Hosts ............................................................................................................................... 25 Passwd ........................................................................................................................... 26 OtlIers ............................................................................................................................. 26 Changing your passwd ......................................................................................... 26 1.5. The Network Lock Manager ..................................................................................... 26 The Locking Protocol ................................................................................................. 29 1.6. The Network Status Monitor .................................................................................... 30 PART ONE: Network Programming .............................................................................. 31 Chapter 2 rpcgen Programming Guide ............................................................... 35 2.1. The rpcqen Protocol Compiler .......................................................................... 35 Converting Local Procedures into Remote Procedures .......................... 36 Generating XDR Routines ....................................................................................... 41 The C-Preprocessor ..................................................................................................... 45 rpcqen Programming Notes ............................................................................. 46 Timeout Changes ..................................................................................................... 46 Handling Broadcast on the Server Side ...................................................... 47 Other Infonnation Passed to Server Procedures .................................... 47 RPC Language ................................................................................................................ 48 -iv- Contents - Continued 'Definitions ................................................................................................................... 48 Structures ..................................................................................................................... 49 Unions ............................................................................................................................ 49 Enumerations ............................................................................................................. 50 TYJ)edef ......................................................................................................................... 50 Constants ...................................................................................................................... 50 Programs ....................................................................................................................... 51 'Declarations ................................................................................................................ 51 S'pccial Cases ............................................................................................................. 53 Chapter 3 Remote Procedure Call Programming Guide ............................. 57 Layers of RPC ................................................................................................................ 57 The RPC Paradigm ...................................................................................................... 59 3.1. Higher Layers ofRPC ..................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages316 Page
-
File Size-