home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / protocol / tcpip / 6047 < prev    next >
Encoding:
Text File  |  1993-01-21  |  3.2 KB  |  87 lines

  1. Newsgroups: comp.protocols.tcp-ip
  2. Path: sparky!uunet!walter!espresso!maritza
  3. From: maritza@espresso.bae.bellcore.com (Maritza Ramirez)
  4. Subject: Re: Determining Port Numbers & The RPC Portmapper
  5. Message-ID: <1993Jan22.004203.5030@walter.bellcore.com>
  6. Sender: news@walter.bellcore.com
  7. Nntp-Posting-Host: espresso.bae.bellcore.com
  8. Organization: Bell Communications Research
  9. References: <1993Jan20.162611.25831@walter.bellcore.com> <1jki9vINNmr9@aludra.usc.edu> <1993Jan21.155457.27880@panther.mot.com>
  10. Date: Fri, 22 Jan 93 00:42:03 GMT
  11. Lines: 74
  12.  
  13. In article <1993Jan21.155457.27880@panther.mot.com>, ronf@panther3.panther.mot.com (Ron Feigen) replies:
  14. |> 
  15. |> [text deleted, see earlier posting]
  16. |> 
  17. |> 
  18. |> registerrpc will register a prog#/ver# with portmapper. Portmapper assigns the
  19. |> port #.  svc_unregister() removes the entry.  pmap_getport() looks up a prog#/
  20. |> version# on a host.  You must of course know the host name, prog# and version#
  21. |> in advance.  Be careful about having the same prog# with different version #s.
  22. |> Portmapper returns the port of a program with a match on prog #, but will give
  23. |> you the latest (I believe) version # if it doesn't find an exact match.
  24. |> 
  25. |> 
  26. |> [text deleted, see earlier posting]
  27. |> 
  28. |> Ron
  29. |> 
  30.  
  31.  
  32. I was just wondering if it is possible to connect and send commands to the 
  33. RPC portmapper without using RPC calls (svc_xxx or pmap_xxx) but tli or 
  34. socket calls. That approach of connecting and sending commands is possible
  35. when working with some services. For example, I have some source code that 
  36. sends commands to an ftp server after establishing a connection with it on 
  37. its well known port 21. That program follows the same approach as when we 
  38. use a telnet connection to send control commands to ftp (see example).
  39.  
  40. --o--
  41.  
  42. Example:
  43.                     ___________________ ftp's well known port
  44.                    /
  45. $ telnet itsname 21
  46. Trying 128.96.133.64 ...
  47. Connected to itsname.
  48. Escape character is '^]'.
  49. 220 itsname FTP server ready.  _____________ ftp server accepts connection
  50. USER maritza
  51. 331 Password required for maritza.
  52. PASS mypass123
  53. 230 User maritza logged in.
  54. HELP
  55. 214-The following commands are recognized (* =>'s unimplemented).
  56.    USER     PORT     RETR     MSND*    ALLO     DELE     SITE*    XMKD     CDUP
  57.    PASS     PASV     STOR     MSOM*    REST*    CWD      STAT*    RMD      XCUP
  58.    ACCT*    TYPE     APPE     MSAM*    RNFR     XCWD     HELP     XRMD     STOU
  59.    REIN*    STRU     MLFL*    MRSQ*    RNTO     LIST     NOOP     PWD
  60.    QUIT     MODE     MAIL*    MRCP*    ABOR     NLST     MKD      XPWD
  61. QUIT
  62. 221 Goodbye.
  63. Connection closed by foreign host.
  64. $
  65.  
  66. Note that when using this approach, the commands that the ftp server
  67. recognize are the low level commands described on the RFC959 (e.g.,
  68. PORT, PASV, RETR, STOR).
  69.  
  70. --o--
  71.  
  72. The question is: Is it possible to connect and send commands to the RPC 
  73. portmapper using tli or socket calls ?
  74.  
  75. The protocol specifications for the portmapper (appendix A of the RFC1057) 
  76. does not say anything about the low level commands that the portmapper 
  77. recognizes.
  78.  
  79. Does anyone knows which low level commands must be given to the portmapper
  80. server after a connection is established to (1) register an application, 
  81. and (2) get the assigned port from a client application ?
  82.  
  83.  
  84. Thanks,
  85.  
  86. Maritza
  87.