home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 21875 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  2.8 KB

  1. Path: sparky!uunet!olivea!gossip.pyramid.com!pyramid!infmx!godzilla!bobert
  2. From: bobert@informix.com (Robert Murphy)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: MacTCP - getservbyname code, anyone?
  5. Message-ID: <bobert.727567325@godzilla>
  6. Date: 20 Jan 93 22:02:05 GMT
  7. References: <bobert.727074187@godzilla> <1j73beINN78i@stealth.usc.edu>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 52
  11.  
  12. davidp@stealth.usc.edu (David Peterson) writes:
  13. >In article <bobert.727074187@godzilla>, bobert@informix.com (Robert Murphy) writes:
  14. >|> On Suns, and I presume other Unix boxes, there is a scheme which allows
  15. >|> text names to be associated with port numbers.  The basic scoop is
  16. >|> that if you have the "foo" service and you want to bind it to port 4785,
  17. >|> then you put an entry in the /etc/services file which lists the service
  18. >|> name (e.g. "foo"), the port number, and what underlying protocol this
  19. >|> service uses (TCP, UDP, etc.)
  20. >|> 
  21.  
  22. >There is nothing like that on the mac, because... the mac implements no
  23. >services. What you actually get on a unix machine is the port number that
  24. >that specific machine uses for the service -- many of which have become
  25. >defacto standards.
  26.  
  27. The Mac OS itself may not implement any TCP/IP-based services, but programs
  28. running under Mac OS certainly do.  There is a current discussion in
  29. comp.sys.mac.system about running a Unix-style time server on a Mac running
  30. MacTCP 1.1.1 so that Suns on the network can pick up the time from the
  31. Mac.  I've worked on other TCP/IP-based services implemented on a Mac,
  32. including a facility for broadcasting financial information (stock/commodity/
  33. option tickers, Dow Jones Scrolling News, etc.) over a network.
  34.  
  35. Anyway, the point of having a services file is that you have one version
  36. of the file, which relates service name to TCP or UDP port number, and
  37. then someone from MIS runs around and sticks copies on all the Unix
  38. boxes, Macs, and PC's.  That way, every machine on the network, whether
  39. it provides *or uses* a TCP/IP-based service, knows what port to use
  40. for that service without having the port number hardwired into the
  41. applications.
  42.  
  43. There is no technical reason someone couldn't implement a services facility
  44. on the Mac; it's very similar to doing a hosts facility, which is a feature
  45. of MacTCP 1.1.1.  The only reason I can figure that there's no services
  46. facility is just that nobody has done it (that I can tell, anyway).
  47.  
  48. >You could fake it though and take the ypservices table from some unix box
  49. >and write some text processing routine on your mac to do what you want.
  50.  
  51. I was hoping somebody had already done that... oh, well...
  52.  
  53. >Check out the GUSI code (I'm not sure where it lives, ask archie), it does
  54. >something like that.
  55.  
  56. Thanks!  (I don't have access to archie from Informix, but I'll check it
  57. out on the WELL.)
  58.  
  59. >-dave.
  60.  
  61. Regards,
  62. Bob Murphy
  63. bobert@informix.com
  64.