C NFSv4 Mount Function
This document summarizes C language-based NFSv4 mount functions that work in Linux and FreeBSD environments.
1. Linux NFSv4 Mount Function
| |
[Code 1] is a function that performs NFSv4 mount using the mount() function in a Linux environment. The Linux man page does not document how to perform NFSv4 mount using the mount() function.
2. FreeBSD NFSv4 Mount Function
| |
[Code 2] is a function that performs NFSv4 mount using the mount() function in a FreeBSD environment. It was created by referencing FreeBSD’s mount_nfs tool. When checking the NFSv4 server status at line 57, the NFSv4 server is working fine, but if a problem occurs with the NFSv4 server when executing the nmount() function at line 78, the nmount() function blocks.