home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / protocol / tcpip / 6048 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.6 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.protocols.tcp-ip
  4. Subject: Re: Determining Port Numbers & The RPC Portmapper
  5. Message-ID: <16561@auspex-gw.auspex.com>
  6. Date: 22 Jan 93 01:30:35 GMT
  7. References: <1993Jan20.162611.25831@walter.bellcore.com> <1jki9vINNmr9@aludra.usc.edu> <1993Jan21.155457.27880@panther.mot.com>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 24
  11. Nntp-Posting-Host: auspex.auspex.com
  12.  
  13. >registerrpc will register a prog#/ver# with portmapper. Portmapper assigns the
  14. >port #.
  15.  
  16. No, it doesn't.  The portmapper doesn't assign port numbers (take a look
  17. at RFC 1057, which describes the portmapper's RPC protocol; there ain't
  18. no call in there that *chooses* a port number and *assigns* it to a
  19. server - there's just a PMAPPROC_SET call to bind an *already-allocated*
  20. port number to a particular program and version number and Internet
  21. protocol number); other code does (for example, the UDP or TCP
  22. implementation, at least in UNIX systems).
  23.  
  24. If all you want to do is just register a port number with the portmapper
  25. as being bound to some particular program and version number for some
  26. particular protocol, you can do so with "pmap_set()".
  27.  
  28. The advantage of using "pmap_set()" rather than "registerrpc()" is that
  29. you don't set up all the rest of the RPC mechanism; given that the
  30. original poster didn't *want* to drag in the rest of the RPC mechanism,
  31. that's probably what they want.
  32.  
  33. >svc_unregister() removes the entry.
  34.  
  35. So does "pmap_unset()", and it also doesn't pester the rest of the RPC
  36. mechanism.
  37.