45c87af475d9abc604091dd092b6783e6e08a9c6
[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 struct pmap3_call_args {
57 unsigned int prog;
58 unsigned int vers;
59 unsigned int proc;
60 opaque args<>;
61 };
62
63 struct pmap3_call_result {
64 unsigned int port;
65 opaque res<>;
66 };
67
68 struct pmap3_netbuf {
69 unsigned int maxlen;
70 opaque buf<>;
71 };
72
73 program PMAP_PROGRAM {
74 version PMAP_V2 {
75 void
76 PMAP2_NULL(void) = 0;
77
78 bool
79 PMAP2_SET(pmap2_mapping) = 1;
80
81 bool
82 PMAP2_UNSET(pmap2_mapping) = 2;
83
84 unsigned int
85 PMAP2_GETPORT(pmap2_mapping) = 3;
86
87 pmap2_dump_result
88 PMAP2_DUMP(void) = 4;
89
90 pmap2_call_result
91 PMAP2_CALLIT(pmap2_call_args) = 5;
92 } = 2;
93 version PMAP_V3 {
94 void
95 PMAP3_NULL(void) = 0;
96
97 bool
98 PMAP3_SET(pmap3_mapping) = 1;
99
100 bool
101 PMAP3_UNSET(pmap3_mapping) = 2;
102
103 pmap3_getaddr_result
104 PMAP3_GETADDR(pmap3_mapping) = 3;
105
106 pmap3_dump_result
107 PMAP3_DUMP(void) = 4;
108
109 pmap3_call_result
110 PMAP3_CALLIT(pmap3_call_args) = 5;
111
112 unsigned int
113 PMAP3_GETTIME(void) = 6;
114
115 pmap3_netbuf
116 PMAP3_UADDR2TADDR(string) = 7;
117 } = 3;
118 } = 100000;
119