---
name: "VFS_CHECKEXP"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/VFS_CHECKEXP/9freebsd"
---

# VFS\_CHECKEXP(9freebsd)

check if a file system is exported to a client

## NAME

**VFS\_CHECKEXP** – check if a file system is exported to a client

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/mount.h\>**

*int*\

**VFS\_CHECKEXP**(*struct mount \*mp*, *struct sockaddr \*nam*, *int \*exflagsp*, *struct ucred \*\*credanonp*);

## DESCRIPTION

The **VFS\_CHECKEXP**() macro is used by the NFS server to check if a mount point is exported to a client.

The arguments it expects are:

- *mp*

  The mount point to be checked.

- *nam*

  An mbuf containing the network address of the client.

- *exflagsp*

  Return parameter for the export flags for this client.

- *credanonp*

  Return parameter for the anonymous credentials for this client.

The **VFS\_CHECKEXP**() macro should be called on a file system's mount structure to determine if it is exported to a client whose address is contained in *nam*.

It is generally called before [VFS\_FHTOVP(9)](/VFS_FHTOVP/9.md) to validate that a client has access to the file system.

The file system should call vfs\_export\_lookup(9) with the address of an appropriate *netexport* structure and the address of the client, *nam*, to verify that the client can access this file system.

## RETURN VALUES

The export flags and anonymous credentials specific to the client (returned by vfs\_export\_lookup(9)) will be returned in *\*exflagsp* and *\*credanonp*.

## SEE ALSO

[VFS(9)](/VFS/9.md), [VFS\_FHTOVP(9)](/VFS_FHTOVP/9.md), [vnode(9)](/vnode/9.md), [VOP\_VPTOFH(9)](/VOP_VPTOFH/9.md)

## AUTHORS

This manual page was written by Alfred Perlstein.
