SLIRP(1)

NAME
slirp - TCP/IP emulator

SYNOPSIS
slirp [options|commands]
slirp help
slirp "help cmd"

DESCRIPTION
Slirp is a TCP/IP emulator which turns an ordinary shell account into a (C)SLIP/PPP account. This allows shell users to use all the funky Internet applications like Netscape, Mosaic, CUSeeMe, etc.

Slirp is copyright (c) 1995 Danny Gasparovski. All rights reserved. See the section COPYRIGHT for details.

This manpage is organized as follows. First, basic usage is described very briefly. This is followed by details of configuration files, commands, and command-line options. Several sections discussing technical issues (special addresses, port redirection, baudrate setting) are next, followed by answers to frequently-asked questions and common problems. Contact information, acknowledgements and the copyright notice are at the end.

Please read this manpage thoroughly before reporting problems!

USAGE
To run Slirp, simply type:
    slirp (or whatever the full path to Slirp is). That's it. Now you activate your SLIP/PPP software, and start your applications.

All you have to remember is this: Once you run Slirp, your shell account now looks exactly like a SLIP/PPP account (with some limitations of course). Any documentation that you have telling you how to connect to a SLIP/PPP account is completely valid for Slirp as well.

To quit Slirp you simply kill your SLIP/PPP software and type five 0's (zeroes), with a 1 second gap between each zero. Slirp will then exit and you will be back at your shell prompt.

You can also "disconnect" Slirp by typing five 1's (one's), with a 1 second gap between each. This will disconnect Slirp from your shell's terminal and put Slirp in the background. Later, you can type
    slirp -l 0 to "reconnect" Slirp again.

Quick note for PDA users: If you set SLIRP_TTY to the tty connected to your PDA (Palm, POSE emulator, etc.), Slirp will use that tty for communication. You can use PPP without full masquerading, although you will be subject to the standard Slirp constraints. You may need to experiment to find the correct baud rate. Start with 19200 for Palms. If Slirp was not compiled with DO_CFSETSPEED, you'll need to set the speed on the tty manually. Use an appropriate variant of "stty 19200 < /dev/pilot" after starting slirp.

CONFIGURING SLIRP
Slirp can be configured in 3 different ways: the command line, the configuration files, and "on-the-fly" configuration by telnet-ing to 10.0.2.0 and entering the commands there (see "SPECIAL ADDRESSES," below).

The configuration file is located in your home directory (~) and is called ".slirprc", hence the path to your configuration file is "~/.slirprc".

Options which can appear in a configuration file can also be given on the command line. E.g., If your .slirprc file looks like the following:
    redir 5022 21
    redir X you can achieve the same thing by running Slirp as:
    slirp "redir 5022 21" "redir X" (Notice the quotes, they ARE significant). The reverse is also true. E.g., if you run slirp as:
    slirp -P -b 14400 you can create your .slirprc file too look like the following:
    -P
    -b 14400 (Notice that only ONE command per line is allowed in configuration files). The 2 types of options can also be mixed. For example:
    In .slirprc:
        -P
        -b 14400
        redir 5022 21
    Command line:
        slirp -P -b 14400 "redir 5022 21" Note that on the command line, any command/option that does not begin with a '-' or '+', and has spaces in it, MUST be enclosed in quotes. E.g., The following are all legal:
    slirp -P "redir udp 5022 25" -vj -b 14400
    slirp "ppp" "baudrate 14400"
    slirp ppp "baudrate 14400" (Notice that even though "ppp" does not begin with a '-' or '+', it does not need to be enclosed in quotes because it has no spaces in it)

The following are NOT legal:
    slirp baudrate 14400
    slirp "-b 14400" (Because "-b" starts with a '-' you must NOT enclose it in quotes.) Easy, eh?

