File: nfsclient.c

package info (click to toggle)
nfs-utils 1%3A1.2.8-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,520 kB
  • ctags: 4,124
  • sloc: ansic: 36,748; sh: 12,042; python: 1,002; makefile: 724
file content (34 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * support/nfs/client.c
 *
 * Add or delete an NFS client in knfsd.
 *
 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#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);
}