2 * On socket-only systems, fromhost() is nothing but an alias for the
3 * socket-specific sock_host() function.
5 * On systems with sockets and TLI, fromhost() determines the type of API
6 * (sockets, TLI), then invokes the appropriate API-specific routines.
8 * Diagnostics are reported through syslog(3).
10 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
14 static char sccsid
[] = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
17 #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
19 /* System libraries. */
21 #include <sys/types.h>
22 #include <sys/tiuser.h>
29 /* fromhost - find out what network API we should use */
31 void fromhost(request
)
32 struct request_info
*request
;
36 * On systems with streams support the IP network protocol family may be
37 * accessible via more than one programming interface: Berkeley sockets
38 * and the Transport Level Interface (TLI).
40 * Thus, we must first find out what programming interface to use: sockets
41 * or TLI. On some systems, sockets are not part of the streams system,
42 * so if request->fd is not a stream we simply assume sockets.
45 if (ioctl(request
->fd
, I_FIND
, "timod") > 0) {
52 #endif /* TLI || PTX || TLI_SEQUENT */