Note: Whenever Slirp expects an IP address as an argument (E.g., in the command "redir") and the IP address argument is not given, then the default used is different depending on where the command appeared; if it was in ~/.slirprc then the default is 10.0.2.15; if it was in a telnet 10.0.2.0, then the IP address used is the IP address from where the telnet 10.0.2.0 connection was made. For example, if you have a LAN at home and telnet to 10.0.2.0 from one of the hosts and issue a "redir" command, Slirp will use the IP address of the host from where you made the telnet 10.0.2.0 connection. Also, if you use an IP address on your PC other than 10.0.2.15, you should include it as an argument whenever Slirp expects it, for example with the redir command:
    redir 5555 your.ip.address:5555

A few notes on configuration:

    *   You should have "ppp" or "-P" before any PPP options (because when Slirp parses -P or ppp, it will initialize all related fields, hence clearing anything that was parsed before it).

    *   Upon startup, the configuration is done in this order:

        1)  ~/.slirprc-N (if using Load-balancing or Link-resumption)

        2)  ~/.slirprc

        3)  Command-line options

        This is important because, for example, if you have "initiate-options" (a PPP option) in ~/.slirprc-0, and you run slirp with -P, "initiate-options" will not be valid, because -P will clear the fact that you want options initiated by Slirp (remember, -P should always come before any PPP options).

COMMANDS AND OPTIONS
Slirp includes an "online-help" facility. To get a list of commands accepted by Slirp give it the command "help". I.e, you can either run Slirp from your shell prompt as:
    slirp "help" or once Slirp is running, telnet to 10.0.2.0 and type:
    help To get a brief description of each command simply type "help COMMAND". E.g.:
    slirp "help baudrate" from the command line, or
    help baudrate in telnet to 10.0.2.0.

In the following descriptions, items within square brackets are optional. "Usable" refers to where it can be used, ie: "command-line/config-file", "telnet", or "anywhere" (which means it can appear in either command-line/config-file or be given via telnet). "Command-line" gives the command-line equivalent, where applicable.

redir X [start N] [ADDR][:DISPLAY[.SCREEN]]
    Redirect a port for use with the X Window System.
    Usable: anywhere
    Command-line: -X
    Options:

        start N
            Tell slirp to start looking for free ports starting from N. eg: if N = 2, slirp will try to grab port 6002 then 6003 etc. this is useful for sites which sometimes run their own X server and you don't want to nab their port 6000, which they would naturally expect.

        ADDR
            Our home ip address, or the address where the X server is (if you have a LAN at home to connect more than one machine to the net) (default 10.0.2.15 when in ~/.slirprc, the source IP address when in command-line).

        DISPLAY
            Which display to redirect to (default :0).

        SCREEN
            Which screen to redirect to (default .0).

    Example: redir X 10.0.2.15:0.0

    Note: This will print the command needed to enter into each shell from where you launch your X apps.

    See also: show X.

show X
    Show the command that needs to be given to your shell for any X port that has been redirected (in case you forget).

    Usable: telnet

    Example: show X

    Note: This is useful if you forget the command to give to your shell for X redirection.

    See also: redir X, log start.

redir [once|time] [udp|tcp] PORT [to] [ADDRESS:]LPORT
    Redirect host port to local port using a selected protocol.
    Usable: anywhere
    Options:

        once
            Only allow one redirection [TCP only]

        time
            Allow redirection to time out [UDP only]

        udp Redirect a UDP port

        tcp Redirect a TCP port [default]

        PORT
            Port to use on host system

        ADDRESS
            Address of your home machine [default 10.0.2.15]

        LPORT
            Port to redirect host port to on local system

    Example: redir tcp 5021 to 21
    Allow users to ftp to your local machine using your host's port 21. (ftp your.hosts.name 5021).

    Note: if this command is in your .slirprc file and no address is specified, it will assume that your local IP address is 10.0.2.15. If you enter the command from the slirp control telnet IP it will use the IP address you are accessing with.

baudrate N
    Controls the allocation of time to communications across your serial link. Higher values generally use more of the available bandwidth to your modem. This is _only_ an internal control value and does _not_ change the physical settings for the host port or modem.
    Usable: anywhere
    Command-line: -b

    Example: baudrate 14400

    Note: higher numbers generally allow better transfer rates for ftp sessions, but interactive sessions could become less responsive. the optimum value is *JUST* when ftp sessions reach maximum throughput, but this can be hard to find (especially on compressing modems) so you should choose the maximum throughput you would expect from your modem.

