PORTMAP: Add support for PORTMAP v3 CALLIT
[deb_libnfs.git] / portmap / portmap.x
CommitLineData
84004dbf
RS
1/*
2 * From RFC1833
3 */
4
5const PMAP_PORT = 111; /* portmapper port number */
6
4edd7830 7struct pmap2_mapping {
84004dbf
RS
8 unsigned int prog;
9 unsigned int vers;
10 unsigned int prot;
11 unsigned int port;
12};
13
4edd7830 14struct pmap2_call_args {
84004dbf
RS
15 unsigned int prog;
16 unsigned int vers;
17 unsigned int proc;
18 opaque args<>;
19};
20
4edd7830 21struct pmap2_call_result {
947e8930
RS
22 unsigned int port;
23 opaque res<>;
24};
84004dbf 25
4edd7830
RS
26struct pmap2_mapping_list {
27 pmap2_mapping map;
28 pmap2_mapping_list *next;
8ae943f6
RS
29};
30
4edd7830
RS
31struct pmap2_dump_result {
32 struct pmap2_mapping_list *list;
33};
34
7fbedfde
RS
35struct pmap3_getaddr_result {
36 string addr<>;
37};
38
4edd7830
RS
39struct pmap3_mapping {
40 unsigned int prog;
41 unsigned int vers;
42 string netid<>;
43 string addr<>;
44 string owner<>;
45};
46
47struct pmap3_mapping_list {
48 pmap3_mapping map;
49 pmap3_mapping_list *next;
50};
51
52struct pmap3_dump_result {
53 struct pmap3_mapping_list *list;
8ae943f6
RS
54};
55
b71f7e82
RS
56struct pmap3_call_args {
57 unsigned int prog;
58 unsigned int vers;
59 unsigned int proc;
60 opaque args<>;
61};
62
63struct pmap3_call_result {
64 unsigned int port;
65 opaque res<>;
66};
67
84004dbf
RS
68program PMAP_PROGRAM {
69 version PMAP_V2 {
70 void
0f0e352f 71 PMAP2_NULL(void) = 0;
84004dbf
RS
72
73 bool
4edd7830 74 PMAP2_SET(pmap2_mapping) = 1;
84004dbf
RS
75
76 bool
4edd7830 77 PMAP2_UNSET(pmap2_mapping) = 2;
84004dbf
RS
78
79 unsigned int
4edd7830 80 PMAP2_GETPORT(pmap2_mapping) = 3;
947e8930 81
4edd7830 82 pmap2_dump_result
7fbedfde 83 PMAP2_DUMP(void) = 4;
8ae943f6 84
4edd7830
RS
85 pmap2_call_result
86 PMAP2_CALLIT(pmap2_call_args) = 5;
84004dbf 87 } = 2;
4edd7830
RS
88 version PMAP_V3 {
89 void
90 PMAP3_NULL(void) = 0;
91
d731e94c
RS
92 bool
93 PMAP3_SET(pmap3_mapping) = 1;
94
95 bool
96 PMAP3_UNSET(pmap3_mapping) = 2;
97
7fbedfde
RS
98 pmap3_getaddr_result
99 PMAP3_GETADDR(pmap3_mapping) = 3;
100
4edd7830
RS
101 pmap3_dump_result
102 PMAP3_DUMP(void) = 4;
5245608a 103
b71f7e82
RS
104 pmap3_call_result
105 PMAP3_CALLIT(pmap3_call_args) = 5;
106
5245608a
RS
107 unsigned int
108 PMAP3_GETTIME(void) = 6;
4edd7830 109 } = 3;
84004dbf
RS
110} = 100000;
111