bootparam_prot.x revision 114629
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> 446747Swpaul%#include <sys/param.h> 456747Swpaul%#include <sys/syslimits.h> 461832Swollman#else 471832Swollman%#ifndef lint 481832Swollman%/*static char sccsid[] = "from: @(#)bootparam_prot.x 1.2 87/06/24 Copyr 1987 Sun Micro";*/ 491832Swollman%/*static char sccsid[] = "from: @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ 501832Swollman%#endif /* not lint */ 51114629Sobrien%#include <sys/cdefs.h> 52114629Sobrien%__FBSDID("$FreeBSD: head/include/rpcsvc/bootparam_prot.x 114629 2003-05-04 02:51:42Z obrien $"); 531832Swollman#endif 541832Swollman 551832Swollmanconst MAX_MACHINE_NAME = 255; 561832Swollmanconst MAX_PATH_LEN = 1024; 571832Swollmanconst MAX_FILEID = 32; 581832Swollmanconst IP_ADDR_TYPE = 1; 591832Swollman 601832Swollmantypedef string bp_machine_name_t<MAX_MACHINE_NAME>; 611832Swollmantypedef string bp_path_t<MAX_PATH_LEN>; 621832Swollmantypedef string bp_fileid_t<MAX_FILEID>; 631832Swollman 641832Swollmanstruct ip_addr_t { 651832Swollman char net; 661832Swollman char host; 671832Swollman char lh; 681832Swollman char impno; 691832Swollman}; 701832Swollman 711832Swollmanunion bp_address switch (int address_type) { 721832Swollman case IP_ADDR_TYPE: 731832Swollman ip_addr_t ip_addr; 741832Swollman}; 751832Swollman 761832Swollmanstruct bp_whoami_arg { 771832Swollman bp_address client_address; 781832Swollman}; 791832Swollman 801832Swollmanstruct bp_whoami_res { 811832Swollman bp_machine_name_t client_name; 821832Swollman bp_machine_name_t domain_name; 831832Swollman bp_address router_address; 841832Swollman}; 851832Swollman 861832Swollmanstruct bp_getfile_arg { 871832Swollman bp_machine_name_t client_name; 881832Swollman bp_fileid_t file_id; 891832Swollman}; 901832Swollman 911832Swollmanstruct bp_getfile_res { 921832Swollman bp_machine_name_t server_name; 931832Swollman bp_address server_address; 941832Swollman bp_path_t server_path; 951832Swollman}; 961832Swollman 971832Swollmanprogram BOOTPARAMPROG { 981832Swollman version BOOTPARAMVERS { 991832Swollman bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1; 1001832Swollman bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2; 1011832Swollman } = 1; 1021832Swollman} = 100026; 103