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