PORTMAPv3: Add NULL and DUMP commands. Also add portmap example client.
[deb_libnfs.git] / portmap / portmap.x
1 /*
2 * From RFC1833
3 */
4
5 const PMAP_PORT = 111; /* portmapper port number */
6
7 struct pmap2_mapping {
8 unsigned int prog;
9 unsigned int vers;
10 unsigned int prot;
11 unsigned int port;
12 };
13
14 struct pmap2_call_args {
15 unsigned int prog;
16 unsigned int vers;
17 unsigned int proc;
18 opaque args<>;
19 };
20
21 struct pmap2_call_result {
22 unsigned int port;
23 opaque res<>;
24 };
25
26 struct pmap2_mapping_list {
27 pmap2_mapping map;
28 pmap2_mapping_list *next;
29 };
30
31 struct pmap2_dump_result {
32 struct pmap2_mapping_list *list;
33 };
34
35 struct pmap3_mapping {
36 unsigned int prog;
37 unsigned int vers;
38 string netid<>;
39 string addr<>;
40 string owner<>;
41 };
42
43 struct pmap3_mapping_list {
44 pmap3_mapping map;
45 pmap3_mapping_list *next;
46 };
47
48 struct pmap3_dump_result {
49 struct pmap3_mapping_list *list;
50 };
51
52 program PMAP_PROGRAM {
53 version PMAP_V2 {
54 void
55 PMAP2_NULL(void) = 0;
56
57 bool
58 PMAP2_SET(pmap2_mapping) = 1;
59
60 bool
61 PMAP2_UNSET(pmap2_mapping) = 2;
62
63 unsigned int
64 PMAP2_GETPORT(pmap2_mapping) = 3;
65
66 pmap2_dump_result
67 PMAP2_DUMP(void) = 4;
68
69 pmap2_call_result
70 PMAP2_CALLIT(pmap2_call_args) = 5;
71 } = 2;
72 version PMAP_V3 {
73 void
74 PMAP3_NULL(void) = 0;
75
76 pmap3_dump_result
77 PMAP3_DUMP(void) = 4;
78
79 } = 3;
80 } = 100000;
81