/*
	$Id: portmapper-spec 304 2006-03-05 16:19:34Z ajw $

	XDR Specification for the Port Mapper protocol.
	See RFC 1057 for more details.

	StrongEd$Mode=C
*/

#define PMAP_RPC_PROGRAM 100000
#define PMAP_RPC_VERSION 2

const PMAP_PORT = 111;

struct mapping {
   unsigned prog;
   unsigned vers;
   unsigned prot;
   unsigned port;
};

struct *pmaplist {
   mapping map;
   pmaplist *next;
};

struct pmaplist2 {
   pmaplist *list;
};

struct call_args {
   unsigned prog;
   unsigned vers;
   unsigned proc;
   opaque args<>;
};

struct call_result {
   unsigned port;
   opaque res<>;
};

void PMAPPROC_NULL(void) = 0;

bool PMAPPROC_SET(mapping) = 1;

bool PMAPPROC_UNSET(mapping) = 2;

unsigned PMAPPROC_GETPORT(mapping) = 3;

pmaplist2 PMAPPROC_DUMP(void) = 4;

call_result PMAPPROC_CALLIT(call_args) = 5;
