socket: fix broken connect for non broadcast traffic
[deb_libnfs.git] / portmap / portmap.x
... / ...
CommitLineData
1/*
2 * From RFC1833
3 * and http://tools.ietf.org/html/draft-ietf-oncrpc-rpcbind-00
4 */
5
6const PMAP_PORT = 111; /* portmapper port number */
7
8struct pmap2_mapping {
9 unsigned int prog;
10 unsigned int vers;
11 unsigned int prot;
12 unsigned int port;
13};
14
15struct pmap2_call_args {
16 unsigned int prog;
17 unsigned int vers;
18 unsigned int proc;
19 opaque args<>;
20};
21
22struct pmap2_call_result {
23 unsigned int port;
24 opaque res<>;
25};
26
27struct pmap2_mapping_list {
28 pmap2_mapping map;
29 pmap2_mapping_list *next;
30};
31
32struct pmap2_dump_result {
33 struct pmap2_mapping_list *list;
34};
35
36struct pmap3_string_result {
37 string addr<>;
38};
39
40struct pmap3_mapping {
41 unsigned int prog;
42 unsigned int vers;
43 string netid<>;
44 string addr<>;
45 string owner<>;
46};
47
48struct pmap3_mapping_list {
49 pmap3_mapping map;
50 pmap3_mapping_list *next;
51};
52
53struct pmap3_dump_result {
54 struct pmap3_mapping_list *list;
55};
56
57struct pmap3_call_args {
58 unsigned int prog;
59 unsigned int vers;
60 unsigned int proc;
61 opaque args<>;
62};
63
64struct pmap3_call_result {
65 unsigned int port;
66 opaque res<>;
67};
68
69struct pmap3_netbuf {
70 unsigned int maxlen;
71 /* This pretty much contains a sockaddr_storage.
72 * Beware differences in endianess for ss_family
73 * and whether or not ss_len exists.
74 */
75 opaque buf<>;
76};
77
78program PMAP_PROGRAM {
79 version PMAP_V2 {
80 void
81 PMAP2_NULL(void) = 0;
82
83 bool
84 PMAP2_SET(pmap2_mapping) = 1;
85
86 bool
87 PMAP2_UNSET(pmap2_mapping) = 2;
88
89 unsigned int
90 PMAP2_GETPORT(pmap2_mapping) = 3;
91
92 pmap2_dump_result
93 PMAP2_DUMP(void) = 4;
94
95 pmap2_call_result
96 PMAP2_CALLIT(pmap2_call_args) = 5;
97 } = 2;
98 version PMAP_V3 {
99 void
100 PMAP3_NULL(void) = 0;
101
102 bool
103 PMAP3_SET(pmap3_mapping) = 1;
104
105 bool
106 PMAP3_UNSET(pmap3_mapping) = 2;
107
108 pmap3_string_result
109 PMAP3_GETADDR(pmap3_mapping) = 3;
110
111 pmap3_dump_result
112 PMAP3_DUMP(void) = 4;
113
114 pmap3_call_result
115 PMAP3_CALLIT(pmap3_call_args) = 5;
116
117 unsigned int
118 PMAP3_GETTIME(void) = 6;
119
120 pmap3_netbuf
121 PMAP3_UADDR2TADDR(string) = 7;
122
123 struct pmap3_string_result
124 PMAP3_TADDR2UADDR(pmap3_netbuf) = 8;
125 } = 3;
126} = 100000;
127