1 .\" Copyright (c) 1990, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)sliplogin.8 8.2 (Berkeley) 1/5/94
29 .\" $FreeBSD: src/usr.sbin/sliplogin/sliplogin.8,v 1.12.2.5 2003/03/11 22:31:33 trhodes Exp $
36 .Nd attach a serial line network interface
39 .Op Ar loginname Op Ar device
43 utility is used to turn the terminal line on standard input (or
47 link to a remote host. To do this, the program
49 .Pa /etc/sliphome/slip.hosts
52 (which defaults to the current login name if omitted).
53 If a matching entry is found, the line is configured appropriately
54 for slip (8-bit transparent i/o) and converted to
56 line discipline using the optional line discipline parameters.
58 The optional line discipline parameters consist of one or more of
65 which correspond respectively to
66 .Sq use normal line discipline
67 (no header compression),
68 .Sq enable VJ header compression ,
69 .Sq throw away ICMP packets ,
71 .Sq auto enable VJ header compression
72 (only if the remote end of the link also supports it).
74 Then a shell script is invoked to initialize the slip
75 interface with the appropriate local and remote
80 The usual initialization script is
81 .Pa /etc/sliphome/slip.login
82 but, if particular hosts need special initialization, the file
83 .Pa /etc/sliphome/slip.login. Ns Ar loginname
84 will be executed instead if it exists.
85 The script is invoked with the parameters
86 .Bl -tag -width slipunit
88 The unit number of the slip interface assigned to this line. E.g.,
93 The speed of the line.
95 The arguments from the
96 .Pa /etc/sliphome/slip.hosts
97 entry, in order starting with
101 Only the super-user may attach a network interface. The interface is
102 automatically detached when the other end hangs up or the
104 process dies. If the kernel slip
105 module has been configured for it, all routes through that interface will
106 also disappear at the same time. If there is other processing a site
107 would like done on hangup, the file
108 .Pa /etc/sliphome/slip.logout
110 .Pa /etc/sliphome/slip.logout. Ns Ar loginname
111 is executed if it exists. It is given the same arguments as the login script.
112 .Ss Format of /etc/sliphome/slip.hosts
113 Comments (lines starting with a `#') and blank lines (or started
114 with space) are ignored.
115 Other lines must start with a
117 but the remaining arguments can be whatever is appropriate for the
119 file that will be executed for that name.
120 Arguments are separated by white space and follow normal
122 quoting conventions (however,
125 Usually, lines have the form
126 .Bd -literal -offset indent
127 loginname local-address remote-address netmask opt-args
134 are the IP host names or addresses of the local and remote ends of the
137 is the appropriate IP netmask. These arguments are passed
141 are optional arguments used to configure the line.
142 .Sh FreeBSD Additions
143 An additional SLIP configuration file (if present) is
144 .Pa /etc/sliphome/slip.slparms .
145 If particular hosts need different configurations, the file
146 .Pa /etc/sliphome/slip.slparms. Ns Ar loginname
147 will be parsed instead if it exists.
148 .Ss Format of /etc/sliphome/slip.slparms*
149 Comments (lines starting with a `#') and blank lines (or started with
151 This file contains from one to three numeric parameters separated with spaces,
157 .Bl -tag -width keepalive
159 Set SLIP "keep alive" timeout in seconds.
160 If FRAME_END is not received in
163 closes the line and exits.
164 The default value is no timeout (zero).
166 Set SLIP "out fill" timeout in seconds.
167 It forces at least one FRAME_END
168 to be sent during this time period, which is necessary for the "keep alive"
169 timeout on the remote side.
170 The default value is no timeout (zero).
172 Set the SLIP unit number directly.
173 Use with caution, because no check is made
174 for two interfaces with same number.
175 By default sliplogin dynamically assigns the unit number.
178 If latter two parameters are omitted, they will not affect the
179 corresponding SLIP configuration.
180 If any of first two parameters is equal to zero, it will not affect
181 the corresponding SLIP configuration.
183 .Bl -tag -width indent
184 .It Pa /etc/sliphome/slip.hosts
185 list of host login names and parameters.
186 .It Pa /etc/sliphome/slip.login
187 script executed when a connection is made.
188 .It Pa /etc/sliphome/slip.login. Ns Ar loginname
189 script executed when a connection is made by
191 .It Pa /etc/sliphome/slip.logout
192 script executed when a connection is lost.
193 .It Pa /etc/sliphome/slip.logout. Ns Ar loginname
194 script executed when a connection is lost by
196 .It Pa /etc/sliphome/slip.slparms
197 extra parameters file.
198 .It Pa /etc/sliphome/slip.slparms. Ns Ar loginname
199 extra parameters file for
201 .It Pa /var/run/ Ns Ar ttyXn Ns Pa .if
202 contains the name of the network interface used by the sliplogin process on
204 .It Pa /var/run/ Ns Ar slX Ns Pa .pid
205 contains the PID of the sliplogin process which is using interface
213 entry for each legal, remote slip site with
215 as the shell for that entry. E.g.,
217 Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin
220 (Our convention is to name the account used by remote host
224 Then an entry is added to
228 .Bd -literal -offset indent -compact
229 Sfoo `hostname` foo netmask
236 to the local host name and
238 is the local host IP netmask.
242 must be setuid to root and, while not a security hole, moral defectives
243 can use it to place terminal lines in an unusable state and/or deny
244 access to legitimate users of a remote slip line. To prevent this,
250 and mode 4550 so that only members of group
254 The system administrator should make sure that all legitimate users
255 are a member of the correct group.
259 utility logs various information to the system log daemon,
261 with a facility code of
263 The messages are listed here, grouped by severity level.
266 .Bl -tag -width Ds -compact
267 .It Sy ioctl (TCGETS): Em reason
271 to get the line parameters failed.
273 .It Sy ioctl (TCSETS): Em reason
277 to set the line parameters failed.
279 .It Sy /etc/sliphome/slip.hosts: Em reason
281 .Pa /etc/sliphome/slip.hosts
282 file could not be opened.
284 .It Sy access denied for Em user
288 .Pa /etc/sliphome/slip.hosts .
292 .Bl -tag -width Ds -compact
293 .It Sy "attaching slip unit" Em unit Sy for Ar loginname
297 was successfully attached.
303 .Pa /usr/share/examples/sliplogin