PORTMAPv3: Add NULL and DUMP commands. Also add portmap example client.
[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
35struct pmap3_mapping {
36 unsigned int prog;
37 unsigned int vers;
38 string netid<>;
39 string addr<>;
40 string owner<>;
41};
42
43struct pmap3_mapping_list {
44 pmap3_mapping map;
45 pmap3_mapping_list *next;
46};
47
48struct pmap3_dump_result {
49 struct pmap3_mapping_list *list;
8ae943f6
RS
50};
51
84004dbf
RS
52program PMAP_PROGRAM {
53 version PMAP_V2 {
54 void
0f0e352f 55 PMAP2_NULL(void) = 0;
84004dbf
RS
56
57 bool
4edd7830 58 PMAP2_SET(pmap2_mapping) = 1;
84004dbf
RS
59
60 bool
4edd7830 61 PMAP2_UNSET(pmap2_mapping) = 2;
84004dbf
RS
62
63 unsigned int
4edd7830 64 PMAP2_GETPORT(pmap2_mapping) = 3;
947e8930 65
4edd7830 66 pmap2_dump_result
0f0e352f 67 PMAP2_DUMP(void) = 4;
8ae943f6 68
4edd7830
RS
69 pmap2_call_result
70 PMAP2_CALLIT(pmap2_call_args) = 5;
84004dbf 71 } = 2;
4edd7830
RS
72 version PMAP_V3 {
73 void
74 PMAP3_NULL(void) = 0;
75
76 pmap3_dump_result
77 PMAP3_DUMP(void) = 4;
78
79 } = 3;
84004dbf
RS
80} = 100000;
81