xref: /netbsd-src/sbin/slattach/slattach.8 (revision c1d9ec8d89df5aacd5e3c0734786c2a92c225a85)
1.\"	$NetBSD: slattach.8,v 1.30 2020/01/19 01:25:03 thorpej Exp $
2.\"
3.\" Copyright (c) 1986, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"     @(#)slattach.8	8.2 (Berkeley) 4/1/94
31.\"
32.Dd January 18, 2020
33.Dt SLATTACH 8
34.Os
35.Sh NAME
36.Nm slattach
37.Nd attach serial lines as network interfaces
38.Sh SYNOPSIS
39.Nm
40.Op Fl Hhlmn
41.Op Fl s Ar baudrate
42.Op Fl t Ar ldisc
43.Ar ttyname
44.Sh DESCRIPTION
45.Nm
46is used to assign a tty line to a network interface which uses asynchronous
47serial lines.
48.Pp
49Currently the
50.Nm
51command is used to attach
52.Xr sl 4
53interfaces.
54These interfaces have to be created using the
55.Xr ifconfig 8 .
56The resulting point-to-point link is not a broadcast interface
57and normally has a netmask of 255.255.255.255.
58.Cm create
59subcommand before the
60.Nm
61command.
62The network source and destination addresses and other interface parameters
63are configured via
64.Xr ifconfig 8 .
65.Pp
66The following operands are supported by
67.Nm :
68.Bl -tag -width Ar
69.It Fl H
70Turn on DTR/CTS flow control.
71By default, no flow control is done.
72.It Fl h
73Turn on RTS/CTS flow control.
74By default, no flow control is done.
75.It Fl l
76Turn on the CLOCAL flag, making it possible to run SLIP on a cable
77without modem control signals (e.g. DTR, DSR, DCD).
78.It Fl m
79Maintain modem control signals after closing the line.
80Specifically, this disables HUPCL.
81.It Fl n
82Don't detach from invoking tty.
83.It Fl s Ar baudrate
84Specifies the speed of the connection.
85If not specified, the default of 9600 is used.
86.It Fl t Ar ldisc
87Specifies the line discipline to use for the tty.
88Supported line disciplines are
89.Dq slip
90(creates a
91.Xr sl 4
92instance).
93If this option is not specified, the default is
94.Dq slip .
95This option is retained for backwards compatibility with existing
96scripts.
97.It Ar ttyname
98Specifies the name of the tty device.
99.Ar ttyname
100should be a string of the form
101.Ql ttyXX ,
102or
103.Ql /dev/ttyXX .
104.El
105.Pp
106Only the super-user may attach a network interface.
107.Pp
108To detach the interface, use
109.Dq Li ifconfig interface-name down
110after killing off the
111.Nm
112process.
113.Ar Interface-name
114is the name that is shown by
115.Xr netstat 1 .
116.Sh EXAMPLES
117Lock, initialize, and attach a line (on both sides):
118.Bd -literal -offset indent -compact
119cu -t -F [hard|soft] -l /dev/dty00
120ifconfig sl0 create
121slattach -l -t slip /dev/dty00
122.Ed
123On the local side:
124.Bd -literal -offset indent -compact
125ifconfig sl0 inet 10.0.0.2 10.0.0.1 netmask 255.255.255.255
126.Ed
127On the remote side:
128.Bd -literal -offset indent -compact
129ifconfig sl0 inet 10.0.0.1 10.0.0.2 netmask 255.255.255.255
130.Ed
131.Sh DIAGNOSTICS
132Messages indicating that the specified interface is not configured or created,
133the requested address is unknown, or that the user is not privileged
134but tried to alter an interface's configuration.
135.Sh SEE ALSO
136.Xr netstat 1 ,
137.Xr daemon 3 ,
138.Xr netintro 4 ,
139.Xr sl 4 ,
140.Xr ifconfig 8 ,
141.Xr rc 8 ,
142.Xr sliplogin 8 ,
143.Xr slstats 8
144.Sh HISTORY
145The
146.Nm
147command appeared in
148.Bx 4.3 .
149.Sh BUGS
150There is no way to specify the interface name (sl%d etc.) to be attached by the
151.Nm
152command.
153There is no way to see which interface is assigned to the specified tty by the
154.Nm
155command, either.
156.Pp
157It would be better if the network interfaces were created by the
158.Nm
159command rather than by using the
160.Xr ifconfig 8
161.Cm create
162subcommand before the
163.Nm
164command.
165