bunyip@world.std.com (Jason W May) (12/07/90)
Here are two questions concerning differences between Berkeley sockets and SysV TLI: 1) Is there any equivalent of the socket function getpeername() in TLI? Getpeername() determines the address of the remote peer process connected to a given socket. Under TLI, this can be determined by t_connect and t_accept, but if this information is lost, is it possible to figure it out purely from the file descriptor associated with the stream? 2) Under Berkeley sockets, it is possible to connect() a socket associated with a connectionless protocol. This is useful so that it is not necessary to specify the destination address for every datagram that is sent, meaning that read() and write() can be used on the socket. Is it possible to do the same thing under TLI? That is, use t_connect() on an endpoint associated with a connectionless protocol, and treat it as if it were connection-oriented (even to the extent of pushing the tirdwr module onto the stream and using read() and write()). Thanks, Jason (bunyip@world.std.com) P.S. To anyone else who is working with sockets or TLI, I strongly recommend the Stevens book, UNIX Network Programming. No network programmer should be without a copy.