bootparam_prot.h
001:
002:
003:
004:
005:
006: #ifndef _BOOTPARAM_PROT_H_RPCGEN
007: #define _BOOTPARAM_PROT_H_RPCGEN
008:
009: #include <rpc/rpc.h>
010:
011:
012: #ifdef __cplusplus
013: extern "C" {
014: #endif
015:
016: #include <rpc/types.h>
017: #include <sys/time.h>
018: #include <sys/errno.h>
019: #include <nfs/nfs.h>
020: #define MAX_MACHINE_NAME 255
021: #define MAX_PATH_LEN 1024
022: #define MAX_FILEID 32
023: #define IP_ADDR_TYPE 1
024:
025: typedef char *bp_machine_name_t;
026:
027: typedef char *bp_path_t;
028:
029: typedef char *bp_fileid_t;
030:
031: struct ip_addr_t {
032: char net;
033: char host;
034: char lh;
035: char impno;
036: };
037: typedef struct ip_addr_t ip_addr_t;
038:
039: struct bp_address {
040: int address_type;
041: union {
042: ip_addr_t ip_addr;
043: } bp_address_u;
044: };
045: typedef struct bp_address bp_address;
046:
047: struct bp_whoami_arg {
048: bp_address client_address;
049: };
050: typedef struct bp_whoami_arg bp_whoami_arg;
051:
052: struct bp_whoami_res {
053: bp_machine_name_t client_name;
054: bp_machine_name_t domain_name;
055: bp_address router_address;
056: };
057: typedef struct bp_whoami_res bp_whoami_res;
058:
059: struct bp_getfile_arg {
060: bp_machine_name_t client_name;
061: bp_fileid_t file_id;
062: };
063: typedef struct bp_getfile_arg bp_getfile_arg;
064:
065: struct bp_getfile_res {
066: bp_machine_name_t server_name;
067: bp_address server_address;
068: bp_path_t server_path;
069: };
070: typedef struct bp_getfile_res bp_getfile_res;
071:
072: #define BOOTPARAMPROG 100026
073: #define BOOTPARAMVERS 1
074:
075: #if defined(__STDC__) || defined(__cplusplus)
076: #define BOOTPARAMPROC_WHOAMI 1
077: extern bp_whoami_res * bootparamproc_whoami_1(bp_whoami_arg *, CLIENT *);
078: extern bp_whoami_res * bootparamproc_whoami_1_svc(bp_whoami_arg *, struct svc_req *);
079: #define BOOTPARAMPROC_GETFILE 2
080: extern bp_getfile_res * bootparamproc_getfile_1(bp_getfile_arg *, CLIENT *);
081: extern bp_getfile_res * bootparamproc_getfile_1_svc(bp_getfile_arg *, struct svc_req *);
082: extern int bootparamprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
083:
084: #else
085: #define BOOTPARAMPROC_WHOAMI 1
086: extern bp_whoami_res * bootparamproc_whoami_1();
087: extern bp_whoami_res * bootparamproc_whoami_1_svc();
088: #define BOOTPARAMPROC_GETFILE 2
089: extern bp_getfile_res * bootparamproc_getfile_1();
090: extern bp_getfile_res * bootparamproc_getfile_1_svc();
091: extern int bootparamprog_1_freeresult ();
092: #endif
093:
094:
095:
096: #if defined(__STDC__) || defined(__cplusplus)
097: extern bool_t xdr_bp_machine_name_t (XDR *, bp_machine_name_t*);
098: extern bool_t xdr_bp_path_t (XDR *, bp_path_t*);
099: extern bool_t xdr_bp_fileid_t (XDR *, bp_fileid_t*);
100: extern bool_t xdr_ip_addr_t (XDR *, ip_addr_t*);
101: extern bool_t xdr_bp_address (XDR *, bp_address*);
102: extern bool_t xdr_bp_whoami_arg (XDR *, bp_whoami_arg*);
103: extern bool_t xdr_bp_whoami_res (XDR *, bp_whoami_res*);
104: extern bool_t xdr_bp_getfile_arg (XDR *, bp_getfile_arg*);
105: extern bool_t xdr_bp_getfile_res (XDR *, bp_getfile_res*);
106:
107: #else
108: extern bool_t xdr_bp_machine_name_t ();
109: extern bool_t xdr_bp_path_t ();
110: extern bool_t xdr_bp_fileid_t ();
111: extern bool_t xdr_ip_addr_t ();
112: extern bool_t xdr_bp_address ();
113: extern bool_t xdr_bp_whoami_arg ();
114: extern bool_t xdr_bp_whoami_res ();
115: extern bool_t xdr_bp_getfile_arg ();
116: extern bool_t xdr_bp_getfile_res ();
117:
118: #endif
119:
120: #ifdef __cplusplus
121: }
122: #endif
123:
124: #endif
125:
© Andrew Scott 2006 -
2025,
All Rights Reserved