special|control|host addr ADDRESS
    Set ip address aliases and others for slirp.
    Usable: anywhere
    Options:

        special address
            Set the network ip alias for slirp

        control address
            Only allow access to slirp control address from ADDRESS.

        host address
            Tell slirp the IP address of the host it's running on. Use this only if slirp can't properly find the host's IP address.

    Example: special address 10.0.3.0

    Note: The ADDRESS for special must end in 0 (zero) and other addresses are classed from this. The default special address is 10.0.2.0 giving the following defined IP's:
            10.0.2.0 slirp control telnet IP
            10.0.2.1 slirp exec IP
            10.0.2.2 slirp host alias
            10.0.2.x add [pty]exec optional address

add [pty]exec PROGRAM:[ADDRESS:]PORT
    Set program to execute on host when local machine attempts to connect to ADDRESS at port PORT.
    Usable: anywhere
    Options:

        exec
            Establish binary connection to program in the style of inetd.

        ptyexec
            Establish telnet connection to program using telnetd helper application under a pseudo-terminal.

        PROGRAM
            Program to exec

        ADDRESS
            Optional address

        PORT
            Port

    Example: add ptyexec csh:55
    A telnet connection to the slirp exec IP (default 10.0.2.1) will start and connect you directly to the csh program on the host. (telnet 10.0.2.1 55).

    Example: add exec nntpd:10.0.2.3:119
    A program that attempts to open port 119 at address 10.0.2.3 will be connected to the nntpd program.

    Note: The use of the ptyexec form requires the slirp.telnetd helper application be available on your path. Also note that ADDRESS must be of the form SPECIAL_ADDRESS.xx (10.0.2.xx by default).

[no]compress
    Force startup mode for slirp to SLIP or CSLIP. This overrides the default automatic mode determination.

    Example: nocompress
    Start in SLIP mode.

    Example: compress
    Start in CSLIP mode.

    Note: The default method of operation generally performs well. You should only have to use this command if you find that your host and local system are failing synchronize the connection type.

mtu N
    Controls the size of the IP packets sent across the serial IP link. Valid values are <= 1500.

    Example: mtu 1500 Set the mtu to its largest allowable size.

    Note: Larger values generally improve the performance of graphics web browsers and ftp transfers across the serial link, at the expense of interactive performance. The default value of 552 seems to be a reasonable compromise for connections at 14400 baud.

shell PROGRAM
    Set program to execute on EXEC IP default telnet port (23).

    This is the same as
            add ptyexec PROGRAM:23 Note: By default slirp connects /bin/sh to the exec IP telnet port.

help [COMMAND]
    Show a brief list of available commands, or more information on the named command.

remove [pty]exec PROGRAM:[ADDRESS/]PORT
    Reverse the effect of "add [pty]exec". see "add [pty]exec" for the options etc.

    Note: you must enter the options exactly as you entered it in add [pty]exec.

    **This description is incomplete.**

echo [on|off]
    Turn echo on or off, depending on how your client behaves. "echo" by itself will show whether echo is currently on or off.

kill N
    Kill the session which has a Socket no. of N. to find the Socket no. of a particular session, use the "stats socket" commands. See "stats" below.

    Note: It is recommended you use "close N" instead, as this merely wipes out the session, whereas "close N" closes it properly, as a good little tcpip-emulator should :)

    "kill -1" shouldn't be used, it will kill the first session it finds with -1, which usually is the command-line connection.

close N
    Close the session which has a Socket no. of N. same as "kill N", but closes it session gracefully. See "kill N".

