socket: fix broken connect for non broadcast traffic
[deb_libnfs.git] / portmap / portmap.x
CommitLineData
84004dbf
RS
1/*
2 * From RFC1833
f3684c08 3 * and http://tools.ietf.org/html/draft-ietf-oncrpc-rpcbind-00
84004dbf
RS
4 */
5
6const PMAP_PORT = 111; /* portmapper port number */
7
4edd7830 8struct pmap2_mapping {
84004dbf
RS
9 unsigned int prog;
10 unsigned int vers;
11 unsigned int prot;
12 unsigned int port;
13};
14
4edd7830 15struct pmap2_call_args {
84004dbf
RS
16 unsigned int prog;
17 unsigned int vers;
18 unsigned int proc;
19 opaque args<>;
20};
21
4edd7830 22struct pmap2_call_result {
947e8930
RS
23 unsigned int port;
24 opaque res<>;
25};
84004dbf 26
4edd7830
RS
27struct pmap2_mapping_list {
28 pmap2_mapping map;
29 pmap2_mapping_list *next;
8ae943f6
RS
30};
31
4edd7830
RS
32struct pmap2_dump_result {
33 struct pmap2_mapping_list *list;
34};
35
24f45c54 36struct pmap3_string_result {
7fbedfde
RS
37 string addr<>;
38};
39
4edd7830
RS
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;
8ae943f6
RS
55};
56
b71f7e82
RS
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
729266a7
RS
69struct pmap3_netbuf {
70 unsigned int maxlen;
f3684c08
RS
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 */
729266a7
RS
75 opaque buf<>;
76};
77
84004dbf
RS
78program PMAP_PROGRAM {
79 version PMAP_V2 {
80 void
0f0e352f 81 PMAP2_NULL(void) = 0;
84004dbf
RS
82
83 bool
4edd7830 84 PMAP2_SET(pmap2_mapping) = 1;
84004dbf
RS
85
86 bool
4edd7830 87 PMAP2_UNSET(pmap2_mapping) = 2;
84004dbf
RS
88
89 unsigned int
4edd7830 90 PMAP2_GETPORT(pmap2_mapping) = 3;
947e8930 91
4edd7830 92 pmap2_dump_result
7fbedfde 93 PMAP2_DUMP(void) = 4;
8ae943f6 94
4edd7830
RS
95 pmap2_call_result
96 PMAP2_CALLIT(pmap2_call_args) = 5;
84004dbf 97 } = 2;
4edd7830
RS
98 version PMAP_V3 {
99 void
100 PMAP3_NULL(void) = 0;
101
d731e94c
RS
102 bool
103 PMAP3_SET(pmap3_mapping) = 1;
104
105 bool
106 PMAP3_UNSET(pmap3_mapping) = 2;
107
24f45c54 108 pmap3_string_result
7fbedfde
RS
109 PMAP3_GETADDR(pmap3_mapping) = 3;
110
4edd7830
RS
111 pmap3_dump_result
112 PMAP3_DUMP(void) = 4;
5245608a 113
b71f7e82
RS
114 pmap3_call_result
115 PMAP3_CALLIT(pmap3_call_args) = 5;
116
5245608a
RS
117 unsigned int
118 PMAP3_GETTIME(void) = 6;
729266a7
RS
119
120 pmap3_netbuf
121 PMAP3_UADDR2TADDR(string) = 7;
29258a73 122
24f45c54 123 struct pmap3_string_result
29258a73 124 PMAP3_TADDR2UADDR(pmap3_netbuf) = 8;
4edd7830 125 } = 3;
84004dbf
RS
126} = 100000;
127