home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / bsd / rpcsvc / bootparam_prot.x next >
Text File  |  1990-01-29  |  2KB  |  73 lines

  1. /*    @(#)bootparam_prot.x    1.2 88/05/08 4.0NFSSRC SMI    */
  2.  
  3. /* 
  4.  * Copyright (c) 1988 by Sun Microsystems, Inc.
  5.  * @(#) from SUN 1.3
  6.  */
  7.  
  8. /*
  9.  * RPC for bootparms service.
  10.  * There are two procedures:
  11.  *   WHOAMI takes a net address and returns a client name and also a
  12.  *    likely net address for routing
  13.  *   GETFILE takes a client name and file identifier and returns the
  14.  *    server name, server net address and pathname for the file.
  15.  *   file identifiers typically include root, swap, pub and dump
  16.  */
  17.  
  18. #ifdef RPC_HDR
  19. %#include <rpc/types.h>
  20. %#include <sys/time.h>
  21. %#include <sys/errno.h>
  22. %#include <nfs/nfs.h>
  23. #endif
  24.  
  25. const MAX_MACHINE_NAME  = 255;
  26. const MAX_PATH_LEN    = 1024;
  27. const MAX_FILEID    = 32;
  28. const IP_ADDR_TYPE    = 1;
  29.  
  30. typedef    string    bp_machine_name_t<MAX_MACHINE_NAME>;
  31. typedef    string    bp_path_t<MAX_PATH_LEN>;
  32. typedef    string    bp_fileid_t<MAX_FILEID>;
  33.  
  34. struct    ip_addr_t {
  35.     char    net;
  36.     char    host;
  37.     char    lh;
  38.     char    impno;
  39. };
  40.  
  41. union bp_address switch (int address_type) {
  42.     case IP_ADDR_TYPE:
  43.         ip_addr_t    ip_addr;
  44. };
  45.  
  46. struct bp_whoami_arg {
  47.     bp_address        cli@Saddress;
  48. };
  49.  
  50. struct bp_whoami_res {
  51.     bp_machine_name_t    client_name;
  52.     bp_machine_name_t    domain_name;
  53.     bp_address        router_address;
  54. };
  55.  
  56. struct bp_getfile_arg {
  57.     bp_machine_name_t    client_name;
  58.     bp_fileid_t        file_id;
  59. };
  60.     
  61. struct bp_getfile_res {
  62.     bp_machine_name_t    server_name;
  63.     bp_address        server_address;
  64.     bp_path_t        server_path;
  65. };
  66.  
  67. program BOOTPARAMPROG {
  68.     version BOOTPARAMVERS {
  69.         bp_whoami_res    BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1;
  70.         bp_getfile_res    BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2;
  71.     } = 1;
  72. } = 100026;
  73.