stats [ip|socket|tcp|vj|udp|mbuf|tty|alltty|others?]
    Show statistics on the given argument.
    Options:

        ip  Show ip statistics.

        socket
            Show statistics on the currently active sockets. Use this to find out which sessions to close/kill as it will also show the FD of the session.

        tcp Show tcp statistics (packets sent, received, etc).

        udp Same as tcp but for udp.

        mbuf
            Show how many mbufs were allocated, are in use, etc. If the modem is idle, and there are more than 1 mbufs on the used list, it suggests an mbuf leak.

[pty]exec PROGRAM
    This will execute PROGRAM, and the current command-line session will cease to exist, taken over by the PROGRAM. ie: when the program exits, you will not get the command-line back, the session will (should) close.

socket [PORT,PASSWORD]
    Create a Unix-domain socket and listen() for more interfaces to connect. This is also needed for restarting. Give the arguments PORT,PASSWORD if you wish to use Internet-domain sockets instead of UNIX-domain sockets.

log start
    Log all the startup output to the file .slirp_start.

add emu SERVICE[:TYPE_OF_SERVICE] [lport:]fport
    Tell slirp to emulate SERVICE when on port lport/fport.
    Options:

        SERVICE
            Can be: ftp, ksh, irc, none.

        TYPE_OF_SERVICE
            Can be: throughput, lowdelay.

        LPORT
            Can be given if that service needs emulation for, say, servers.

    Example: add emu ftp 8021
    If you wish to ftp to somewhere on port 8021.

    Example: add emu ftp 8021:0
    If your home ftp server is on port 8021. NOTE: this does NOT mean if you redirect port 8021 for your ftp daemon, it refers the the port AT HOME at which ftpd is listening to.

    Example: add emu none:lowdelay 8000
    If you telnet somewhere on port 8000, and you wish those packets to go on the fastq (ie: so they have a higher priority than, say, ftp packets). This tells slirp that any packets destined for port 8000 will not have any emulation, but it will be set IPTOS_LOWDELAY.

dns DNS_IP
    Give this to slirp if you want to use 10.0.2.3 as an alias for DNS, AND slirp guesses wrong for the DNS on startup.

TECHNICAL TOPICS

Special Addresses
All addresses of the form 10.0.2.xxx are special to Slirp (this can be changed with the "special addr" command). The following is a description of what each of the addresses mean:

10.0.2.0
    This is the Slirp "on-line" configuration address. When you telnet to 10.0.2.0 you can close connections, configure Slirp, redirect ports, etc. all while Slirp is running. Please read the section "CONFIGURING SLIRP" for details on how to use this.

10.0.2.1
    This is the address used by Slirp to execute programs. For example, if you give Slirp the command "add exec /bin/ls:23", when a connection is made to 10.0.2.1 on port 23, Slirp will execute /bin/ls and redirect the output to that connection. E.g., with "add exec /bin/ls:23", if you telnet to 10.0.2.1 (telnet uses port 23) you will get a list of files in the directory Slirp was started. Another example could be "add exec /path/to/nntpd:119". Now you can tell your News reader to use 10.0.2.1 as the News host and it will actually connect to the running program "nntpd".

10.0.2.2
    This is an alias for the remote host. When you connect to 10.0.2.2 you will actually connect to the host Slirp is running on. This is useful if your shell account can be on different hosts, 10.0.2.2 will always mean the host Slirp is running on.

10.0.2.3
    This is an alias for your DNS. Slirp will try to figure out your DNS address and all data sent to 10.0.2.3 will be redirected to your DNS address, so you can tell your TCP/IP software to use 10.0.2.3 as your DNS. This can also be useful if your run Slirp from multiple hosts; you don't need to change your DNS for each host.

10.0.2.15
    This is the address recommended by Slirp to be used on your PC. However this is merely a suggestion, Slirp does not care what address you use.

Port Redirection
Port redirection is an important concept in TCP/IP emulators because it allows other people to connect to your PC, as well as allowing some programs to work which normally would not work.

How do I Redirect a Port?
First you need to realize that under Slirp, nobody on the Internet can address your PC directly, since you do NOT have an IP address that anybody else can see. The ONLY way they can contact you is through the remote host (where Slirp is running).

