summaryrefslogtreecommitdiffstats
path: root/support/nfs/nfsclient.c
diff options
context:
space:
mode:
authorhjl <hjl>1999-10-18 23:21:12 +0000
committerhjl <hjl>1999-10-18 23:21:12 +0000
commit8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9 (patch)
tree0904ef8554ed680fe3244fa618685e1fb7ea148b /support/nfs/nfsclient.c
downloadnfs-utils-8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9.tar.gz
nfs-utils-8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9.tar.xz
nfs-utils-8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9.zip
Initial revision
Diffstat (limited to 'support/nfs/nfsclient.c')
-rw-r--r--support/nfs/nfsclient.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/support/nfs/nfsclient.c b/support/nfs/nfsclient.c
new file mode 100644
index 0000000..5886484
--- /dev/null
+++ b/support/nfs/nfsclient.c
@@ -0,0 +1,32 @@
+/*
+ * support/nfs/client.c
+ *
+ * Add or delete an NFS client in knfsd.
+ *
+ * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include "nfslib.h"
+
+int
+nfsaddclient(struct nfsctl_client *clp)
+{
+ struct nfsctl_arg arg;
+
+ arg.ca_version = NFSCTL_VERSION;
+ memcpy(&arg.ca_client, clp, sizeof(arg.ca_client));
+ return nfsctl(NFSCTL_ADDCLIENT, &arg, NULL);
+}
+
+int
+nfsdelclient(struct nfsctl_client *clp)
+{
+ struct nfsctl_arg arg;
+
+ arg.ca_version = NFSCTL_VERSION;
+ memcpy(&arg.ca_client, clp, sizeof(arg.ca_client));
+ return nfsctl(NFSCTL_DELCLIENT, &arg, NULL);
+}