---
name: "VFS_CHECKEXP"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/VFS_CHECKEXP"
---

# VFS\_CHECKEXP(9)

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*, *uint64\_t \*exflagsp*, *struct ucred \*\*credanonp*, *int \*numsecflavor*, *int \*secflavors*);

## 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.

- *numsecflavors*

  Return value for the number of security flavors for this client.

- *secflavors*

  Must be an array of size MAXSECFLAVORS, in which the security flavors for this client are returned.

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 called in the NFS server once a vnode for a file handle has been acquired, in order to determine what access the client is allowed on the file system the vnode resides in. For NFSv4, it is also called whenever the lookup operation crosses a server file system mount point, to update the access information.

The operation is file system specific, but is normally handled by the default \`\`vfs\_stdcheckexp''.

## RETURN VALUES

The export flags, anonymous credentials and security flavors specific to the client will be returned in *\*exflagsp*, *\*credanonp*, *\*numsecflavors* and *\*secflavors*.

## 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.
