File: CONFIG

package info (click to toggle)
slirp 1.0g-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,272 kB
  • ctags: 2,153
  • sloc: ansic: 17,100; makefile: 173; perl: 53
file content (279 lines) | stat: -rw-r--r-- 9,990 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
Key:
    all options within [] 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 telnet).
    command-line: gives the command-line equivalent
    XXX etc.


redir X [start RDISP] [ADDR][:DISPLAY[.SCREEN]]
    redirect a port for use with X
    
    usable: anywhere
    command-line: -X
    options:
	start RDISP	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
    command-line: NONE
    options:
    	NONE
    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
    command-line: NONE
    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
    Options:
        N	change baudrate to N
    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
    command-line: none
    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
    command-line: none
    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)
        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.
    Command:
        nocompress    start in SLIP mode
        compress      start in CSLIP mode
    Options:
        NONE
    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.
    Options:
        NONE
    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).
    It is the same as
        add ptyexec PROGRAM:23
    Options:
        NONE
    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.
    XXX 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.
    
    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.
    
    examples:
        if you wish to ftp to somewhere on port 8021, do:
	
	add emu ftp 8021
	
	if your home ftp server is on port 8021, do:
	
	add emu ftp 8021:0
	
	[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]
	
	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), do:
	
	add emu none:lowdelay 8000
	
	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.