1.\" $NetBSD: slattach.8,v 1.28 2006/07/08 17:22:14 tsutsui 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 July 8, 2006 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 53or 54.Xr strip 4 55interfaces. 56These interfaces have to be created using the 57.Xr ifconfig 8 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) and 93.Dq strip 94(creates a 95.Xr strip 4 96instance). 97If this option is not specified, the default is 98.Dq slip . 99.It Ar ttyname 100Specifies the name of the tty device. 101.Ar ttyname 102should be a string of the form 103.Ql ttyXX , 104or 105.Ql /dev/ttyXX . 106.El 107.Pp 108Only the super-user may attach a network interface. 109.Pp 110To detach the interface, use 111.Dq Li ifconfig interface-name down 112after killing off the 113.Nm 114process. 115.Ar Interface-name 116is the name that is shown by 117.Xr netstat 1 . 118.Sh EXAMPLES 119.Bd -literal -offset indent -compact 120slattach ttyh8 121slattach \-s 4800 /dev/tty01 122.Ed 123.Sh DIAGNOSTICS 124Messages indicating that the specified interface is not configured or created, 125the requested address is unknown, or that the user is not privileged 126but tried to alter an interface's configuration. 127.Sh SEE ALSO 128.Xr netstat 1 , 129.Xr daemon 3 , 130.Xr netintro 4 , 131.Xr sl 4 , 132.Xr strip 4 , 133.Xr ifconfig 8 , 134.Xr rc 8 , 135.Xr sliplogin 8 , 136.Xr slstats 8 137.Sh HISTORY 138The 139.Nm 140command appeared in 141.Bx 4.3 . 142.Sh BUGS 143There is no way to specify the interface name (sl%d etc.) to be attached by the 144.Nm 145command. 146There is no way to see which interface is assigned to the specified tty by the 147.Nm 148command, either. 149.Pp 150It would be better if the network interfaces were created by the 151.Nm 152command rather than by using the 153.Xr ifconfig 8 154.Cm create 155subcommand before the 156.Nm 157command. 158