Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!indetech!schmidt From: schmidt@indetech.com (Douglas C. Schmidt) Newsgroups: comp.unix.questions Subject: obtaining connecting client addr under TLI Message-ID: <1990Aug28.172153.13805@indetech.com> Date: 28 Aug 90 17:21:53 GMT Reply-To: schmidt@indetech.UUCP (Douglas C. Schmidt) Distribution: comp Organization: Independence Technologies, Inc. Fremont, CA Lines: 34 Hi, I've got a quick question regarding the use of TLI. Using BSD sockets it is possible to determine the address (and thereby retrieve the hostname) of a connecting client, i.e. (stripped of error handling, etc), ---------------------------------------- int accept_fd; int server_fd; struct sockaddr_in client_addr; int client_len = sizeof client_addr; struct hostent *hp, *gethostbyaddr (); ... memset ((char *) &client_addr, 0, sizeof client_addr); client_len = sizeof client_addr; accept_fd = accept (server_fd, &client_addr, &client_len); hp = gethostbyaddr (client_addr.sin_addr, client_len, AF_INET); printf ("client name = %s\n", hp->h_name); ---------------------------------------- Can anyone please tell me the equivalent calls to do this using TLI. It isn't clear from the manual how the connecting client address is returned, e.g., via t_bind or t_accept. thanks in advance! Doug -- ____*_ Douglas C. Schmidt schmidt@indetech.com \ / / Independence Technologies {sun,sharkey,pacbell}!indetech!schmidt \/ / 42705 Lawrence Place FAX: 415 438-2034 \/ Fremont, CA 94538 Voice: 415 438-2023