NFSv4 referral support
Does libnfs currently support NFSv4 referral?
No. Not at the moment.
Referrals would be difficult, but not impossible, to add to libnfs without a lot of work. The actual referrals themselves would maybe not be super hard to add since resolving them could conceptually be done in the same places we handle symlinks during the nfsv4 lookup_path code.
What would have to happen first would be to change the api's on how to interface libnfs with applications. Currently, libnfs interaces via the functions nfs_get_fd/nfs_which_events and nfs_service and this all assumes that we only have a single file descriptor (socket) that is associated wit the context. We first have to break that assumption and make it possible to have multiple file descriptors (sockets) per context and a way where the library can call back into the application to tell it to add/remove additional descriptors for the eventloops.
I did a similar patch to libsmb2 to add this kind of multiple descriptor support. We would need to port something similar over to libnfs as a first step. And then we can build referral support into libnfs ontop of it.