Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!oliveb!tymix!cirrusl!sunseeker!pete From: pete@sunseeker.UUCP (Peter R. Carpenter) Newsgroups: comp.protocols.tcp-ip Subject: Question about echo-udp Summary: problem getting to echo udp server Message-ID: <801@cirrusl.UUCP> Date: 3 Aug 89 17:59:44 GMT Sender: news@cirrusl.UUCP Reply-To: pete@mv4 (Pete Carpenter) Organization: CIRRUS LOGIC Inc. Lines: 22 I've got this little program to implement echo using tcp/udp-ip. I call gethostbyname(), and getservbyname("echo","udp") and get back reasonable hostent and servent structures, except that the h_addr in hostent for various machines is always a single character 'H'. If I call getservbyname() with echo/tcp or other "well known" services it fails. Its a Sun/NFS system, and there is a note in /etc/services which says the file is ignored when yellow pages are operating. I'm not concerned with yp's or sun-ism's at this point in time. Call socket() with DGRAMs, and connect(), return OK. Am I really connected? I get a string from stdin, and write it to the socket, sleep for a few to let things percolate. Write length is correct, but the read off the socket returns -1, Nobody home? A second read returns 0. Any ideas? --- Pete Carpenter, Cirrus Logic Inc, 1463 Centre Pointe Dr, Milpitas, CA 95035 {amdahl,ames,apple,bunker,pyramid}!oliveb!tymix!cirrusl!pete 408-945-8300 ---------------------------------------------------------------------------