1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  *
22  * Copyright 1984 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #include <rpc/types.h>
27 
28 #include <rpc/types.h>
29 #include <sys/time.h>
30 #include <sys/errno.h>
31 #include <nfs/nfs.h>
32 #define	MAX_MACHINE_NAME 255
33 #define	MAX_PATH_LEN 1024
34 #define	MAX_FILEID 32
35 #define	IP_ADDR_TYPE 1
36 
37 typedef char *bp_machine_name_t;
38 bool_t xdr_bp_machine_name_t();
39 
40 typedef char *bp_path_t;
41 bool_t xdr_bp_path_t();
42 
43 typedef char *bp_fileid_t;
44 bool_t xdr_bp_fileid_t();
45 
46 struct ip_addr_t {
47 	char net;
48 	char host;
49 	char lh;
50 	char impno;
51 };
52 typedef struct ip_addr_t ip_addr_t;
53 bool_t xdr_ip_addr_t();
54 
55 struct bp_address {
56 	int address_type;
57 	union {
58 		ip_addr_t ip_addr;
59 	} bp_address_u;
60 };
61 typedef struct bp_address bp_address;
62 bool_t xdr_bp_address();
63 
64 struct bp_whoami_arg {
65 	bp_address client_address;
66 };
67 typedef struct bp_whoami_arg bp_whoami_arg;
68 bool_t xdr_bp_whoami_arg();
69 
70 struct bp_whoami_res {
71 	bp_machine_name_t client_name;
72 	bp_machine_name_t domain_name;
73 	bp_address router_address;
74 };
75 typedef struct bp_whoami_res bp_whoami_res;
76 bool_t xdr_bp_whoami_res();
77 
78 struct bp_getfile_arg {
79 	bp_machine_name_t client_name;
80 	bp_fileid_t file_id;
81 };
82 typedef struct bp_getfile_arg bp_getfile_arg;
83 bool_t xdr_bp_getfile_arg();
84 
85 struct bp_getfile_res {
86 	bp_machine_name_t server_name;
87 	bp_address server_address;
88 	bp_path_t server_path;
89 };
90 typedef struct bp_getfile_res bp_getfile_res;
91 bool_t xdr_bp_getfile_res();
92 
93 #define	BOOTPARAMPROG ((rpcprog_t)100026)
94 #define	BOOTPARAMVERS ((rpcvers_t)1)
95 #define	BOOTPARAMPROC_WHOAMI ((rpcproc_t)1)
96 extern bp_whoami_res *bootparamproc_whoami_1();
97 #define	BOOTPARAMPROC_GETFILE ((rpcproc_t)2)
98 extern bp_getfile_res *bootparamproc_getfile_1();
99