Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site aplvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decuac!aplvax!ded From: ded@aplvax.UUCP (Don E. Davis) Newsgroups: net.unix,net.unix-wizards Subject: A socket by any other name... Message-ID: <173@aplvax.UUCP> Date: Wed, 23-Oct-85 21:53:08 EDT Article-I.D.: aplvax.173 Posted: Wed Oct 23 21:53:08 1985 Date-Received: Fri, 25-Oct-85 04:09:59 EDT Reply-To: ded@aplvax.UUCP (Don E. Davis) Organization: JHU/Applied Physics Lab, Laurel, MD Lines: 31 Keywords: socket Xref: watmath net.unix:6014 net.unix-wizards:15415 How in the world do I name a socket? Bind's just not working for me. Let me back up and start at the beginning. I wanted to allow one process to communicate with serveral others. I could have done this with pipes, but this seemed like a perfect opportunity to get acquainted with sockets. The SOCK_DGRAM type seemed suitable for the job. All I had to do was create two unconnected sockets of that type and wail away. Or so I thought. I stuck with AF_INET domain sockets to avoid any bug problems. And indeed, creating a SOCK_DGRAM socket was easy. And the "sendto" and "recvfrom" functions seem straightforward enough if only I can figure out who the "to" is. I tried to bind the sockets with the internet address of my machine and a port number, but if I use any other port number than zero, the bind is rejected on access grounds. I am not attempting to use any port number already allocated in /etc/services. Surely, one does not need a setuid-to-root program merely to create and use sockets? What am I doing wrong? Does anyone have some code examples implementing socket connections they could send me? The documentation isn't too helpful. Thanks. -- Don Davis JHU/APL ...decvax!harpo!seismo!umcp-cs!aplvax!ded ...rlgvax!cvl!umcp-cs!aplvax!ded