xref: /titanic_51/usr/src/lib/librpcsvc/common/bootparam_prot.h (revision c10c16dec587a0662068f6e2991c29ed3a9db943)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
27 
28 #include <rpc/types.h>
29 
30 #include <rpc/types.h>
31 #include <sys/time.h>
32 #include <sys/errno.h>
33 #include <nfs/nfs.h>
34 #define	MAX_MACHINE_NAME 255
35 #define	MAX_PATH_LEN 1024
36 #define	MAX_FILEID 32
37 #define	IP_ADDR_TYPE 1
38 
39 typedef char *bp_machine_name_t;
40 bool_t xdr_bp_machine_name_t();
41 
42 typedef char *bp_path_t;
43 bool_t xdr_bp_path_t();
44 
45 typedef char *bp_fileid_t;
46 bool_t xdr_bp_fileid_t();
47 
48 struct ip_addr_t {
49 	char net;
50 	char host;
51 	char lh;
52 	char impno;
53 };
54 typedef struct ip_addr_t ip_addr_t;
55 bool_t xdr_ip_addr_t();
56 
57 struct bp_address {
58 	int address_type;
59 	union {
60 		ip_addr_t ip_addr;
61 	} bp_address_u;
62 };
63 typedef struct bp_address bp_address;
64 bool_t xdr_bp_address();
65 
66 struct bp_whoami_arg {
67 	bp_address client_address;
68 };
69 typedef struct bp_whoami_arg bp_whoami_arg;
70 bool_t xdr_bp_whoami_arg();
71 
72 struct bp_whoami_res {
73 	bp_machine_name_t client_name;
74 	bp_machine_name_t domain_name;
75 	bp_address router_address;
76 };
77 typedef struct bp_whoami_res bp_whoami_res;
78 bool_t xdr_bp_whoami_res();
79 
80 struct bp_getfile_arg {
81 	bp_machine_name_t client_name;
82 	bp_fileid_t file_id;
83 };
84 typedef struct bp_getfile_arg bp_getfile_arg;
85 bool_t xdr_bp_getfile_arg();
86 
87 struct bp_getfile_res {
88 	bp_machine_name_t server_name;
89 	bp_address server_address;
90 	bp_path_t server_path;
91 };
92 typedef struct bp_getfile_res bp_getfile_res;
93 bool_t xdr_bp_getfile_res();
94 
95 #define	BOOTPARAMPROG ((rpcprog_t)100026)
96 #define	BOOTPARAMVERS ((rpcvers_t)1)
97 #define	BOOTPARAMPROC_WHOAMI ((rpcproc_t)1)
98 extern bp_whoami_res *bootparamproc_whoami_1();
99 #define	BOOTPARAMPROC_GETFILE ((rpcproc_t)2)
100 extern bp_getfile_res *bootparamproc_getfile_1();
101