datagram sockets, inetd, and getpeername

Darin Johnson darin at nova.laic.uucp
Fri Apr 7 07:24:05 AEST 1989


A quick question here.  I am running SunOS 4.0.  I want to
run a server program from under inetd.  The server uses
UDP.  Inetd starts up the server ok.  The first thing I do
is try to find out who I got a connection from.  However, when
I call getpeername(), I get errno=57, indicating that the socket
is not connected.  This makes sense, because UDP is connectionless.
How then would I go about finding out who sent me data so I can
send some back?  (I would use UDP, but I need record marking)

If you have answers, I prefer email, since I almost never read
this group.

Darin Johnson (leadsv!laic!darin at pyramid.pyramid.com)
	Can you "Spot the Looney"?



More information about the Comp.unix.questions mailing list