61a9d5db563f11f921cc0658f534d19ec696b3c5
[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_getaddr_result {
36 string addr<>;
37 };
38
39 struct pmap3_mapping {
40 unsigned int prog;
41 unsigned int vers;
42 string netid<>;
43 string addr<>;
44 string owner<>;
45 };
46
47 struct pmap3_mapping_list {
48 pmap3_mapping map;
49 pmap3_mapping_list *next;
50 };
51
52 struct pmap3_dump_result {
53 struct pmap3_mapping_list *list;
54 };
55
56 program PMAP_PROGRAM {
57 version PMAP_V2 {
58 void
59 PMAP2_NULL(void) = 0;
60
61 bool
62 PMAP2_SET(pmap2_mapping) = 1;
63
64 bool
65 PMAP2_UNSET(pmap2_mapping) = 2;
66
67 unsigned int
68 PMAP2_GETPORT(pmap2_mapping) = 3;
69
70 pmap2_dump_result
71 PMAP2_DUMP(void) = 4;
72
73 pmap2_call_result
74 PMAP2_CALLIT(pmap2_call_args) = 5;
75 } = 2;
76 version PMAP_V3 {
77 void
78 PMAP3_NULL(void) = 0;
79
80 pmap3_getaddr_result
81 PMAP3_GETADDR(pmap3_mapping) = 3;
82
83 pmap3_dump_result
84 PMAP3_DUMP(void) = 4;
85 } = 3;
86 } = 100000;
87