What has this got to do with Port redirection? Lots. For other people on the Internet to be able to connect to your PC, Slirp needs to listen for connections on a specific port on the remote host, then "redirect" this connection and have it connect back to your PC.

For example, say you are running an FTP server on your PC and you want others to be able to connect to it, get files, upload files, etc. What you need to do is pick a port number, any port number above 1024 (for security reasons), and tell Slirp that any connections on that port are really connections to your FTP server. You do this with the "redir" command.

For this example, say you choose 5555 as the port to redirect (this can be ANY number, provided nobody else is using it). You simply give Slirp the command:
    redir 5555 21 The second argument, 21, is the port that is used by FTP. You could have also used the command:
    redir 5555 ftp and Slirp will figure out that "ftp" means 21. This command is basically telling Slirp "any connections to this host (where Slirp is running) on port 5555 are really connections to the home PC on port 21 (the port used by the FTP server)".

Now you simply tell others to connect to the Remote Host (where Slirp is running), which IS visible on the Internet, on port 5555 and they will be connected to your FTP server.

This same technique is used when a program uses a specific port for communication, for example Kali, an IPX emulator over TCP/IP allowing users to run IPX games over the Internet. Kali uses UDP port 2213 for communication so for others to be able to send a packet to your PC on UDP port 2213 you need to do the following:
    redir udp 2213 2213 All packets now destined for the Remote Host on UDP port 2213 will be sent to your PC on port 2213.

Common Port Redirections
Here is a list of programs which need a port redirection to work. YOUR_PC_ADDRESS refers to the IP address you assigned to your PC. If it is not supplied, 10.0.2.15 is assumed.

