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