bootparam_prot.x revision 1832
11832Swollman/* 21832Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 31832Swollman * unrestricted use provided that this legend is included on all tape 41832Swollman * media and as a part of the software program in whole or part. Users 51832Swollman * may copy or modify Sun RPC without charge, but are not authorized 61832Swollman * to license or distribute it to anyone else except as part of a product or 71832Swollman * program developed by the user. 81832Swollman * 91832Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 101832Swollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 111832Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 121832Swollman * 131832Swollman * Sun RPC is provided with no support and without any obligation on the 141832Swollman * part of Sun Microsystems, Inc. to assist in its use, correction, 151832Swollman * modification or enhancement. 161832Swollman * 171832Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 181832Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 191832Swollman * OR ANY PART THEREOF. 201832Swollman * 211832Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 221832Swollman * or profits or other special, indirect and consequential damages, even if 231832Swollman * Sun has been advised of the possibility of such damages. 241832Swollman * 251832Swollman * Sun Microsystems, Inc. 261832Swollman * 2550 Garcia Avenue 271832Swollman * Mountain View, California 94043 281832Swollman */ 291832Swollman 301832Swollman/* 311832Swollman * RPC for bootparms service. 321832Swollman * There are two procedures: 331832Swollman * WHOAMI takes a net address and returns a client name and also a 341832Swollman * likely net address for routing 351832Swollman * GETFILE takes a client name and file identifier and returns the 361832Swollman * server name, server net address and pathname for the file. 371832Swollman * file identifiers typically include root, swap, pub and dump 381832Swollman */ 391832Swollman 401832Swollman#ifdef RPC_HDR 411832Swollman%#include <rpc/types.h> 421832Swollman%#include <sys/time.h> 431832Swollman%#include <sys/errno.h> 441832Swollman%#include <nfs/nfs.h> 451832Swollman#else 461832Swollman%#ifndef lint 471832Swollman%/*static char sccsid[] = "from: @(#)bootparam_prot.x 1.2 87/06/24 Copyr 1987 Sun Micro";*/ 481832Swollman%/*static char sccsid[] = "from: @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ 491832Swollman%static char rcsid[] = "$Id: bootparam_prot.x,v 1.1 1993/09/14 17:42:42 jtc Exp $"; 501832Swollman%#endif /* not lint */ 511832Swollman#endif 521832Swollman 531832Swollmanconst MAX_MACHINE_NAME = 255; 541832Swollmanconst MAX_PATH_LEN = 1024; 551832Swollmanconst MAX_FILEID = 32; 561832Swollmanconst IP_ADDR_TYPE = 1; 571832Swollman 581832Swollmantypedef string bp_machine_name_t<MAX_MACHINE_NAME>; 591832Swollmantypedef string bp_path_t<MAX_PATH_LEN>; 601832Swollmantypedef string bp_fileid_t<MAX_FILEID>; 611832Swollman 621832Swollmanstruct ip_addr_t { 631832Swollman char net; 641832Swollman char host; 651832Swollman char lh; 661832Swollman char impno; 671832Swollman}; 681832Swollman 691832Swollmanunion bp_address switch (int address_type) { 701832Swollman case IP_ADDR_TYPE: 711832Swollman ip_addr_t ip_addr; 721832Swollman}; 731832Swollman 741832Swollmanstruct bp_whoami_arg { 751832Swollman bp_address client_address; 761832Swollman}; 771832Swollman 781832Swollmanstruct bp_whoami_res { 791832Swollman bp_machine_name_t client_name; 801832Swollman bp_machine_name_t domain_name; 811832Swollman bp_address router_address; 821832Swollman}; 831832Swollman 841832Swollmanstruct bp_getfile_arg { 851832Swollman bp_machine_name_t client_name; 861832Swollman bp_fileid_t file_id; 871832Swollman}; 881832Swollman 891832Swollmanstruct bp_getfile_res { 901832Swollman bp_machine_name_t server_name; 911832Swollman bp_address server_address; 921832Swollman bp_path_t server_path; 931832Swollman}; 941832Swollman 951832Swollmanprogram BOOTPARAMPROG { 961832Swollman version BOOTPARAMVERS { 971832Swollman bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1; 981832Swollman bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2; 991832Swollman } = 1; 1001832Swollman} = 100026; 101