home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17071 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.8 KB  |  51 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!pipex!warwick!sunserver1.aston.ac.uk!uhura!evansmp
  3. From: evansmp@uhura.aston.ac.uk (Mark Evans)
  4. Subject: Re: looking for useful TCP program
  5. Message-ID: <1992Nov18.121931.14012@aston.ac.uk>
  6. Sender: usenet@aston.ac.uk (Usenet administrator)
  7. Nntp-Posting-Host: uhura
  8. Organization: Aston University
  9. X-Newsreader: TIN [version 1.1 PL7]
  10. References: <Bxt98z.6I0@cs.bham.ac.uk>
  11. Date: Wed, 18 Nov 1992 12:19:31 GMT
  12. Lines: 37
  13.  
  14. Reuben O Wells (row@cs.bham.ac.uk) wrote:
  15. : Hi all,
  16. : I am looking for a couple programs, one which takes a hostname and optionally
  17. : a port number, reads data from stdin and the other which runs on the remote
  18. : machine writes all data received on a specified port to stdout.
  19. : Why ? I don't really want to run NFS and want to be able to do remote
  20. : backups, I do have the TCP/IP suite installed and would like to use 
  21. : it! For example:
  22. : on my local machine ...
  23. : tar -cvf / - | senddata <hostname> <port>
  24. : on the remote machine ...
  25. : recdata <port> > /dev/nrst8
  26.  
  27. The code to do this is fairly trivial.
  28. Just one point run the recpdata program, which you could write as
  29. recdata <file> <port>, first.
  30. It should create a socket
  31. bind it to <port>
  32. do an accept
  33. loop until EOF reading from the socket and writing to the output.
  34.  
  35. (it might be better to set this up as a well known service, run by inetd,
  36. then that will handle to socket details and you can use something 
  37. equivalent to cat > /dev/whatever in inetd.conf)
  38.  
  39. For the other end, connect to the socket, read from stdin, write to socket
  40. Until EOF on stdin.
  41.  
  42. --
  43. -------------------------------------------------------------------------
  44. Mark Evans                                   |evansmp@uhura.aston.ac.uk
  45. +(44) 21 TBA  (Home)                         |evansmp@cs.aston.ac.uk
  46. +(44) 21 359 6531 x4039 (Office)             |
  47.