The Network File System (NFS) option provides transparent access to remote files on most UNIX (and many non-UNIX) platforms. For example, this facility can be used to load applications dynamically from the host to the target.
The NFS_CLIENT
feature provides POSIX-compatible file I/O system calls on top
of the NFS file system. It provides only the client side
implementation of the protocol and thus requires a host system to provide
the server side implementation of the NFS protocol. The NFS_CLIENT
feature can be configured to run on top of either
Ethernet or the point-to-point protocol (PPP). The NFS_CLIENT
requires the POSIX_SOCKETS
feature to be configured.
The NFS protocol is supported over IPv4 or IPv6 and supports both NFSv2 and NFSv3 over the user datagram protocol (UDP) and transmission control protocol (TCP).
The NFS_CLIENT feature API is summarized in the following table. For general information on the API provided by this feature, see the POSIX standard (IEEE Std 1003.1b-1993). Note that some of the calls listed are also included in other features.
Function |
Description |
---|---|
access() |
Check access permissions |
chdir, fchdir() |
Change current directory |
chflags() |
Modify file flags (BSD function) |
chmod, fchmod() |
Change access mode |
chown, fchown() |
Change owner |
chroot() |
Change root directory |
close() |
Close a file descriptor |
dup, dup2() |
Duplicate an open file descriptor |
fcntl() |
File control |
flock() |
Apply or remove an advisory lock on an open file |
fpathconf() |
Get configurable pathname variables |
fsync() |
Synchronize a file's in-core stats with those on disk |
getdents() |
Read directory entries |
getdirentries() |
Get directory entries in a file system independent format |
getfsstat() |
Get list of all mounted file systems |
ioctl() |
Device control |
link() |
Make a hard file link |
lseek() |
Move read/write file pointer |
mkdir() |
Make a directory file |
mkfifo() |
Make FIFOs |
mknod() |
Create a special file |
mount, umount() |
Mount or unmount a file system |
open() |
Open for reading or writing |
read, readv() |
Read from file |
readlink() |
Read a value of a symbolic link |
rename() |
Change the name of a file |
revoke() |
Invalidate all open file descriptors (BSD function) |
rmdir() |
Remove a directory file |
stat, fstat, lstat() |
Get file status |
statfs, fstatfs() |
Get file system statistics |
symlink() |
Make a symbolic link to a file |
sync() |
Synchronize disk block in-core status with that on disk |
truncate, ftruncate() |
Truncate a file |
umask() |
Set file creation mode mask |
unlink() |
Remove a directory entry |
utimes() |
Set file access and modification times |
write, writev() |
Write to a file |
The following library calls do not support multi-threaded applications:
Function |
Description |
---|---|
opendir() |
Open a directory |
closedir() |
Close a directory |
readdir() |
Read directory entry |
rewinddir() |
Reset directory stream |
scandir() |
Scan a directory for matching entries |
seekdir() |
Set the position of the next readdir() call in the directory stream |
telldir() |
Return current location in directory stream |
For details, see NFS_CLIENT(5FEA).
The NFS_SERVER
feature provides an NFS server on top of a local file system,
most commonly UFS, but possibly MSDOSFS.
It provides only the server side implementation of the protocol, the client
side being provided by the NFS_CLIENT
feature. The NFS_SERVER
requires the POSIX_SOCKETS
and UFS
features.
The NFS protocol is supported over IPv4 and IPv6; it supports both NFSv2 and NFSv3 over UDP and TCP.
The NFS_SERVER feature API is summarized in the following table. For general information on the API provided by this feature, see the POSIX standard (IEEE Std 1003.1b-1993). Some of the calls listed are also included in other features.
Function |
Description |
---|---|
getfh() |
Get file handle |
nfssvc() |
NFS services |
For details, see the NFS_SERVER(5FEA) man page.