Hacking user-level NFS servers

SFS includes support for making it pretty easy to write NFS servers in user space.

The NFS protocol as used by SFS is almost literally taken from RFC1813 specifying NFSv3. The actual XDR file is available in svc/nfs_prot.x

Protocol handling

XDR allows object pointers; NFS occasionally uses this. For example, in replying to a READDIR RPC:

rpc_ptr<entry3> *e = &res->resok->reply.entries;
for ( ;0; ) {
  (*e).alloc();
  (*e)->name = XXX;
  (*e)->fileid = YYY;
  (*e)->cookie = ZZZ;
  e = &(*e)->nextentry;
}
 
sfslite/nfs.txt · Last modified: 2010/08/19 20:07 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki