[comp.unix.ultrix] sockets on DECstation 3100

dmyers@uswat.uswest.com (Dave Myers) (01/10/91)

I have never built an appliation using sockets.  I read through the ULTRIX
Interprocess Communication Primer and tried to get some simple programs to
work.  However, I found that the structure definition for sockaddr in
/usr/include/sys/socket.h is quite different from the one used in the
examples.  I added an entry into the /etc/services file.  I then tried to
do a getservbyname call to retrieve it, but that failed.  I tried the same
call on some other entries, and some, like ftp, succeeded, while others,
like finger, failed.  I would appreciate any help pointing me in the right
direction on this problem, or provide me with a simple working server/client
program pair.

thanks,

Dave Myers
dmyers@uswest.com

fkittred@bbn.com (Fletcher Kittredge) (01/12/91)

In article <14236@uswat.UUCP> dmyers@uswat.uswest.com (Dave Myers) writes:
>examples.  I added an entry into the /etc/services file.  I then tried to
>do a getservbyname call to retrieve it, but that failed.  I tried the same
>call on some other entries, and some, like ftp, succeeded, while others,
>like finger, failed.  I would appreciate any help pointing me in the right
>direction on this problem, or provide me with a simple working server/client
>program pair.

Are you running YP or BIND/Hesiod?  If so, then /etc/services may be a red
herring and you are getting whatever distributed database is served up.  The
file you want to check is /etc/svc.conf.
>
>thanks,

Your welcome, (;-)
>Dave Myers
>dmyers@uswest.com
Fletcher Kittredge
Platforms and Tools Group, BBN Software Products
10 Fawcett Street,  Cambridge, MA. 02138
617-873-3465  /  fkittred@bbn.com  /  fkittred@das.harvard.edu