1.\" Copyright (c) 1990, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 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. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)sliplogin.8 8.2 (Berkeley) 1/5/94 33.\" $FreeBSD: src/usr.sbin/sliplogin/sliplogin.8,v 1.12.2.5 2003/03/11 22:31:33 trhodes Exp $ 34.\" 35.Dd January 5, 1994 36.Dt SLIPLOGIN 8 37.Os 38.Sh NAME 39.Nm sliplogin 40.Nd attach a serial line network interface 41.Sh SYNOPSIS 42.Nm 43.Op Ar loginname Op Ar device 44.Sh DESCRIPTION 45The 46.Nm 47utility is used to turn the terminal line on standard input (or 48.Ar device ) 49into a Serial Line IP 50.Pq Tn SLIP 51link to a remote host. To do this, the program 52searches the file 53.Pa /etc/sliphome/slip.hosts 54for an entry matching 55.Ar loginname 56(which defaults to the current login name if omitted). 57If a matching entry is found, the line is configured appropriately 58for slip (8-bit transparent i/o) and converted to 59.Tn SLIP 60line discipline using the optional line discipline parameters. 61.Pp 62The optional line discipline parameters consist of one or more of 63the following; 64.Sq normal , 65.Sq compress , 66.Sq noicmp , 67or 68.Sq autocomp 69which correspond respectively to 70.Sq use normal line discipline 71(no header compression), 72.Sq enable VJ header compression , 73.Sq throw away ICMP packets , 74and 75.Sq auto enable VJ header compression 76(only if the remote end of the link also supports it). 77.Pp 78Then a shell script is invoked to initialize the slip 79interface with the appropriate local and remote 80.Tn IP 81address, 82netmask, etc. 83.Pp 84The usual initialization script is 85.Pa /etc/sliphome/slip.login 86but, if particular hosts need special initialization, the file 87.Pa /etc/sliphome/slip.login. Ns Ar loginname 88will be executed instead if it exists. 89The script is invoked with the parameters 90.Bl -tag -width slipunit 91.It Em slipunit 92The unit number of the slip interface assigned to this line. E.g., 93.Sy 0 94for 95.Sy sl0 . 96.It Em speed 97The speed of the line. 98.It Em args 99The arguments from the 100.Pa /etc/sliphome/slip.hosts 101entry, in order starting with 102.Ar loginname . 103.El 104.Pp 105Only the super-user may attach a network interface. The interface is 106automatically detached when the other end hangs up or the 107.Nm 108process dies. If the kernel slip 109module has been configured for it, all routes through that interface will 110also disappear at the same time. If there is other processing a site 111would like done on hangup, the file 112.Pa /etc/sliphome/slip.logout 113or 114.Pa /etc/sliphome/slip.logout. Ns Ar loginname 115is executed if it exists. It is given the same arguments as the login script. 116.Ss Format of /etc/sliphome/slip.hosts 117Comments (lines starting with a `#') and blank lines (or started 118with space) are ignored. 119Other lines must start with a 120.Ar loginname 121but the remaining arguments can be whatever is appropriate for the 122.Pa slip.login 123file that will be executed for that name. 124Arguments are separated by white space and follow normal 125.Xr sh 1 126quoting conventions (however, 127.Ar loginname 128cannot be quoted). 129Usually, lines have the form 130.Bd -literal -offset indent 131loginname local-address remote-address netmask opt-args 132.Ed 133.Pp 134where 135.Em local-address 136and 137.Em remote-address 138are the IP host names or addresses of the local and remote ends of the 139slip line and 140.Em netmask 141is the appropriate IP netmask. These arguments are passed 142directly to 143.Xr ifconfig 8 . 144.Em Opt-args 145are optional arguments used to configure the line. 146.Sh FreeBSD Additions 147An additional SLIP configuration file (if present) is 148.Pa /etc/sliphome/slip.slparms . 149If particular hosts need different configurations, the file 150.Pa /etc/sliphome/slip.slparms. Ns Ar loginname 151will be parsed instead if it exists. 152.Ss Format of /etc/sliphome/slip.slparms* 153Comments (lines starting with a `#') and blank lines (or started with 154space) are ignored. 155This file contains from one to three numeric parameters separated with spaces, 156in order: 157.Ar keepalive , 158.Ar outfill 159and 160.Ar slunit . 161.Bl -tag -width keepalive 162.It Ar keepalive 163Set SLIP "keep alive" timeout in seconds. 164If FRAME_END is not received in 165this amount of time, 166.Nm 167closes the line and exits. 168The default value is no timeout (zero). 169.It Ar outfill 170Set SLIP "out fill" timeout in seconds. 171It forces at least one FRAME_END 172to be sent during this time period, which is necessary for the "keep alive" 173timeout on the remote side. 174The default value is no timeout (zero). 175.It Ar slunit 176Set the SLIP unit number directly. 177Use with caution, because no check is made 178for two interfaces with same number. 179By default sliplogin dynamically assigns the unit number. 180.El 181.Pp 182If latter two parameters are omitted, they will not affect the 183corresponding SLIP configuration. 184If any of first two parameters is equal to zero, it will not affect 185the corresponding SLIP configuration. 186.Sh EXAMPLES 187The normal use of 188.Nm 189is to create a 190.Pa /etc/passwd 191entry for each legal, remote slip site with 192.Nm 193as the shell for that entry. E.g., 194.Bd -literal 195Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin 196.Ed 197.Pp 198(Our convention is to name the account used by remote host 199.Ar hostname 200as 201.Em Shostname . ) 202Then an entry is added to 203.Pa slip.hosts 204that looks like: 205.Pp 206.Bd -literal -offset indent -compact 207Sfoo `hostname` foo netmask 208.Ed 209.Pp 210where 211.Em `hostname` 212will be evaluated by 213.Xr sh 214to the local host name and 215.Em netmask 216is the local host IP netmask. 217.Pp 218Note that 219.Nm 220must be setuid to root and, while not a security hole, moral defectives 221can use it to place terminal lines in an unusable state and/or deny 222access to legitimate users of a remote slip line. To prevent this, 223.Nm 224is installed as user 225.Em root , 226group 227.Em network 228and mode 4550 so that only members of group 229.Em network 230may run 231.Nm . 232The system administrator should make sure that all legitimate users 233are a member of the correct group. 234.Sh DIAGNOSTICS 235The 236.Nm 237utility logs various information to the system log daemon, 238.Xr syslogd 8 , 239with a facility code of 240.Em daemon . 241The messages are listed here, grouped by severity level. 242.Pp 243.Sy Error Severity 244.Bl -tag -width Ds -compact 245.It Sy ioctl (TCGETS): Em reason 246A 247.Dv TCGETS 248.Fn ioctl 249to get the line parameters failed. 250.Pp 251.It Sy ioctl (TCSETS): Em reason 252A 253.Dv TCSETS 254.Fn ioctl 255to set the line parameters failed. 256.Pp 257.It Sy /etc/sliphome/slip.hosts: Em reason 258The 259.Pa /etc/sliphome/slip.hosts 260file could not be opened. 261.Pp 262.It Sy access denied for Em user 263No entry for 264.Em user 265was found in 266.Pa /etc/sliphome/slip.hosts . 267.El 268.Pp 269.Sy Notice Severity 270.Bl -tag -width Ds -compact 271.It Sy "attaching slip unit" Em unit Sy for Ar loginname 272.Tn SLIP 273unit 274.Em unit 275was successfully attached. 276.El 277.Sh FILES 278.Bl -tag -width indent 279.It Pa /etc/sliphome/slip.hosts 280list of host login names and parameters. 281.It Pa /etc/sliphome/slip.login 282script executed when a connection is made. 283.It Pa /etc/sliphome/slip.login. Ns Ar loginname 284script executed when a connection is made by 285.Ar loginname . 286.It Pa /etc/sliphome/slip.logout 287script executed when a connection is lost. 288.It Pa /etc/sliphome/slip.logout. Ns Ar loginname 289script executed when a connection is lost by 290.Ar loginname . 291.It Pa /etc/sliphome/slip.slparms 292extra parameters file. 293.It Pa /etc/sliphome/slip.slparms. Ns Ar loginname 294extra parameters file for 295.Ar loginname . 296.It Pa /var/run/ Ns Ar ttyXn Ns Pa .if 297contains the name of the network interface used by the sliplogin process on 298.Ar ttyXn . 299.It Pa /var/run/ Ns Ar slX Ns Pa .pid 300contains the PID of the sliplogin process which is using interface 301.Ar slX . 302.El 303.Sh SEE ALSO 304.Xr slattach 8 , 305.Xr syslogd 8 306.Pp 307.Pa /usr/share/examples/sliplogin 308.Sh HISTORY 309The 310.Nm 311utility appeared in 312.Bx 4.3 Reno . 313