WL-TCPIP(1)

NAME
WL-TCPIP - Winterp-Lisp client for communicating with WINTERP INET-Domain Eval-Server.

SYNOPSIS
wl-tcpip [-h <hostname>] [-p <port>] [<s-expr>]

DESCRIPTION
--->> FOR DETAILS ON WINTERP SEE /usr/local/winterp/doc/winterp.doc <<---

The WINTERP client program wl-tcpip (stands for Winterp-Lisp) sends the XLISP expression given on its command line to the WINTERP inet-domain server. wl-tcpip hangs until WINTERP has evaluated the s-expression given on wl-tcpip's command-line. After the s-expression is successfully evaluated by WINTERP, wl-tcpip prints to stdout the results of the evaluation, and sets exit status 0. If an evaluation error occurs, an error messsage is output to stderr, and exit status gets set to 127.

By default, WINTERP compiles without the INET-Domain eval server capability. One may enable the TCP/IP socket capability by recompiling WINTERP with the line "#define WINTERP_WANT_INET_SERVER" added to -DWINTERP_WANT_INET_SERVER" in the appropriate makefiles. Even when WINTERP is compiled with this option, the TCP/IP socket will not be enabled by default. This socket may be enabled/disabled via a command line options <<-no_inet_server>> <<-enable_inet_server>> or by setting X resource <<Winterp.enableInetServer>>. Note that the TCP/IP client program, wl-tcpip, is not compiled by default because most WINTERP installations don't need it.

The reason for disabling the TCP/IP socket is due to reasons of security. If you run WINTERP on a known port number, without any security precautions (see inetd.sec(4)), you are giving people open access to your account -- for example, others users will be able to execute programs on your account through the SYSTEM, POPEN, EXP_SPAWN, and EXP_POPEN primitives.

By default, the program wl-tcpip attempts to connect to the WINTERP server through your machine's loopback address, which it assumes is 127.0.0.1. If that is not your loopback address (isn't that IP address standard??), then you may have to specify wl-tcpip will be able to connect to the WINTERP server more quickly if it can get an IP address without having to do a gethostbyname(). That's why I hardcoded the loopback address into wl-tcpip.c... (If this lookup is too slow, and you are running winterp and wl-tcpip locally, you may prefer using the Unix Domain Socket server and wl. )

wl-tcpip will "hang" waiting for WINTERP to finish the evaluation. When the evaluation completes, wl-tcpip prints the results of the evaluation to stdout, and returns exit status 0. If an error occurs in evaluation, an exit status of 128 is returned and the following is printed to stderr:

    "wl-tcpip: an evaluation error occured in WINTERP server."

Finally, if some other error occurs, e.g. network error, unable to bind socket, etc, then exit status of 1 is returned and an eror message will appear on stderr.

If evaluation via wl-tcpip causes an error and *BREAKENABLE* is set (including by selecting "Error Break-Loop" or "Error Trace-Back" in the "WINTERP Control Panel), then wl-tcpip will hang until the break-loop exits, typically because the user has invoked functions Control-D into WINTERP's controlling terminal.

Example: invoking the following in a UN*X command shell:

            wl-tcpip '(load "rc-shell")'

while there is a WINTERP running with an inet domain socket enabled, will cause WINTERP to load the file "rc-shell" and pop up the widgetry associated with loading that file.

NOTE-0: wl-tcpip is not compiled in the WINTERP distribution by default -- cd <winterp-top-dir>/src-client/ and do "cc -O -o wl-tcpip wl-tcpip.c" to compile it. Likewise, the winterp binary itself does not compile with the TCP/IP server feature. To get the TCP/IP server, you must recompile WINTERP after setting "#define WINTERP_WANT_INET_SERVER" in "WANT_INET_SERVER= -DWINTERP_WANT_INET_SERVER" in the appropriate makefiles. after recompilation run winterp with the resource "Winterp.enableInetServer: true".

NOTE-1: By default, wl-tcpip uses the IP address 127.0.0.1 as the hostname. This is the standard "loopback" or localhost address on all UN*X machines I've worked with. If your setup defines hostname "localhost" as a different I.P. address, you may need to specify speed increases in wl-tcpip by replacing "127.0.0.1" in recompiling 'wl-tcpip.c' -- hostname lookup on some machines can be slow. If you are really concerned about the speed of making local connections, between winterp and wl-tcpip , you should consider using wl.

OPTIONS
[-h<hostname>] The optional <hostname> argument allows you to specify the host upon which the WINTERP's eval-server is running. By default, wl-tcpip attempts to connect to a WINTERP server running at IP address 127.0.0.1. See the note above for further details. The hostname may also be specified by setting environment variable WINTERP_INET_HOSTNAME. [-p<port>] The optional <port> argument specifies a different port number for WINTERP's eval-server. The default is 23751; you may want to change the default (along with WINTERP's "Winterp.servicePort" resource) if 23751 is already defined in /etc/services. You will also need to change <port> if you are running multiple instances of WINTERP on the same machine. You may "simultaneously" set the <port> argument for wl-tcpip as well as <<Winterp.servicePort>> resource in winterp by setting environment variable WINTERP_INET_PORTNUM to the desired port number. [<s-expr>] The <s-expr> argument is a single Lisp s-expression to be sent to WINTERP's Lisp listener. If no <s-expr> argument is given, wl-tcpip sends an EOF (==Control-D) to XLISP, which causes WINTERP to terminate. Note that the <s-expr> must be quoted with ['] so that the shell does not attempt to interpret the parentheses as shell commands.

AVAILABILITY:
You may obtain the latest released version of the WINTERP source, documentation, and examples via anonymous ftp from internet host ftp.x.org in directory /contrib/devel_tools, file winterp-2.xx.tar.gz, where 'xx' represents the revision number. Directory /contrib/devel_tools/winterp contains slides, papers, further documentation, contributed code, etc.

An automated reply indicating the locations and status of the latest WINTERP source may be obtained by sending an e-mail message to winterp-source@netcom.com.

CONTACTING OTHER USERS
winterp@netcom.com is the mailing list for WINTERP-related announcements and discussions. To get added/removed from the list, send mail to winterp-request@netcom.com. Please do not send junk mail or subscribe/unsubscribe messages to the mailing list winterp@netcom.com.

For discussions about XLISP, see the USENET newsgroup comp.lang.lisp.x.

SEE ALSO
winterp(1), wl-tcpip(1).

FILES
/tmp/.winterp_serv $WINTERP_UNIX_SOCKET_FILEPATH

AUTHOR
Niels Mayer (mayer@netcom.com)