Kali
    redir udp 2213 YOUR_PC_ADDRESS:2213
    (Note: you MUST also set your PC's IP address to the same IP address as the Remote Host (where Slirp is running))

IPhone
    redir udp 22555 YOUR_PC_ADDRESS:22555

StreamWorks
    redir udp 8000 YOUR_PC_ADDRESS:8000
    (the 8000 is configurable)

PowWow
    redir tcp 13223 YOUR_PC_ADDRESS:13223

WebPhone
    redir tcp 21845 YOUR_PC_ADDRESS:21845
    redir udp 21845 YOUR_PC_ADDRESS:21845
    (Note: WebPhone uses BOTH tcp and udp port 21845. In addition, you probably need to set your PC's address to the same IP address as the RemoteHost in order to get full functionality)

Please let me know of other programs which require redirection like the above. See "GETTING HELP" for details on how to contact me.

Setting The baudrate Option
Slirp's "baudrate" option has caused some confusion. This section will explain exactly what it's for and how to use it.

When sending data over the modem to your PC, Slirp needs to know how much data it can send over without "saturating" the link. If Slirp was to send as much data as it could, the Operating System would buffer a LOT of it - 20k is not uncommon. This could severely "lag" any telnet connections if you happen to be FTP-ing a file at the same time. This is because when you type a character, you will not see that character on the screen until the the other end sends you the "echo", so if there is 20k worth of data buffered you will need to wait until 20k of data is received before you see that character on your screen.

To counter this, Slirp uses the "baudrate" option to limit the amount of data it sends over the link to prevent the Operating System from buffering too much of it. So if you give Slirp a "baudrate" of 14400, Slirp will send data at a rate of 14400 Baud modem (with no compression).

In general, the baud rate at which the connection was made should be the "baudrate" you give to Slirp. So, for example, if you connected at 14400 Baud, you should give Slirp the option "baudrate 14400". However, since most modems today do compression (v.42bis), it is very difficult for Slirp know how much data to send to keep the link "full", yet prevent too much buffering by the Operating system.

Therefore you should choose a "baudrate" appropriate to your needs: if you use telnet a lot while downloading compressed files, you should set your "baudrate" to the same as the CONNECT speed of your modem. Downloading compressed files should not suffer, and telnet sessions will be far more responsive. However, sending text over the modem will not be as fast, because your modem will compress the data and send it faster than Slirp expects. Giving a "baudrate" the same as the CONNECT speed will effectively turn off modem compression.

If you do not use telnet very much, you should set your "baudrate" to the maximum theoretical speed your modem can do. For example, if you connect at 14400 and use v.42bis compression, which can compress up to 4x, you should set your "baudrate" to 14400*4 = 57600. This will ensure any compressible data will get compressed, and a maximum throughput will be attained, at the expense of telnet sessions which will be almost unusable if you happen to be downloading files at the same time.

Note however that you can change the "baudrate" setting at any time. Simply telnet to 10.0.2.0 and enter "baudrate XXX" and Slirp will change the rate at which data is sent. This can be useful for example if you're downloading a lot of compressed files, but in the middle of the download you want to read mail. Simply change the "baudrate" to the CONNECT speed, and when you're finished, change it back to the maximum theoretical speed.

Also, keep in mind that the "baudrate" is also used for other calculations. For example, if there are many connections, Slirp will try to be fair and send one packet per connection in a round-robin fashion. This makes all connections "smooth" instead of sending a bunch of packets for one connection, then a bunch of packets for another connection, etc. But if the "baudrate" is too high, the is exactly what will happen. Packet priority selection also uses the "baudrate"; I.e., if there are packets queued ready for sending from both an FTP connection and a telnet connection, the telnet packets will be sent first. But again, this will only work if the "baudrate" reflects the amount of data Slirp can send, and generally won't work if you set it to the maximum theoretical connection speed.

So here are my tips:

    *   If you download a lot of compressed files and occasionally use telnet, or other "interactive" programs, set your "baudrate" to your CONNECT speed (because already compressed files won't compress any more with the modem compression, so you're unlikely to get faster download's as a result of modem compression);

    *   If you mainly use telnet, or other "interactive" programs, and you occasionally download some compressed files, set your "baudrate" to the maximum theoretical speed (because telnet sessions are usually text, which compresses very well, hence screen updates will be faster. Only when downloading compressed files will you experience severe lag);

    *   If you mainly browse the Web (E.g., using Netscape, etc.), then you should set your "baudrate" to the theoretical maximum speed (because there's lots of text in Web documents which is very compressible, and there's no telnet sessions so lag will not be a problem);

I personally have by baudrate set at 14400, the speed at which my modem connects, even though the modems do v.42bis compression. Compressed file downloads are just as fast, and telnet sessions during FTP downloads are surprisingly responsive. Try it yourself, there's a world of difference.

PROBLEMS, QUESTIONS, AND ANSWERS

Which programs do not work over Slirp?
Any programs that bind()'s a port, then tell the other end of the connection where they should connect() to this bound port.

For example, when you "get" a file during an FTP session, the FTP client bind()'s a socket, has a look at which port the socket is bound to, then tells the FTP server the address and port of this socket (with the PORT command). The FTP server then connect()'s to this address/socket pair.

Now, since your machine isn't really on the Internet, this connect() request will not arrive to your host, so it will not work.

Slirp emulates this by bind()ing it's own port on the server that *is* on the Internet, and tells the FTP server about *that* address/socket pair. When the server connect()'s to it, Slirp will then connect back to your machine.

At present, the following programs are emulated:
    rlogin
    ftp
    ksh
    irc (for /dcc)
    RealAudio
    talk/ytalk/ntalk
    CUSeeMe

Troubleshooting

Symptom:
    The connection will "freeze". E.g., while downloading a picture on WWW it will stop halfway and no connections will continue.

Diagnosis:
     You probably don't have an 8bit clean link.

Cure:
    You should try and find out from your sysadmin which characters need to be "escaped", then tell Slirp about them using the "asyncmap" and "escape" commands. Note that you need to use PPP for this to work. (One way to test for 8bit cleanliness is to download a BINARY file with Z-Modem. If the file doesn't make it, you have a "dirty" link).

    One thing you might try is run Slirp as:
        slirp "asyncmap ffffffff" "escape ff" (quotes included!) This will tell Slirp to escape the most common "nasty characters.

Symptom:
    You can connect to hosts using numerical addresses (of the form aa.bb.cc.dd) but you cannot connect to hosts when you use their hostname (E.g.: ftp.cdrom.com). It usually times out with a DNS error.

Diagnosis:
    You probably did not set your DNS address properly.

Cure:
    Try setting your DNS address to 10.0.2.3. This should work for most situations. If that fails, go to your shell prompt and type "nslookup". This should print the address and hostname of your DNS server. Use the numerical IP address as your DNS. Do NOT use the hostname.

    If you still can't find your DNS address, ask your sysadmin for it.

Answers to Frequently Asked Questions (FAQs)

Q1. Can I use Slirp through Telnet or Rlogin?

A1. Yes, usually. But this is highly dependent on your situation.

    The reason Slirp usually doesn't work through telnet is because of the ^] character is interpreted by the telnet client, and 0xff interpreted by the server. While you can tell Slirp to escape these characters while using PPP, it may not be possible to get your local PPP software to escape characters greater than ASCII 31. Rlogin also interprets the ~ character, which may interfere with PPP (especially considering ~ is ASCII 0x7e which is used by PPP as the "end of packet" character").

    If your PPP software is unable to escape these characters, or you're using (C)SLIP (which must have an 8bit clean link), your best bet is to try and make the link 8bit clean. For example, on some systems you can give telnet the -8 flag to make the link 8bit, and -E to stop it from interpreting the ^] character. Similarly for rlogin; -8 to make the link 8bit, -E to stop rlogin from interpreting the ~ character. You should look at the telnet and rlogin manual pages ("man telnet" and "man rlogin" respectively) to see if your telnet/rlogin has similar options.

    Another possible solution is to use Slirp's ability to work over multiple hosts. See the slirp.doc documentation for more details.

Q2. How do I run an X program on another host and have it display on my PC?

A2. Use the "redir X" command in ~/.slirprc. This will redirect a port for use with X programs.

    On startup, Slirp should print something like:
        X Redir: In sh/bash/zsh/etc. type: DISPLAY=IP.ADDRESS:X.Y; export DISPLAY
        X Redir: In csh/tcsh/etc. type: setenv DISPLAY IP.ADDRESS:X.Y Now, when you telnet to the host you wish to run the X programs from, you should do as Slirp suggest above; type either of the two commands, depending on which shell you are using. You could also run the X program as "xprog -display IP.ADDRESS:X.Y" as printed above.

    If you missed what Slirp displayed on startup, you can telnet to 10.0.2.0 and give Slirp the command "show X", and the above will be printed.

    Note that you also have to make sure your X server will accept the connection. See the man page for xhost and Xsecurity. Be careful with issuing commands like "xhost +", this will allow anyone to connect to your X server and do basically anything they want.

Q3. When I run "talk" or "wintalk", etc. I am able to send requests to other people but they cannot send requests to me. Why?

A3. You won't be able to receive talk requests, period. This is because Slirp never see's the incoming talk request; it is sent directly over the modem, most likely corrupting any incoming packet with it (which will have to be retransmitted). Slirp turns off your messages so the person who tries to talk to you should receive a "User is refusing messages" error.

Q4. I can't telnet to 10.0.2.0, the Slirp control address. What's wrong?

A4. See the answer to this question in slirp.doc and recompile slirp.

Q5. I'm having a few problems with Slirp and want to try and find the problem myself. Does Slirp have any debugging facilities?

A5. Yes. See slirp.doc for compile-time debug options.

Q6. My ISP logs me out if I idle too long. How can I get Slirp to prevent this?

A6. First of all, the idle-logout mechanism is used for a reason: to prevent people from hogging a modem which is not in use. So if you're idle, logout and give others chance to logon.

    Having said that, you can make Slirp use TCP keep-alive timers to regularly probe each TCP connection. To activate this, add:
        keepalive to your ~/.slirprc file. This will make Slirp probe each TCP connection every minute or so. You can change this interval by giving keepalive the number of seconds:
        keepalive SECONDS Note that no probes will be sent if there are no TCP connections. So you need at least one active TCP connection for this to work.

GETTING HELP
There are several sources of help. First, read the previous sections "Troubleshooting" and "Answers to Frequently Asked Questions (FAQs)".

If that fails, try the Slirp Home Page at:
    http://blitzen.canberra.edu.au/slirp There are lots of neat links there to other pages which have specific configuration information.

There is also a Newsgroup dedicated to SLIP-emulators called alt.dcom.slip-emulators. You will find lots of discussion about Slirp and other "SLIP-emulators". The FAQ (Frequently Asked Questions) for alt.dcom.slip-emulators is included in the "docs" directory, I would suggest reading this as well.

If all else fails, send me e-mail to danjo@blitzen.canberra.edu.au with the following information:

    *   Output of the command "uname -a" on the remote system;

    *   Operating System name and version you run on your PC;

    *   Version of Slirp you are using (IMPORTANT!!!);

    *   If you managed to get Slirp running, run Slirp as "slirp -S" then try whatever failed. When you exit Slirp, you should have a file called "slirp_stats". Send me this file; and

    *   Anything else you consider relevant.

*PLEASE* include all the above information. If you do not, I may simply press "d". I can't guarantee a response, but I will try my best.

THANKS
A big "THANK YOU!" goes to the following people for their help in creating Slirp.

Juha Pirkola, Gregory M. Christy, The Regents of the University of California, Carnegie Mellon University, The Australian National University, and RSA Data Security, Inc. whose source code is used throughout Slirp. Slirp would not be without them.

Thanks to all the contributors who helped with bugs, suggestions, code, etc. Read the file ChangeLog to see exactly who helped with what.

A special thanks goes to Chris Metcalf and Juha Pirkola for their contributions (see ChangeLog). They put in extra effort and Slirp wouldn't be the same without their help. Thanks guys!

Thanks to all the people who sent very kind and encouraging e-mail, it's sincerely appreciated.

Thanks to all the admins and Head Honcho's at UCNet, the University of Canberra Computer Club ("blitzen") who gave me some real-estate on their machine (blitzen.canberra.edu.au) to work with (thanks to Tony Delroy for giving me the account originally). Hey! Why don't you check out their home page at http://blitzen.canberra.edu.au/?

Thanks to Brazil for coffee (and Sepultura! :)

Thanks to the laws of physics, the building blocks of the universe.

COPYRIGHT
Slirp was written by Danny Gasparovski.

Copyright (c) 1995 Danny Gasparovski. All Rights Reserved.

Slirp is free software; "free" as in you don't have to pay for it, and you are free to do whatever you want with it. I do not accept any donations, monetary or otherwise, for Slirp. Instead, I would ask you to pass this potential donation to your favorite charity. In fact, I encourage *everyone* who finds Slirp useful to make a small donation to their favorite charity (for example, GreenPeace). This is not a requirement, but a suggestion from someone who highly values the service they provide.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3.  All advertising materials mentioning features or use of this software must display the following acknowledgment: This product includes software developed by Danny Gasparovski.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DANNY GASPAROVSKI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This basically means you can do anything you want with the software, except 1) call it your own, and 2) claim warranty on it. There is no warranty for this software. None. Nada. If you lose a million dollars while using Slirp, that's your loss not mine. So, ***USE AT YOUR OWN RISK!***.

If these conditions cannot be met due to legal restrictions (E.g. where it is against the law to give out Software without warranty), you must cease using the software and delete all copies you have.

Slirp uses code that is copyrighted by the following people/organizations:

    Juha Pirkola.
    Gregory M. Christy.
    The Regents of the University of California.
    Carnegie Mellon University.
    The Australian National University.
    RSA Data Security, Inc. Please read the top of each source file for the details on the various copyrights.

AUTHOR
Slirp was written by Danny Gasparovski.

Manpage by George Ferguson, ferguson@cs.rochester.edu, based on Slirp 1.0b documentation.