lib/cpp: XDR protocols