rpc_cb connect_cb;
void *connect_data;
- AUTH *auth;
+ struct AUTH *auth;
unsigned long xid;
/* buffer used for encoding RPC PDU */
struct rpc_context *rpc_init_context(void);
void rpc_destroy_context(struct rpc_context *rpc);
-void rpc_set_auth(struct rpc_context *rpc, AUTH *auth);
+void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
int rpc_get_fd(struct rpc_context *rpc);
int rpc_which_events(struct rpc_context *rpc);
extern struct opaque_auth _null_auth;
-typedef struct {
+struct AUTH {
struct opaque_auth ah_cred;
struct opaque_auth ah_verf;
caddr_t ah_private;
-} AUTH;
+};
enum msg_type {
CALL=0,
bool_t libnfs_zdr_replymsg(ZDR *zdrs, struct rpc_msg *msg);
#define authnone_create libnfs_authnone_create
-AUTH *libnfs_authnone_create(void);
+struct AUTH *libnfs_authnone_create(void);
#define authunix_create libnfs_authunix_create
-AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint32_t len, uint32_t *groups);
+struct AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint32_t len, uint32_t *groups);
#define authunix_create_default libnfs_authunix_create_default
-AUTH *libnfs_authunix_create_default(void);
+struct AUTH *libnfs_authunix_create_default(void);
#define auth_destroy libnfs_auth_destroy
-void libnfs_auth_destroy(AUTH *auth);
+void libnfs_auth_destroy(struct AUTH *auth);
#endif
/*
* Used if you need different credentials than the default for the current user.
*/
-EXTERN void nfs_set_auth(struct nfs_context *nfs, AUTH *auth);
+struct AUTH;
+EXTERN void nfs_set_auth(struct nfs_context *nfs, struct AUTH *auth);
/*
return rpc;
}
-void rpc_set_auth(struct rpc_context *rpc, AUTH *auth)
+void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth)
{
if (rpc->auth != NULL) {
auth_destroy(rpc->auth);
return libnfs_rpc_msg(zdrs, msg);
}
-AUTH *authnone_create(void)
+struct AUTH *authnone_create(void)
{
- AUTH *auth;
+ struct AUTH *auth;
- auth = malloc(sizeof(AUTH));
+ auth = malloc(sizeof(struct AUTH));
auth->ah_cred.oa_flavor = AUTH_NONE;
auth->ah_cred.oa_length = 0;
return auth;
}
-AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint32_t len, uint32_t *groups)
+struct AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint32_t len, uint32_t *groups)
{
- AUTH *auth;
+ struct AUTH *auth;
int size;
uint32_t *buf;
int idx;
size = 4 + 4 + ((strlen(host) + 3) & ~3) + 4 + 4 + 4 + len * 4;
- auth = malloc(sizeof(AUTH));
+ auth = malloc(sizeof(struct AUTH));
auth->ah_cred.oa_flavor = AUTH_UNIX;
auth->ah_cred.oa_length = size;
auth->ah_cred.oa_base = malloc(size);
return auth;
}
-AUTH *libnfs_authunix_create_default(void)
+struct AUTH *libnfs_authunix_create_default(void)
{
return libnfs_authunix_create("libnfs", getuid(), -1, 0, NULL);
}
-void libnfs_auth_destroy(AUTH *auth)
+void libnfs_auth_destroy(struct AUTH *auth)
{
if (auth->ah_cred.oa_base) {
free(auth->ah_cred.oa_base);
static int nfs_lookup_path_async_internal(struct nfs_context *nfs, struct nfs_cb_data *data, struct nfs_fh3 *fh);
-void nfs_set_auth(struct nfs_context *nfs, AUTH *auth)
+void nfs_set_auth(struct nfs_context *nfs, struct AUTH *auth)
{
rpc_set_auth(nfs->rpc, auth);
}