Tahr.RPC.Portmapper (tahr v0.1.0)

Copy Markdown View Source

Minimal portmap v2 (program 100000) handler — enough to satisfy mount -t nfs clients that go through rpcbind before they contact the NFS server directly.

We register the same TCP listener for both portmap and NFS, so a GETPORT for (NFS=100003, version 3, TCP=6) returns the same port this server is listening on. Other portmap procedures return PROC_UNAVAIL.

Procedure numbers (RFC 1833 §3.2)

PMAPPROC_NULL    = 0   # ping
PMAPPROC_SET     = 1   # not implemented
PMAPPROC_UNSET   = 2   # not implemented
PMAPPROC_GETPORT = 3   # implemented
PMAPPROC_DUMP    = 4   # not implemented
PMAPPROC_CALLIT  = 5   # not implemented

Summary

Functions

Numeric program id (always 100000).

Numeric version (always 2).

Functions

program()

@spec program() :: 100_000

Numeric program id (always 100000).

version()

@spec version() :: 2

Numeric version (always 2).