2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 /* @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC */
24 /* @(#)bootparam_prot.x 1.2 87/06/24 Copyr 1987 Sun Micro */
27 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
28 * unrestricted use provided that this legend is included on all tape
29 * media and as a part of the software program in whole or part. Users
30 * may copy or modify Sun RPC without charge, but are not authorized
31 * to license or distribute it to anyone else except as part of a product or
32 * program developed by the user.
34 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
35 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
36 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
38 * Sun RPC is provided with no support and without any obligation on the
39 * part of Sun Microsystems, Inc. to assist in its use, correction,
40 * modification or enhancement.
42 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
43 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
44 * OR ANY PART THEREOF.
46 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
47 * or profits or other special, indirect and consequential damages, even if
48 * Sun has been advised of the possibility of such damages.
50 * Sun Microsystems, Inc.
52 * Mountain View, California 94043
56 * RPC for bootparms service.
57 * There are two procedures:
58 * WHOAMI takes a net address and returns a client name and also a
59 * likely net address for routing
60 * GETFILE takes a client name and file identifier and returns the
61 * server name, server net address and pathname for the file.
62 * file identifiers typically include root, swap, pub and dump
66 %#include <rpc/types.h>
67 %#include <sys/time.h>
68 %#include <sys/errno.h>
71 const MAX_MACHINE_NAME = 255;
72 const MAX_PATH_LEN = 1024;
73 const MAX_FILEID = 32;
74 const IP_ADDR_TYPE = 1;
76 typedef string bp_machine_name_t<MAX_MACHINE_NAME>;
77 typedef string bp_path_t<MAX_PATH_LEN>;
78 typedef string bp_fileid_t<MAX_FILEID>;
87 union bp_address switch (int address_type) {
92 struct bp_whoami_arg {
93 bp_address client_address;
96 struct bp_whoami_res {
97 bp_machine_name_t client_name;
98 bp_machine_name_t domain_name;
99 bp_address router_address;
102 struct bp_getfile_arg {
103 bp_machine_name_t client_name;
107 struct bp_getfile_res {
108 bp_machine_name_t server_name;
109 bp_address server_address;
110 bp_path_t server_path;
113 program BOOTPARAMPROG {
114 version BOOTPARAMVERS {
115 bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1;
116 bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2;