summaryrefslogtreecommitdiffstats
path: root/support/nsm/rpc.c
Commit message (Collapse)AuthorAgeFilesLines
* libnsm.a: Add RPC construction helper functionsChuck Lever2010-01-151-0/+534
To manage concurrency, both statd and sm-notify construct raw RPC requests in socket buffers, and use a minimal request scheduler to send these requests and manage replies. Both statd and sm-notify open code the RPC request construction. Introduce helper functions that can construct and send raw NSMPROC_NOTIFY, NLM downcalls, and portmapper calls over a datagram socket, and receive and parse their replies. Support for IPv6 and RPCB_GETADDR is featured. This code (and the IPv6 support it introduces) can now be shared by statd and sm-notify, eliminating code and bug duplication. This implementation is based on what's in utils/statd/rmtcall.c now, but is wrapped up in a nice API and includes extra error checking. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>