summaryrefslogtreecommitdiffstats
path: root/rpc/xdr
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/xdr')
-rw-r--r--rpc/xdr/src/msg-nfs3.c20
-rw-r--r--rpc/xdr/src/msg-nfs3.h9
-rw-r--r--rpc/xdr/src/nlm4-xdr.c11
-rw-r--r--rpc/xdr/src/nlm4-xdr.h9
-rw-r--r--rpc/xdr/src/nlm4.x9
5 files changed, 56 insertions, 2 deletions
diff --git a/rpc/xdr/src/msg-nfs3.c b/rpc/xdr/src/msg-nfs3.c
index f800b3128fa..8078f23f097 100644
--- a/rpc/xdr/src/msg-nfs3.c
+++ b/rpc/xdr/src/msg-nfs3.c
@@ -517,6 +517,20 @@ xdr_to_nlm4_unlockargs (struct iovec inmsg, nlm4_unlockargs *args)
}
ssize_t
+xdr_to_nlm4_shareargs (struct iovec inmsg, nlm4_shareargs *args)
+{
+ return xdr_to_generic (inmsg, (void*)args,
+ (xdrproc_t)xdr_nlm4_shareargs);
+}
+
+ssize_t
+xdr_serialize_nlm4_shareres (struct iovec outmsg, nlm4_shareres *res)
+{
+ return xdr_serialize_generic (outmsg, (void *)res,
+ (xdrproc_t)xdr_nlm4_shareres);
+}
+
+ssize_t
xdr_serialize_nlm4_testargs (struct iovec outmsg, nlm4_testargs *args)
{
return xdr_serialize_generic (outmsg, (void*)args,
@@ -530,3 +544,9 @@ xdr_to_nlm4_res (struct iovec inmsg, nlm4_res *args)
(xdrproc_t)xdr_nlm4_res);
}
+ssize_t
+xdr_to_nlm4_freeallargs (struct iovec inmsg, nlm4_freeallargs *args)
+{
+ return xdr_to_generic (inmsg, (void*)args,
+ (xdrproc_t)xdr_nlm4_freeallargs);
+}
diff --git a/rpc/xdr/src/msg-nfs3.h b/rpc/xdr/src/msg-nfs3.h
index 1310e02f897..701df300a6e 100644
--- a/rpc/xdr/src/msg-nfs3.h
+++ b/rpc/xdr/src/msg-nfs3.h
@@ -203,9 +203,18 @@ extern ssize_t
xdr_to_nlm4_unlockargs (struct iovec inmsg, nlm4_unlockargs *args);
extern ssize_t
+xdr_to_nlm4_shareargs (struct iovec inmsg, nlm4_shareargs *args);
+
+extern ssize_t
+xdr_serialize_nlm4_shareres (struct iovec outmsg, nlm4_shareres *res);
+
+extern ssize_t
xdr_serialize_nlm4_testargs (struct iovec outmsg, nlm4_testargs *args);
extern ssize_t
xdr_to_nlm4_res (struct iovec inmsg, nlm4_res *args);
+extern ssize_t
+xdr_to_nlm4_freeallargs (struct iovec inmsg, nlm4_freeallargs *args);
+
#endif
diff --git a/rpc/xdr/src/nlm4-xdr.c b/rpc/xdr/src/nlm4-xdr.c
index b41fbb15cac..4cf6a51e8fd 100644
--- a/rpc/xdr/src/nlm4-xdr.c
+++ b/rpc/xdr/src/nlm4-xdr.c
@@ -228,6 +228,17 @@ xdr_nlm4_shareres (XDR *xdrs, nlm4_shareres *objp)
return TRUE;
}
+bool_t
+xdr_nlm4_freeallargs (XDR *xdrs, nlm4_freeallargs *objp)
+{
+ if (!xdr_string (xdrs, &objp->name, LM_MAXSTRLEN))
+ return FALSE;
+ if (!xdr_uint32_t (xdrs, &objp->state))
+ return FALSE;
+ return TRUE;
+}
+
+
/*
bool_t
xdr_nlm_sm_status (XDR *xdrs, nlm_sm_status *objp)
diff --git a/rpc/xdr/src/nlm4-xdr.h b/rpc/xdr/src/nlm4-xdr.h
index fcc0e51b3c8..f9d6efd4d61 100644
--- a/rpc/xdr/src/nlm4-xdr.h
+++ b/rpc/xdr/src/nlm4-xdr.h
@@ -170,6 +170,13 @@ struct nlm4_shareres {
};
typedef struct nlm4_shareres nlm4_shareres;
+struct nlm4_freeallargs {
+ char *name;
+ u_int32_t state;
+};
+typedef struct nlm4_freeallargs nlm4_freeallargs;
+
+
#define NLM4_NULL 0
#define NLM4_TEST 1
#define NLM4_LOCK 2
@@ -216,6 +223,7 @@ extern bool_t xdr_nlm4_cancargs (XDR *, nlm4_cancargs*);
extern bool_t xdr_nlm4_unlockargs (XDR *, nlm4_unlockargs*);
extern bool_t xdr_nlm4_shareargs (XDR *, nlm4_shareargs*);
extern bool_t xdr_nlm4_shareres (XDR *, nlm4_shareres*);
+extern bool_t xdr_nlm4_freeallargs (XDR *, nlm4_freeallargs*);
#else /* K&R C */
extern bool_t xdr_netobj ();
@@ -235,6 +243,7 @@ extern bool_t xdr_nlm4_cancargs ();
extern bool_t xdr_nlm4_unlockargs ();
extern bool_t xdr_nlm4_shareargs ();
extern bool_t xdr_nlm4_shareres ();
+extern bool_t xdr_nlm4_freeallargs ();
#endif /* K&R C */
diff --git a/rpc/xdr/src/nlm4.x b/rpc/xdr/src/nlm4.x
index d738b27770d..a6de6f32bf4 100644
--- a/rpc/xdr/src/nlm4.x
+++ b/rpc/xdr/src/nlm4.x
@@ -74,7 +74,7 @@ struct nlm4_holder {
};
struct nlm4_lock {
- string caller_name<MAXNAMELEN>;
+ string caller_name<LM_MAXSTRLEN>;
netobj fh;
netobj oh;
u_int32_t svid;
@@ -83,7 +83,7 @@ struct nlm4_lock {
};
struct nlm4_share {
- string caller_name<MAXNAMELEN>;
+ string caller_name<LM_MAXSTRLEN>;
netobj fh;
netobj oh;
fsh_mode mode;
@@ -146,6 +146,11 @@ struct nlm4_shareres {
int sequence;
};
+struct nlm4_freeallargs {
+ string name<LM_MAXSTRLEN>; /* client hostname */
+ uint32 state; /* unused */
+};
+
/*
* argument for the procedure called by rpc.statd when a monitored host
* status change.