Debian Codegraph @

rfc1833.html

raw
1 <pre>Network Working Group R. Srinivasan
2 Request for Comments: 1833 Sun Microsystems
3 Category: Standards Track August 1995
4
5
6 <span class="h1">Binding Protocols for ONC RPC Version 2</span>
7
8 Status of this Memo
9
10 This document specifies an Internet standards track protocol for the
11 Internet community, and requests discussion and suggestions for
12 improvements. Please refer to the current edition of the "Internet
13 Official Protocol Standards" (STD 1) for the standardization state
14 and status of this protocol. Distribution of this memo is unlimited.
15
16 ABSTRACT
17
18 This document describes the binding protocols used in conjunction
19 with the ONC Remote Procedure Call (ONC RPC Version 2) protocols.
20
21 TABLE OF CONTENTS
22
23 1. Introduction 1
24 2. RPCBIND Program Protocol 2
25 2.1 RPCBIND Protocol Specification (in RPC Language) 3
26 2.2 RPCBIND Operation 9
27 2.2.1 RPCBIND Version 3 9
28 2.2.2 RPCBIND, Version 4 10
29 3. Port Mapper Program Protocol 11
30 3.1 Port Mapper Protocol Specification (in RPC Language) 11
31 3.2 Port Mapper Operation 13
32 References 14
33 Security Considerations 14
34 Author's Address 14
35
36 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
37
38 This document specifies the binding protocols used in conjunction
39 with ONC RPC Version 2. As a prerequisite, the reader is expected to
40 be familiar with [<a href="#ref-1" title="&quot;Remote Procedure Call Protocol Version 2&quot;">1</a>] and [<a href="#ref-2" title="&quot;XDR: External Data Representation Standard&quot;">2</a>] which describe the ONC RPC Version 2 and
41 XDR (eXternal Data Representation) protocols.
42
43 An RPC service is identified by its RPC program number, version
44 number, and the transport address where it may be reached. The
45 transport address, in turn, consists of a network address and a
46 transport selector. In the case of a service available over TCP/IP
47 or UDP/IP, the network address will be an IP address, and the
48 transport selector will be a TCP or UDP port number.
49
50
51
52 <span class="grey">Srinivasan Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
55
56
57 A client program needs to know the RPC program number, version
58 number, and the transport address corresponding to a service in order
59 to utilize the service. Of these, the RPC program number and version
60 number are usually built into the client program, as part of the
61 service definition. The network address component of the transport
62 address is usually available in a name service, or is given as a
63 parameter to the client program. The transport selector (ie., the
64 TCP or UDP port) is usually determined dynamically, and varies with
65 each invocation of the service. Server programs allocate a transport
66 address, and register it with a well-known lookup service (well-known
67 because it uses a fixed transport selector, and resides at the same
68 network address as the server). Client programs consult the lookup
69 service in order to obtain the server's transport address.
70
71 Such a lookup service is very desirable because the range of well-
72 known transport selectors is very small for some transports and the
73 number of services is potentially very large. By running only the
74 lookup service on a well-known transport selector, the transport
75 addresses of other remote programs can be ascertained by querying the
76 lookup service.
77
78 This document describes three versions of a lookup service, all of
79 which use the same RPC program number (100000). They all use port
80 111 over TCP and UDP transports. Versions 3 and 4 are described in
81 <a href="#section-2">Section 2</a> ("RPCBIND Program Protocol"). Version 2 is described in
82 <a href="#section-3">Section 3</a> ("Port Mapper Program Protocol").
83
84 The distinguishing characteristic of RPCBIND (versions 3 and 4) is
85 that this protocol uses a transport-independent format for the
86 transport address, known as the universal address format. An address
87 in universal address format is an ASCII string representation of the
88 transport dependent address. String representation of addresses
89 corresponding to a transport are defined by the addressing authority
90 for the transport. The RPCBIND protocol can be used for binding ONC
91 RPC clients and servers over any transport.
92
93 The Port Mapper (version 2), on the other hand, is an older protocol
94 that is specific to TCP and UDP. It handles TCP and UDP ports
95 directly.
96
97 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. RPCBIND Program Protocol</span>
98
99 The RPCBIND program maps RPC program and version numbers to universal
100 addresses, thus making dynamic binding of remote programs possible.
101
102 The RPCBIND program is bound to a well-known address of each
103 supported transport, and other programs register their dynamically
104 allocated transport address with it. The RPCBIND program then makes
105
106
107
108 <span class="grey">Srinivasan Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
111
112
113 those addresses publicly available.
114
115 The RPCBIND program also aids in broadcast RPC. A given RPC program
116 will usually have different transport address bindings on different
117 machines, so there is no way to directly broadcast to all of these
118 programs. The RPCBIND program, however, does have a well-known
119 address. So, to broadcast to a given program, the client actually
120 sends its message to the RPCBIND program located at the broadcast
121 address. Each instance of the RPCBIND program that picks up the
122 broadcast then calls the local service specified by the client. When
123 the RPCBIND program gets the reply from the local service, it sends
124 the reply back to the client.
125
126 <span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a> RPCBIND Protocol Specification (in RPC Language)</span>
127
128 /*
129 * rpcb_prot.x
130 * rpcbind protocol, versions 3 and 4, in RPC Language
131 */
132
133 /*
134 * rpcbind address for TCP/UDP
135 */
136 const RPCB_PORT = 111;
137
138 /*
139 * A mapping of (program, version, network ID) to address
140 *
141 * The network identifier (r_netid):
142 * This is a string that represents a local identification for a
143 * network. This is defined by a system administrator based on local
144 * conventions, and cannot be depended on to have the same value on
145 * every system.
146 */
147 struct rpcb {
148 unsigned long r_prog; /* program number */
149 unsigned long r_vers; /* version number */
150 string r_netid&lt;&gt;; /* network id */
151 string r_addr&lt;&gt;; /* universal address */
152 string r_owner&lt;&gt;; /* owner of this service */
153 };
154
155 struct rp__list {
156 rpcb rpcb_map;
157 struct rp__list *rpcb_next;
158 };
159
160
161
162
163
164 <span class="grey">Srinivasan Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
167
168
169 typedef rp__list *rpcblist_ptr; /* results of RPCBPROC_DUMP */
170
171
172 /*
173 * Arguments of remote calls
174 */
175 struct rpcb_rmtcallargs {
176 unsigned long prog; /* program number */
177 unsigned long vers; /* version number */
178 unsigned long proc; /* procedure number */
179 opaque args&lt;&gt;; /* argument */
180 };
181
182
183 /*
184 * Results of the remote call
185 */
186 struct rpcb_rmtcallres {
187 string addr&lt;&gt;; /* remote universal address */
188 opaque results&lt;&gt;; /* result */
189 };
190
191
192 /*
193 * rpcb_entry contains a merged address of a service on a particular
194 * transport, plus associated netconfig information. A list of
195 * rpcb_entry items is returned by RPCBPROC_GETADDRLIST. The meanings
196 * and values used for the r_nc_* fields are given below.
197 *
198 * The network identifier (r_nc_netid):
199
200 * This is a string that represents a local identification for a
201 * network. This is defined by a system administrator based on
202 * local conventions, and cannot be depended on to have the same
203 * value on every system.
204 *
205 * Transport semantics (r_nc_semantics):
206 * This represents the type of transport, and has the following values:
207 * NC_TPI_CLTS (1) Connectionless
208 * NC_TPI_COTS (2) Connection oriented
209 * NC_TPI_COTS_ORD (3) Connection oriented with graceful close
210 * NC_TPI_RAW (4) Raw transport
211 *
212 * Protocol family (r_nc_protofmly):
213 * This identifies the family to which the protocol belongs. The
214 * following values are defined:
215 * NC_NOPROTOFMLY "-"
216 * NC_LOOPBACK "loopback"
217
218
219
220 <span class="grey">Srinivasan Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
223
224
225 * NC_INET "inet"
226 * NC_IMPLINK "implink"
227 * NC_PUP "pup"
228 * NC_CHAOS "chaos"
229 * NC_NS "ns"
230 * NC_NBS "nbs"
231 * NC_ECMA "ecma"
232 * NC_DATAKIT "datakit"
233 * NC_CCITT "ccitt"
234 * NC_SNA "sna"
235 * NC_DECNET "decnet"
236 * NC_DLI "dli"
237 * NC_LAT "lat"
238 * NC_HYLINK "hylink"
239 * NC_APPLETALK "appletalk"
240 * NC_NIT "nit"
241 * NC_IEEE802 "ieee802"
242 * NC_OSI "osi"
243 * NC_X25 "x25"
244 * NC_OSINET "osinet"
245 * NC_GOSIP "gosip"
246 *
247 * Protocol name (r_nc_proto):
248 * This identifies a protocol within a family. The following are
249 * currently defined:
250 * NC_NOPROTO "-"
251 * NC_TCP "tcp"
252 * NC_UDP "udp"
253 * NC_ICMP "icmp"
254 */
255 struct rpcb_entry {
256 string r_maddr&lt;&gt;; /* merged address of service */
257 string r_nc_netid&lt;&gt;; /* netid field */
258 unsigned long r_nc_semantics; /* semantics of transport */
259 string r_nc_protofmly&lt;&gt;; /* protocol family */
260 string r_nc_proto&lt;&gt;; /* protocol name */
261 };
262
263 /*
264 * A list of addresses supported by a service.
265 */
266 struct rpcb_entry_list {
267 rpcb_entry rpcb_entry_map;
268 struct rpcb_entry_list *rpcb_entry_next;
269 };
270
271 typedef rpcb_entry_list *rpcb_entry_list_ptr;
272
273
274
275
276 <span class="grey">Srinivasan Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
279
280
281 /*
282 * rpcbind statistics
283 */
284
285 const rpcb_highproc_2 = RPCBPROC_CALLIT;
286 const rpcb_highproc_3 = RPCBPROC_TADDR2UADDR;
287 const rpcb_highproc_4 = RPCBPROC_GETSTAT;
288
289 const RPCBSTAT_HIGHPROC = 13; /* # of procs in rpcbind V4 plus one */
290 const RPCBVERS_STAT = 3; /* provide only for rpcbind V2, V3 and V4 */
291 const RPCBVERS_4_STAT = 2;
292 const RPCBVERS_3_STAT = 1;
293 const RPCBVERS_2_STAT = 0;
294
295 /* Link list of all the stats about getport and getaddr */
296 struct rpcbs_addrlist {
297 unsigned long prog;
298 unsigned long vers;
299 int success;
300 int failure;
301 string netid&lt;&gt;;
302 struct rpcbs_addrlist *next;
303 };
304
305 /* Link list of all the stats about rmtcall */
306 struct rpcbs_rmtcalllist {
307 unsigned long prog;
308 unsigned long vers;
309 unsigned long proc;
310 int success;
311 int failure;
312 int indirect; /* whether callit or indirect */
313 string netid&lt;&gt;;
314 struct rpcbs_rmtcalllist *next;
315 };
316
317 typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
318 typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
319 typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
320
321 struct rpcb_stat {
322 rpcbs_proc info;
323 int setinfo;
324 int unsetinfo;
325 rpcbs_addrlist_ptr addrinfo;
326 rpcbs_rmtcalllist_ptr rmtinfo;
327 };
328
329
330
331
332 <span class="grey">Srinivasan Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
335
336
337 /*
338 * One rpcb_stat structure is returned for each version of rpcbind
339 * being monitored.
340 */
341
342 typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
343
344 /*
345 * netbuf structure, used to store the transport specific form of
346 * a universal transport address.
347 */
348 struct netbuf {
349 unsigned int maxlen;
350 opaque buf&lt;&gt;;
351 };
352
353
354 /*
355 * rpcbind procedures
356 */
357 program RPCBPROG {
358 version RPCBVERS {
359 bool
360 RPCBPROC_SET(rpcb) = 1;
361
362 bool
363 RPCBPROC_UNSET(rpcb) = 2;
364
365 string
366 RPCBPROC_GETADDR(rpcb) = 3;
367
368 rpcblist_ptr
369 RPCBPROC_DUMP(void) = 4;
370
371 rpcb_rmtcallres
372 RPCBPROC_CALLIT(rpcb_rmtcallargs) = 5;
373
374 unsigned int
375 RPCBPROC_GETTIME(void) = 6;
376
377 netbuf
378 RPCBPROC_UADDR2TADDR(string) = 7;
379
380 string
381 RPCBPROC_TADDR2UADDR(netbuf) = 8;
382 } = 3;
383
384
385
386
387
388 <span class="grey">Srinivasan Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
391
392
393 version RPCBVERS4 {
394 bool
395 RPCBPROC_SET(rpcb) = 1;
396
397 bool
398 RPCBPROC_UNSET(rpcb) = 2;
399
400 string
401 RPCBPROC_GETADDR(rpcb) = 3;
402
403 rpcblist_ptr
404 RPCBPROC_DUMP(void) = 4;
405
406 /*
407 * NOTE: RPCBPROC_BCAST has the same functionality as CALLIT;
408 * the new name is intended to indicate that this
409 * procedure should be used for broadcast RPC, and
410 * RPCBPROC_INDIRECT should be used for indirect calls.
411 */
412 rpcb_rmtcallres
413 RPCBPROC_BCAST(rpcb_rmtcallargs) = RPCBPROC_CALLIT;
414
415 unsigned int
416
417 RPCBPROC_GETTIME(void) = 6;
418
419 netbuf
420 RPCBPROC_UADDR2TADDR(string) = 7;
421
422 string
423 RPCBPROC_TADDR2UADDR(netbuf) = 8;
424
425 string
426 RPCBPROC_GETVERSADDR(rpcb) = 9;
427
428 rpcb_rmtcallres
429 RPCBPROC_INDIRECT(rpcb_rmtcallargs) = 10;
430
431 rpcb_entry_list_ptr
432 RPCBPROC_GETADDRLIST(rpcb) = 11;
433
434 rpcb_stat_byvers
435 RPCBPROC_GETSTAT(void) = 12;
436 } = 4;
437 } = 100000;
438
439
440
441
442
443
444 <span class="grey">Srinivasan Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
447
448
449 <span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a> RPCBIND Operation</span>
450
451 RPCBIND is contacted by way of an assigned address specific to the
452 transport being used. For TCP/IP and UDP/IP, for example, it is port
453 number 111. Each transport has such an assigned, well-known address.
454 The following is a description of each of the procedures supported by
455 RPCBIND.
456
457 <span class="h4"><a class="selflink" id="section-2.2.1" href="#section-2.2.1">2.2.1</a> RPCBIND Version 3</span>
458
459 RPCBPROC_SET:
460
461 When a program first becomes available on a machine, it registers
462 itself with RPCBIND running on the same machine. The program passes
463 its program number "r_prog", version number "r_vers", network
464 identifier "r_netid", universal address "r_addr", and the owner of
465 the service "r_owner". The procedure returns a boolean response
466 whose value is TRUE if the procedure successfully established the
467 mapping and FALSE otherwise. The procedure refuses to establish a
468 mapping if one already exists for the ordered set ("r_prog",
469 "r_vers", "r_netid"). Note that neither "r_netid" nor "r_addr" can
470 be NULL, and that "r_netid" should be a valid network identifier on
471 the machine making the call.
472
473 RPCBPROC_UNSET:
474
475 When a program becomes unavailable, it should unregister itself with
476 the RPCBIND program on the same machine. The parameters and results
477 have meanings identical to those of RPCBPROC_SET. The mapping of the
478 ("r_prog", "r_vers", "r_netid") tuple with "r_addr" is deleted. If
479 "r_netid" is NULL, all mappings specified by the ordered set
480 ("r_prog", "r_vers", *) and the corresponding universal addresses are
481 deleted. Only the owner of the service or the super-user is allowed
482 to unset a service.
483
484 RPCBPROC_GETADDR:
485
486 Given a program number "r_prog", version number "r_vers", and network
487 identifier "r_netid", this procedure returns the universal address
488 on which the program is awaiting call requests. The "r_netid" field
489 of the argument is ignored and the "r_netid" is inferred from the
490 network identifier of the transport on which the request came in.
491
492 RPCBPROC_DUMP:
493
494 This procedure lists all entries in RPCBIND's database. The
495 procedure takes no parameters and returns a list of program, version,
496 network identifier, and universal addresses.
497
498
499
500 <span class="grey">Srinivasan Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
503
504
505 RPCBPROC_CALLIT:
506
507 This procedure allows a caller to call another remote procedure on
508 the same machine without knowing the remote procedure's universal
509 address. It is intended for supporting broadcasts to arbitrary
510 remote programs via RPCBIND's universal address. The parameters
511 "prog", "vers", "proc", and args are the program number, version
512 number, procedure number, and parameters of the remote procedure.
513
514 Note - This procedure only sends a response if the procedure was
515 successfully executed and is silent (no response) otherwise.
516
517 The procedure returns the remote program's universal address, and the
518 results of the remote procedure.
519
520 RPCBPROC_GETTIME:
521
522 This procedure returns the local time on its own machine in seconds
523 since the midnight of the First day of January, 1970.
524
525 RPCBPROC_UADDR2TADDR:
526
527 This procedure converts universal addresses to transport specific
528 addresses.
529
530 RPCBPROC_TADDR2UADDR:
531
532 This procedure converts transport specific addresses to universal
533 addresses.
534
535 <span class="h4"><a class="selflink" id="section-2.2.2" href="#section-2.2.2">2.2.2</a> RPCBIND, Version 4</span>
536
537 Version 4 of the RPCBIND protocol includes all of the above
538 procedures, and adds several additional ones.
539
540 RPCBPROC_BCAST:
541
542 This procedure is identical to the version 3 RPCBPROC_CALLIT
543 procedure. The new name indicates that the procedure should be used
544 for broadcast RPCs only. RPCBPROC_INDIRECT, defined below, should be
545 used for indirect RPC calls.
546
547 RPCBPROC_GETVERSADDR:
548
549 This procedure is similar to RPCBPROC_GETADDR. The difference is the
550 "r_vers" field of the rpcb structure can be used to specify the
551 version of interest. If that version is not registered, no address
552 is returned.
553
554
555
556 <span class="grey">Srinivasan Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
559
560
561 RPCBPROC_INDIRECT:
562
563 Similar to RPCBPROC_CALLIT. Instead of being silent about errors
564 (such as the program not being registered on the system), this
565 procedure returns an indication of the error. This procedure should
566 not be used for broadcast RPC. It is intended to be used with
567 indirect RPC calls only.
568
569 RPCBPROC_GETADDRLIST:
570
571 This procedure returns a list of addresses for the given rpcb entry.
572 The client may be able use the results to determine alternate
573 transports that it can use to communicate with the server.
574
575 RPCBPROC_GETSTAT:
576
577 This procedure returns statistics on the activity of the RPCBIND
578 server. The information lists the number and kind of requests the
579 server has received.
580
581 Note - All procedures except RPCBPROC_SET and RPCBPROC_UNSET can be
582 called by clients running on a machine other than a machine on which
583 RPCBIND is running. RPCBIND only accepts RPCBPROC_SET and
584 RPCBPROC_UNSET requests by clients running on the same machine as the
585 RPCBIND program.
586
587 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Port Mapper Program Protocol</span>
588
589 The port mapper program maps RPC program and version numbers to
590 transport- specific port numbers. This program makes dynamic binding
591 of remote programs possible. The port mapper protocol differs from
592 the newer RPCBIND protocols in that it is transport specific in its
593 address handling.
594
595 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a> Port Mapper Protocol Specification (in RPC Language)</span>
596
597 const PMAP_PORT = 111; /* portmapper port number */
598
599 A mapping of (program, version, protocol) to port number:
600
601 struct mapping {
602 unsigned int prog;
603 unsigned int vers;
604 unsigned int prot;
605 unsigned int port;
606 };
607
608
609
610
611
612 <span class="grey">Srinivasan Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
615
616
617 Supported values for the "prot" field:
618
619 const IPPROTO_TCP = 6; /* protocol number for TCP/IP */
620 const IPPROTO_UDP = 17; /* protocol number for UDP/IP */
621
622 A list of mappings:
623
624 struct *pmaplist {
625 mapping map;
626 pmaplist next;
627 };
628
629 Arguments to callit:
630
631 struct call_args {
632 unsigned int prog;
633 unsigned int vers;
634 unsigned int proc;
635 opaque args&lt;&gt;;
636 };
637
638 Results of callit:
639
640 struct call_result {
641 unsigned int port;
642 opaque res&lt;&gt;;
643 };
644
645 Port mapper procedures:
646
647 program PMAP_PROG {
648 version PMAP_VERS {
649 void
650 PMAPPROC_NULL(void) = 0;
651
652 bool
653 PMAPPROC_SET(mapping) = 1;
654
655 bool
656 PMAPPROC_UNSET(mapping) = 2;
657
658 unsigned int
659 PMAPPROC_GETPORT(mapping) = 3;
660
661 pmaplist
662 PMAPPROC_DUMP(void) = 4;
663
664 call_result
665
666
667
668 <span class="grey">Srinivasan Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
671
672
673 PMAPPROC_CALLIT(call_args) = 5;
674 } = 2;
675 } = 100000;
676
677 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a> Port Mapper Operation</span>
678
679 The portmapper program currently supports two protocols (UDP and
680 TCP). The portmapper is contacted by talking to it on assigned port
681 number 111 (SUNRPC) on either of these protocols.
682
683 The following is a description of each of the portmapper procedures:
684
685 PMAPPROC_NULL:
686
687 This procedure does no work. By convention, procedure zero of any
688 protocol takes no parameters and returns no results.
689
690 PMAPPROC_SET:
691
692 When a program first becomes available on a machine, it registers
693 itself with the port mapper program on the same machine. The program
694 passes its program number "prog", version number "vers", transport
695 protocol number "prot", and the port "port" on which it awaits
696 service request. The procedure returns a boolean reply whose value
697 is "TRUE" if the procedure successfully established the mapping and
698 "FALSE" otherwise. The procedure refuses to establish a mapping if
699 one already exists for the tuple "(prog, vers, prot)".
700
701 PMAPPROC_UNSET:
702
703 When a program becomes unavailable, it should unregister itself with
704 the port mapper program on the same machine. The parameters and
705 results have meanings identical to those of "PMAPPROC_SET". The
706 protocol and port number fields of the argument are ignored.
707
708 PMAPPROC_GETPORT:
709
710 Given a program number "prog", version number "vers", and transport
711 protocol number "prot", this procedure returns the port number on
712 which the program is awaiting call requests. A port value of zeros
713 means the program has not been registered. The "port" field of the
714 argument is ignored.
715
716 PMAPPROC_DUMP:
717
718 This procedure enumerates all entries in the port mapper's database.
719 The procedure takes no parameters and returns a list of program,
720 version, protocol, and port values.
721
722
723
724 <span class="grey">Srinivasan Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc1833">RFC 1833</a> Binding Protocols for ONC RPC Version 2 August 1995</span>
727
728
729 PMAPPROC_CALLIT:
730
731 This procedure allows a client to call another remote procedure on
732 the same machine without knowing the remote procedure's port number.
733 It is intended for supporting broadcasts to arbitrary remote programs
734 via the well-known port mapper's port. The parameters "prog",
735 "vers", "proc", and the bytes of "args" are the program number,
736 version number, procedure number, and parameters of the remote
737 procedure. Note:
738
739 (1) This procedure only sends a reply if the procedure was
740 successfully executed and is silent (no reply) otherwise.
741
742 (2) The port mapper communicates with the remote program using UDP
743 only.
744
745 The procedure returns the remote program's port number, and the reply
746 is the reply of the remote procedure.
747
748 References
749
750 [<a id="ref-1">1</a>] Srinivasan, R., "Remote Procedure Call Protocol Version 2",
751 <a href="./rfc1831">RFC 1831</a>, Sun Microsystems, Inc., August 1995.
752
753 [<a id="ref-2">2</a>] Srinivasan, R., "XDR: External Data Representation Standard",
754 <a href="./rfc1832">RFC 1832</a>, Sun Microsystems, Inc., August 1995.
755
756 Security Considerations
757
758 Security issues are not discussed in this memo.
759
760 Author's Address
761
762 Raj Srinivasan
763 Sun Microsystems, Inc.
764 ONC Technologies
765 2550 Garcia Avenue
766 M/S MTV-5-40
767 Mountain View, CA 94043
768 USA
769
770 Phone: 415-336-2478
771 Fax: 415-336-6015
772 EMail: [email protected]
773
774
775
776
777
778
779
780 Srinivasan Standards Track [Page 14]
781 </pre>