1994-05-26 05:23:31 +00:00
|
|
|
.\" Copyright (c) 1990, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" 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 acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 THE REGENTS 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.
|
|
|
|
.\"
|
|
|
|
.\" @(#)sliplogin.8 8.2 (Berkeley) 1/5/94
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-26 05:23:31 +00:00
|
|
|
.\"
|
|
|
|
.Dd January 5, 1994
|
|
|
|
.Dt SLIPLOGIN 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm sliplogin
|
|
|
|
.Nd attach a serial line network interface
|
|
|
|
.Sh SYNOPSIS
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
1995-09-22 10:04:33 +00:00
|
|
|
.Op Ar loginname Op Ar device
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is used to turn the terminal line on standard input (or
|
1995-09-22 10:04:33 +00:00
|
|
|
.Ar device )
|
|
|
|
into a Serial Line IP
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pq Tn SLIP
|
|
|
|
link to a remote host. To do this, the program
|
|
|
|
searches the file
|
|
|
|
.Pa /etc/sliphome/slip.hosts
|
|
|
|
for an entry matching
|
|
|
|
.Ar loginname
|
|
|
|
(which defaults to the current login name if omitted).
|
|
|
|
If a matching entry is found, the line is configured appropriately
|
|
|
|
for slip (8-bit transparent i/o) and converted to
|
|
|
|
.Tn SLIP
|
1995-12-04 06:10:29 +00:00
|
|
|
line discipline using the optional line discipline parameters.
|
|
|
|
.Pp
|
|
|
|
The optional line discipline parameters consist of one or more of
|
|
|
|
the following;
|
|
|
|
.Sq normal ,
|
|
|
|
.Sq compress ,
|
|
|
|
.Sq noicmp ,
|
|
|
|
or
|
|
|
|
.Sq autocomp
|
|
|
|
which correspond respectively to
|
|
|
|
.Sq use normal line discipline
|
|
|
|
(no header compression),
|
|
|
|
.Sq enable VJ header compression ,
|
|
|
|
.Sq throw away ICMP packets ,
|
|
|
|
and
|
|
|
|
.Sq auto enable VJ header compression
|
|
|
|
(only if the remote end of the link also supports it).
|
1995-09-22 10:04:33 +00:00
|
|
|
.Pp
|
|
|
|
Then a shell script is invoked to initialize the slip
|
1994-05-26 05:23:31 +00:00
|
|
|
interface with the appropriate local and remote
|
|
|
|
.Tn IP
|
|
|
|
address,
|
|
|
|
netmask, etc.
|
1995-12-04 06:10:29 +00:00
|
|
|
.Pp
|
1994-05-26 05:23:31 +00:00
|
|
|
The usual initialization script is
|
|
|
|
.Pa /etc/sliphome/slip.login
|
|
|
|
but, if particular hosts need special initialization, the file
|
|
|
|
.Pa /etc/sliphome/slip.login. Ns Ar loginname
|
|
|
|
will be executed instead if it exists.
|
|
|
|
The script is invoked with the parameters
|
|
|
|
.Bl -tag -width slipunit
|
|
|
|
.It Em slipunit
|
|
|
|
The unit number of the slip interface assigned to this line. E.g.,
|
|
|
|
.Sy 0
|
|
|
|
for
|
|
|
|
.Sy sl0 .
|
|
|
|
.It Em speed
|
|
|
|
The speed of the line.
|
|
|
|
.It Em args
|
|
|
|
The arguments from the
|
|
|
|
.Pa /etc/sliphome/slip.hosts
|
|
|
|
entry, in order starting with
|
|
|
|
.Ar loginname .
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Only the super-user may attach a network interface. The interface is
|
|
|
|
automatically detached when the other end hangs up or the
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
process dies. If the kernel slip
|
|
|
|
module has been configured for it, all routes through that interface will
|
|
|
|
also disappear at the same time. If there is other processing a site
|
|
|
|
would like done on hangup, the file
|
|
|
|
.Pa /etc/sliphome/slip.logout
|
|
|
|
or
|
|
|
|
.Pa /etc/sliphome/slip.logout. Ns Ar loginname
|
|
|
|
is executed if it exists. It is given the same arguments as the login script.
|
|
|
|
.Ss Format of /etc/sliphome/slip.hosts
|
1995-09-22 10:04:33 +00:00
|
|
|
Comments (lines starting with a `#') and blank lines (or started
|
|
|
|
with space) are ignored.
|
1994-05-26 05:23:31 +00:00
|
|
|
Other lines must start with a
|
|
|
|
.Ar loginname
|
|
|
|
but the remaining arguments can be whatever is appropriate for the
|
|
|
|
.Pa slip.login
|
|
|
|
file that will be executed for that name.
|
|
|
|
Arguments are separated by white space and follow normal
|
|
|
|
.Xr sh 1
|
|
|
|
quoting conventions (however,
|
|
|
|
.Ar loginname
|
|
|
|
cannot be quoted).
|
|
|
|
Usually, lines have the form
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
loginname local-address remote-address netmask opt-args
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
where
|
|
|
|
.Em local-address
|
|
|
|
and
|
|
|
|
.Em remote-address
|
|
|
|
are the IP host names or addresses of the local and remote ends of the
|
|
|
|
slip line and
|
|
|
|
.Em netmask
|
|
|
|
is the appropriate IP netmask. These arguments are passed
|
|
|
|
directly to
|
|
|
|
.Xr ifconfig 8 .
|
|
|
|
.Em Opt-args
|
|
|
|
are optional arguments used to configure the line.
|
1995-10-25 18:58:40 +00:00
|
|
|
.Sh FreeBSD Additions
|
|
|
|
An additional SLIP configuration file (if present) is
|
|
|
|
.Pa /etc/sliphome/slip.slparms .
|
|
|
|
If particular hosts need different configurations, the file
|
|
|
|
.Pa /etc/sliphome/slip.slparms. Ns Ar loginname
|
|
|
|
will be parsed instead if it exists.
|
|
|
|
.Ss Format of /etc/sliphome/slip.slparms*
|
|
|
|
Comments (lines starting with a `#') and blank lines (or started with
|
|
|
|
space) are ignored.
|
|
|
|
This file contains from one to three numeric parameters separated with spaces,
|
|
|
|
in order:
|
|
|
|
.Ar keepalive ,
|
|
|
|
.Ar outfill
|
|
|
|
and
|
|
|
|
.Ar slunit .
|
|
|
|
.Bl -tag -width keepalive
|
|
|
|
.It Ar keepalive
|
2000-03-01 14:09:25 +00:00
|
|
|
Set SLIP "keep alive" timeout in seconds.
|
|
|
|
If FRAME_END is not received in
|
1995-10-25 18:58:40 +00:00
|
|
|
this amount of time,
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
1995-10-25 18:58:40 +00:00
|
|
|
closes the line and exits.
|
1995-10-26 05:12:59 +00:00
|
|
|
The default value is no timeout (zero).
|
1995-10-25 18:58:40 +00:00
|
|
|
.It Ar outfill
|
2000-03-01 14:09:25 +00:00
|
|
|
Set SLIP "out fill" timeout in seconds.
|
|
|
|
It forces at least one FRAME_END
|
1995-10-26 05:12:59 +00:00
|
|
|
to be sent during this time period, which is necessary for the "keep alive"
|
|
|
|
timeout on the remote side.
|
1995-10-25 18:58:40 +00:00
|
|
|
The default value is no timeout (zero).
|
|
|
|
.It Ar slunit
|
2000-03-01 14:09:25 +00:00
|
|
|
Set the SLIP unit number directly.
|
|
|
|
Use with caution, because no check is made
|
1995-10-25 18:58:40 +00:00
|
|
|
for two interfaces with same number.
|
|
|
|
By default sliplogin dynamically assigns the unit number.
|
|
|
|
.El
|
|
|
|
.Pp
|
1996-01-30 13:52:50 +00:00
|
|
|
If latter two parameters are omitted, they will not affect the
|
1995-10-25 18:58:40 +00:00
|
|
|
corresponding SLIP configuration.
|
|
|
|
If any of first two parameters is equal to zero, it will not affect
|
|
|
|
the corresponding SLIP configuration.
|
2000-11-17 11:44:16 +00:00
|
|
|
.Sh EXAMPLES
|
1994-05-26 05:23:31 +00:00
|
|
|
The normal use of
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
is to create a
|
|
|
|
.Pa /etc/passwd
|
|
|
|
entry for each legal, remote slip site with
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
as the shell for that entry. E.g.,
|
|
|
|
.Bd -literal
|
|
|
|
Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
(Our convention is to name the account used by remote host
|
|
|
|
.Ar hostname
|
|
|
|
as
|
|
|
|
.Em Shostname . )
|
|
|
|
Then an entry is added to
|
|
|
|
.Pa slip.hosts
|
|
|
|
that looks like:
|
|
|
|
.Pp
|
|
|
|
.Bd -literal -offset indent -compact
|
|
|
|
Sfoo `hostname` foo netmask
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
where
|
|
|
|
.Em `hostname`
|
|
|
|
will be evaluated by
|
|
|
|
.Xr sh
|
|
|
|
to the local host name and
|
|
|
|
.Em netmask
|
|
|
|
is the local host IP netmask.
|
|
|
|
.Pp
|
|
|
|
Note that
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
must be setuid to root and, while not a security hole, moral defectives
|
|
|
|
can use it to place terminal lines in an unusable state and/or deny
|
|
|
|
access to legitimate users of a remote slip line. To prevent this,
|
1997-09-05 23:11:28 +00:00
|
|
|
.Nm
|
|
|
|
is installed as user
|
|
|
|
.Em root ,
|
|
|
|
group
|
|
|
|
.Em network
|
|
|
|
and mode 4550 so that only members of group
|
|
|
|
.Em network
|
|
|
|
may run
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm .
|
1997-09-05 23:11:28 +00:00
|
|
|
The system administrator should make sure that all legitimate users
|
|
|
|
are a member of the correct group.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh DIAGNOSTICS
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility logs various information to the system log daemon,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr syslogd 8 ,
|
|
|
|
with a facility code of
|
|
|
|
.Em daemon .
|
|
|
|
The messages are listed here, grouped by severity level.
|
|
|
|
.Pp
|
|
|
|
.Sy Error Severity
|
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.It Sy ioctl (TCGETS): Em reason
|
|
|
|
A
|
|
|
|
.Dv TCGETS
|
|
|
|
.Fn ioctl
|
|
|
|
to get the line parameters failed.
|
|
|
|
.Pp
|
|
|
|
.It Sy ioctl (TCSETS): Em reason
|
|
|
|
A
|
|
|
|
.Dv TCSETS
|
|
|
|
.Fn ioctl
|
|
|
|
to set the line parameters failed.
|
|
|
|
.Pp
|
|
|
|
.It Sy /etc/sliphome/slip.hosts: Em reason
|
|
|
|
The
|
|
|
|
.Pa /etc/sliphome/slip.hosts
|
|
|
|
file could not be opened.
|
|
|
|
.Pp
|
|
|
|
.It Sy access denied for Em user
|
|
|
|
No entry for
|
|
|
|
.Em user
|
|
|
|
was found in
|
|
|
|
.Pa /etc/sliphome/slip.hosts .
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.Sy Notice Severity
|
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.It Sy "attaching slip unit" Em unit Sy for Ar loginname
|
|
|
|
.Tn SLIP
|
|
|
|
unit
|
|
|
|
.Em unit
|
|
|
|
was successfully attached.
|
|
|
|
.El
|
1997-04-16 09:54:50 +00:00
|
|
|
.Sh FILES
|
2001-02-01 16:44:04 +00:00
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Pa /etc/sliphome/slip.hosts
|
1997-04-16 09:54:50 +00:00
|
|
|
list of host login names and parameters.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /etc/sliphome/slip.login
|
1997-04-16 09:54:50 +00:00
|
|
|
script executed when a connection is made.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /etc/sliphome/slip.login. Ns Ar loginname
|
1997-04-16 09:54:50 +00:00
|
|
|
script executed when a connection is made by
|
|
|
|
.Ar loginname .
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /etc/sliphome/slip.logout
|
1997-04-16 09:54:50 +00:00
|
|
|
script executed when a connection is lost.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /etc/sliphome/slip.logout. Ns Ar loginname
|
1997-04-16 09:54:50 +00:00
|
|
|
script executed when a connection is lost by
|
|
|
|
.Ar loginname .
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /etc/sliphome/slip.slparms
|
1997-04-16 09:54:50 +00:00
|
|
|
extra parameters file.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /etc/sliphome/slip.slparms. Ns Ar loginname
|
1997-04-16 09:54:50 +00:00
|
|
|
extra parameters file for
|
|
|
|
.Ar loginname .
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /var/run/ Ns Ar ttyXn Ns Pa .if
|
1997-04-16 09:54:50 +00:00
|
|
|
contains the name of the network interface used by the sliplogin process on
|
|
|
|
.Ar ttyXn .
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Pa /var/run/ Ns Ar slX Ns Pa .pid
|
1997-04-16 09:54:50 +00:00
|
|
|
contains the PID of the sliplogin process which is using interface
|
|
|
|
.Ar slX .
|
2001-02-01 16:44:04 +00:00
|
|
|
.El
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr slattach 8 ,
|
2001-07-06 16:46:48 +00:00
|
|
|
.Xr syslogd 8
|
|
|
|
.Pp
|
1995-09-22 10:04:33 +00:00
|
|
|
.Pa /usr/share/examples/sliplogin
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility appeared in
|
2001-03-19 11:05:32 +00:00
|
|
|
.Bx 4.3 Reno .
|