1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _AUTOFS_PROT_H_RPCGEN 7 #define _AUTOFS_PROT_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 /* 16 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 17 * Use is subject to license terms. 18 */ 19 20 #pragma ident "%Z%%M% %I% %E% SMI" 21 22 #include <sys/vfs.h> 23 #include <sys/dirent.h> 24 #include <sys/types.h> 25 #include <sys/types32.h> 26 27 #define xdr_dev_t xdr_u_int 28 #define xdr_bool_t xdr_bool 29 30 #define AUTOFS_MAXPATHLEN 1024 31 #define AUTOFS_MAXCOMPONENTLEN 255 32 #define AUTOFS_MAXOPTSLEN 1024 33 #define AUTOFS_DAEMONCOOKIE 100000 34 35 enum autofs_stat { 36 AUTOFS_ACTION = 0, 37 AUTOFS_DONE = 1 38 }; 39 typedef enum autofs_stat autofs_stat; 40 41 enum autofs_action { 42 AUTOFS_MOUNT_RQ = 0, 43 AUTOFS_LINK_RQ = 1, 44 AUTOFS_NONE = 2 45 }; 46 typedef enum autofs_action autofs_action; 47 48 enum autofs_res { 49 AUTOFS_OK = 0, 50 AUTOFS_NOENT = 2, 51 AUTOFS_ECOMM = 5, 52 AUTOFS_NOMEM = 12, 53 AUTOFS_NOTDIR = 20, 54 AUTOFS_SHUTDOWN = 1000 55 }; 56 typedef enum autofs_res autofs_res; 57 58 struct autofs_lookupargs { 59 char *map; 60 char *path; 61 char *name; 62 char *subdir; 63 char *opts; 64 bool_t isdirect; 65 uid_t uid; 66 }; 67 typedef struct autofs_lookupargs autofs_lookupargs; 68 69 struct linka { 70 char *dir; 71 char *link; 72 }; 73 typedef struct linka linka; 74 75 struct autofs_args { 76 struct netbuf addr; 77 char *path; 78 char *opts; 79 char *map; 80 char *subdir; 81 char *key; 82 int mount_to; 83 int rpc_to; 84 int direct; 85 }; 86 typedef struct autofs_args autofs_args; 87 #ifdef _SYSCALL32 88 /* 89 * This is an LP64 representation of the ILP32 autofs_args data structure 90 * for use by autofs_mount which may receive the data structure "raw" 91 * from a 32-bit program without being processed by XDR. rpcgen doesn't 92 * need to see this structure since RPC/XDR only deals with the "native" 93 * version of autofs_args. If this isn't hidden from rpcgen then it will 94 * insist on generating unnecessary code to deal with it. 95 */ 96 struct autofs_args32 { 97 struct netbuf32 addr; /* daemon address */ 98 caddr32_t path; /* autofs mountpoint */ 99 caddr32_t opts; /* default mount options */ 100 caddr32_t map; /* name of map */ 101 caddr32_t subdir; /* subdir within map */ 102 caddr32_t key; /* used in direct mounts */ 103 int32_t mount_to; /* time in sec the fs is to remain */ 104 /* mounted after last reference */ 105 int32_t rpc_to; /* timeout for rpc calls */ 106 int32_t direct; /* 1 = direct mount */ 107 }; 108 #endif /* _SYSCALL32 */ 109 110 struct action_list_entry { 111 autofs_action action; 112 union { 113 struct mounta mounta; 114 struct linka linka; 115 } action_list_entry_u; 116 }; 117 typedef struct action_list_entry action_list_entry; 118 119 struct action_list { 120 action_list_entry action; 121 struct action_list *next; 122 }; 123 typedef struct action_list action_list; 124 125 struct mount_result_type { 126 autofs_stat status; 127 union { 128 action_list *list; 129 int error; 130 } mount_result_type_u; 131 }; 132 typedef struct mount_result_type mount_result_type; 133 134 struct autofs_mountres { 135 mount_result_type mr_type; 136 int mr_verbose; 137 }; 138 typedef struct autofs_mountres autofs_mountres; 139 140 struct lookup_result_type { 141 autofs_action action; 142 union { 143 struct linka lt_linka; 144 } lookup_result_type_u; 145 }; 146 typedef struct lookup_result_type lookup_result_type; 147 148 struct autofs_lookupres { 149 enum autofs_res lu_res; 150 lookup_result_type lu_type; 151 int lu_verbose; 152 }; 153 typedef struct autofs_lookupres autofs_lookupres; 154 155 struct umntrequest { 156 bool_t isdirect; 157 char *mntresource; 158 char *mntpnt; 159 char *fstype; 160 char *mntopts; 161 struct umntrequest *next; 162 }; 163 typedef struct umntrequest umntrequest; 164 165 struct umntres { 166 int status; 167 }; 168 typedef struct umntres umntres; 169 170 struct autofs_rddirargs { 171 char *rda_map; 172 u_int rda_offset; 173 u_int rda_count; 174 uid_t uid; 175 }; 176 typedef struct autofs_rddirargs autofs_rddirargs; 177 178 struct autofsrddir { 179 u_int rddir_offset; 180 u_int rddir_size; 181 bool_t rddir_eof; 182 struct dirent64 *rddir_entries; 183 }; 184 typedef struct autofsrddir autofsrddir; 185 186 struct autofs_rddirres { 187 enum autofs_res rd_status; 188 u_int rd_bufsize; 189 struct autofsrddir rd_rddir; 190 }; 191 typedef struct autofs_rddirres autofs_rddirres; 192 193 /* the xdr functions */ 194 195 #if defined(__STDC__) || defined(__cplusplus) 196 extern bool_t xdr_autofs_stat(XDR *, autofs_stat*); 197 extern bool_t xdr_autofs_action(XDR *, autofs_action*); 198 extern bool_t xdr_autofs_res(XDR *, autofs_res*); 199 extern bool_t xdr_autofs_lookupargs(XDR *, autofs_lookupargs*); 200 extern bool_t xdr_linka(XDR *, linka*); 201 extern bool_t xdr_autofs_args(XDR *, autofs_args*); 202 extern bool_t xdr_action_list_entry(XDR *, action_list_entry*); 203 extern bool_t xdr_action_list(XDR *, action_list*); 204 extern bool_t xdr_mount_result_type(XDR *, mount_result_type*); 205 extern bool_t xdr_autofs_mountres(XDR *, autofs_mountres*); 206 extern bool_t xdr_lookup_result_type(XDR *, lookup_result_type*); 207 extern bool_t xdr_autofs_lookupres(XDR *, autofs_lookupres*); 208 extern bool_t xdr_umntrequest(XDR *, umntrequest*); 209 extern bool_t xdr_umntres(XDR *, umntres*); 210 extern bool_t xdr_autofs_rddirargs(XDR *, autofs_rddirargs*); 211 extern bool_t xdr_autofsrddir(XDR *, autofsrddir*); 212 extern bool_t xdr_autofs_rddirres(XDR *, autofs_rddirres*); 213 214 #else /* K&R C */ 215 extern bool_t xdr_autofs_stat(); 216 extern bool_t xdr_autofs_action(); 217 extern bool_t xdr_autofs_res(); 218 extern bool_t xdr_autofs_lookupargs(); 219 extern bool_t xdr_linka(); 220 extern bool_t xdr_autofs_args(); 221 extern bool_t xdr_action_list_entry(); 222 extern bool_t xdr_action_list(); 223 extern bool_t xdr_mount_result_type(); 224 extern bool_t xdr_autofs_mountres(); 225 extern bool_t xdr_lookup_result_type(); 226 extern bool_t xdr_autofs_lookupres(); 227 extern bool_t xdr_umntrequest(); 228 extern bool_t xdr_umntres(); 229 extern bool_t xdr_autofs_rddirargs(); 230 extern bool_t xdr_autofsrddir(); 231 extern bool_t xdr_autofs_rddirres(); 232 233 #endif /* K&R C */ 234 235 #ifdef __cplusplus 236 } 237 #endif 238 239 #endif /* !_AUTOFS_PROT_H_RPCGEN */ 240