1/* Portmap RPC spec from RFC1057 */
2
3const PMAP_PORT = 111;      /* portmapper port number */
4
5struct mapping {
6   uint32_t prog;
7   uint32_t vers;
8   uint32_t prot;
9   uint32_t port;
10};
11
12const IPPROTO_TCP = 6;      /* protocol number for TCP/IP */
13const IPPROTO_UDP = 17;     /* protocol number for UDP/IP */
14
15struct pmaplist {
16   mapping map;
17   pmaplist *next;
18};
19
20struct call_args {
21   uint32_t prog;
22   uint32_t vers;
23   uint32_t proc;
24   opaque args<>;
25};
26
27struct call_result {
28   uint32_t port;
29   opaque res<>;
30};
31
32program PMAP_PROG {
33   version PMAP_VERS {
34      void
35      PMAPPROC_NULL(void)         = 0;
36
37      bool
38      PMAPPROC_SET(mapping)       = 1;
39
40      bool
41      PMAPPROC_UNSET(mapping)     = 2;
42
43      uint32_t
44      PMAPPROC_GETPORT(mapping)   = 3;
45
46      pmaplist
47      PMAPPROC_DUMP(void)         = 4;
48
49      call_result
50      PMAPPROC_CALLIT(call_args)  = 5;
51   } = 2;
52} = 100000;
53