xref: /titanic_51/usr/src/uts/common/rpc/bootparam.h (revision e07d9cb85217949d497b02d7211de8a197d2f2eb)
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 /*
23  * Copyright (C) 1984, Sun Microsystems, Inc.
24  */
25 
26 #ifndef	_RPC_BOOTPARAM_H
27 #define	_RPC_BOOTPARAM_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifndef _KERNEL
32 #include <rpc/types.h>
33 #include <sys/time.h>
34 #include <sys/errno.h>
35 #include <nfs/nfs.h>
36 #endif
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 #define	MAX_MACHINE_NAME 255
43 #define	MAX_PATH_LEN	1024
44 #define	MAX_FILEID	32
45 #define	IP_ADDR_TYPE	1
46 
47 typedef char *bp_machine_name_t;
48 typedef char *bp_path_t;
49 typedef char *bp_fileid_t;
50 
51 struct ip_addr_t {
52 	char net;
53 	char host;
54 	char lh;
55 	char impno;
56 };
57 typedef struct ip_addr_t ip_addr_t;
58 
59 struct bp_address {
60 	int address_type;
61 	union {
62 		ip_addr_t ip_addr;
63 	} bp_address;
64 };
65 typedef struct bp_address bp_address;
66 
67 
68 struct bp_whoami_arg {
69 	bp_address client_address;
70 };
71 typedef struct bp_whoami_arg bp_whoami_arg;
72 
73 
74 struct bp_whoami_res {
75 	bp_machine_name_t client_name;
76 	bp_machine_name_t domain_name;
77 	bp_address router_address;
78 };
79 typedef struct bp_whoami_res bp_whoami_res;
80 
81 
82 struct bp_getfile_arg {
83 	bp_machine_name_t client_name;
84 	bp_fileid_t file_id;
85 };
86 typedef struct bp_getfile_arg bp_getfile_arg;
87 
88 
89 struct bp_getfile_res {
90 	bp_machine_name_t server_name;
91 	bp_address server_address;
92 	bp_path_t server_path;
93 };
94 typedef struct bp_getfile_res bp_getfile_res;
95 
96 
97 #define	BOOTPARAMPROG 100026
98 #define	BOOTPARAMVERS 1
99 #define	BOOTPARAMPROC_WHOAMI 1
100 #define	BOOTPARAMPROC_GETFILE 2
101 
102 bool_t xdr_bp_machine_name_t();
103 bool_t xdr_bp_path_t();
104 bool_t xdr_bp_fileid_t();
105 bool_t xdr_ip_addr_t();
106 bool_t xdr_bp_address();
107 bool_t xdr_bp_whoami_arg();
108 bool_t xdr_bp_whoami_res();
109 bool_t xdr_bp_getfile_arg();
110 bool_t xdr_bp_getfile_res();
111 
112 #ifdef	__cplusplus
113 }
114 #endif
115 
116 #endif	/* !_RPC_BOOTPARAM_H */
117