Subject: Re: bin/33923: slattach(8) can't attach sl(4) interface
To: None <hauke@Espresso.Rhein-Neckar.DE>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 07/09/2006 01:32:25
> Maybe we should move descriptions about link[0-2] for sl(4)
> from slattach(8) man page and remove MLINKS of slip.8 to slattach.8 ?
Here is a new diff which includes:
- move description about link[0-2] flags from slattach(8) to sl(4)
- move description about SLIP limitations to BUGS section
- remove MLINKS of slip.8 to slattach.8
- create MLINKS of slip.4 to sl.4
---
Izumi Tsutsui
Index: distrib/sets/lists/man/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/man/mi,v
retrieving revision 1.905
diff -u -r1.905 mi
--- distrib/sets/lists/man/mi 27 Jun 2006 21:59:51 -0000 1.905
+++ distrib/sets/lists/man/mi 8 Jul 2006 16:29:14 -0000
@@ -1239,6 +1239,7 @@
./usr/share/man/cat4/sk.0 man-sys-catman .cat
./usr/share/man/cat4/skc.0 man-sys-catman .cat
./usr/share/man/cat4/sl.0 man-sys-catman .cat
+./usr/share/man/cat4/slip.0 man-sys-catman .cat
./usr/share/man/cat4/slhci.0 man-sys-catman .cat
./usr/share/man/cat4/slide.0 man-sys-catman .cat
./usr/share/man/cat4/sm.0 man-sys-catman .cat
@@ -2244,7 +2245,7 @@
./usr/share/man/cat8/showq.0 man-postfix-catman postfix,.cat
./usr/share/man/cat8/shutdown.0 man-sysutil-catman .cat
./usr/share/man/cat8/slattach.0 man-slip-catman .cat
-./usr/share/man/cat8/slip.0 man-slip-catman .cat
+./usr/share/man/cat8/slip.0 man-obsolete obsolete
./usr/share/man/cat8/sliplogin.0 man-slip-catman .cat
./usr/share/man/cat8/slstats.0 man-slip-catman .cat
./usr/share/man/cat8/smrsh.0 man-obsolete obsolete
@@ -3594,6 +3595,7 @@
./usr/share/man/man4/sk.4 man-sys-man .man
./usr/share/man/man4/skc.4 man-sys-man .man
./usr/share/man/man4/sl.4 man-sys-man .man
+./usr/share/man/man4/slip.4 man-sys-man .man
./usr/share/man/man4/slhci.4 man-sys-man .man
./usr/share/man/man4/slide.4 man-sys-man .man
./usr/share/man/man4/sm.4 man-sys-man .man
@@ -4599,7 +4601,7 @@
./usr/share/man/man8/showq.8 man-postfix-man postfix,.man
./usr/share/man/man8/shutdown.8 man-sysutil-man .man
./usr/share/man/man8/slattach.8 man-slip-man .man
-./usr/share/man/man8/slip.8 man-slip-man .man
+./usr/share/man/man8/slip.8 man-obsolete obsolete
./usr/share/man/man8/sliplogin.8 man-slip-man .man
./usr/share/man/man8/slstats.8 man-slip-man .man
./usr/share/man/man8/smrsh.8 man-obsolete obsolete
Index: sbin/slattach/Makefile
===================================================================
RCS file: /cvsroot/src/sbin/slattach/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- sbin/slattach/Makefile 27 Jun 2005 01:00:06 -0000 1.9
+++ sbin/slattach/Makefile 8 Jul 2006 16:29:14 -0000
@@ -3,6 +3,5 @@
PROG= slattach
MAN= slattach.8
-MLINKS= slattach.8 slip.8
.include <bsd.prog.mk>
Index: sbin/slattach/slattach.8
===================================================================
RCS file: /cvsroot/src/sbin/slattach/slattach.8,v
retrieving revision 1.27
diff -u -r1.27 slattach.8
--- sbin/slattach/slattach.8 7 Aug 2003 10:04:40 -0000 1.27
+++ sbin/slattach/slattach.8 8 Jul 2006 16:29:14 -0000
@@ -29,12 +29,11 @@
.\"
.\" @(#)slattach.8 8.2 (Berkeley) 4/1/94
.\"
-.Dd September 3, 1999
+.Dd July 8, 2006
.Dt SLATTACH 8
.Os
.Sh NAME
-.Nm slattach ,
-.Nm slip
+.Nm slattach
.Nd attach serial lines as network interfaces
.Sh SYNOPSIS
.Nm
@@ -44,8 +43,26 @@
.Ar ttyname
.Sh DESCRIPTION
.Nm
-is used to assign a tty line to a network interface,
-and to define the network source and destination addresses.
+is used to assign a tty line to a network interface which uses asynchronous
+serial lines.
+.Pp
+Currently the
+.Nm
+command is used to attach
+.Xr sl 4
+or
+.Xr strip 4
+interfaces.
+These interfaces have to be created using the
+.Xr ifconfig 8
+.Cm create
+subcommand before the
+.Nm
+command.
+The network source and destination addresses and other interface parameters
+are configured via
+.Xr ifconfig 8 .
+.Pp
The following operands are supported by
.Nm :
.Bl -tag -width Ar
@@ -88,25 +105,6 @@
.Ql /dev/ttyXX .
.El
.Pp
-In addition, the following flags to
-.Xr ifconfig 8
-control various properties of a SLIP link:
-.Bl -tag -width Ar
-.It Ar link0
-Turn on Van Jacobsen header compression.
-.It Ar -link0
-Turn off header compression.
-.It Ar link1
-Don't pass through ICMP packets.
-.It Ar -link1
-Do pass through ICMP packets.
-.It Ar link2
-If a packet with a compressed header is received, automatically enable
-compression of outgoing packets.
-.It Ar -link2
-Don't auto-enable compression.
-.El
-.Pp
Only the super-user may attach a network interface.
.Pp
To detach the interface, use
@@ -123,9 +121,9 @@
slattach \-s 4800 /dev/tty01
.Ed
.Sh DIAGNOSTICS
-Messages indicating that the specified interface does not exist, the
-requested address is unknown, or that the user is not privileged but
-tried to alter an interface's configuration.
+Messages indicating that the specified interface is not configured or created,
+the requested address is unknown, or that the user is not privileged
+but tried to alter an interface's configuration.
.Sh SEE ALSO
.Xr netstat 1 ,
.Xr daemon 3 ,
@@ -133,9 +131,27 @@
.Xr sl 4 ,
.Xr strip 4 ,
.Xr ifconfig 8 ,
-.Xr rc 8
+.Xr rc 8 ,
+.Xr sliplogin 8 ,
+.Xr slstats 8
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.3 .
+.Sh BUGS
+There is no way to specify the interface name (sl%d etc.) to be attached by the
+.Nm
+command.
+There is no way to see which interface is assigned to the specified tty by the
+.Nm
+command, either.
+.Pp
+It would be better if the network interfaces were created by the
+.Nm
+command rather than by using the
+.Xr ifconfig 8
+.Cm create
+subcommand before the
+.Nm
+command.
Index: share/man/man4/Makefile
===================================================================
RCS file: /cvsroot/src/share/man/man4/Makefile,v
retrieving revision 1.391
diff -u -r1.391 Makefile
--- share/man/man4/Makefile 27 Jun 2006 21:43:26 -0000 1.391
+++ share/man/man4/Makefile 8 Jul 2006 16:29:14 -0000
@@ -139,6 +139,7 @@
MLINKS+=scsi.4 scsibus.4
MLINKS+=si.4 sw.4
MLINKS+=sk.4 skc.4
+MLINKS+=sl.4 slip.4
MLINKS+=speaker.4 spkr.4
MLINKS+=tty.4 dty.4
MLINKS+=url.4 urlphy.4
Index: share/man/man4/sl.4
===================================================================
RCS file: /cvsroot/src/share/man/man4/sl.4,v
retrieving revision 1.11
diff -u -r1.11 sl.4
--- share/man/man4/sl.4 17 Jun 2006 04:58:14 -0000 1.11
+++ share/man/man4/sl.4 8 Jul 2006 16:29:14 -0000
@@ -29,7 +29,7 @@
.\"
.\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93
.\"
-.Dd December 5, 2004
+.Dd July 8, 2006
.Dt SL 4
.Os
.Sh NAME
@@ -45,6 +45,23 @@
network interfaces using the
.Tn SLIP
protocol.
+.Pp
+To use the
+.Nm
+interface, the administrator must first create the interface and assign
+a tty line to it.
+The
+.Nm
+interface is created using the
+.Xr ifconfig 8
+.Cm create
+subcommand, and
+.Xr slattach 8
+is used to assign a tty line to the interface.
+Once the interface is attached, network source and destination addresses and
+other parameters are configured via
+.Xr ifconfig 8 .
+.Pp
The
.Nm
interface can use Van Jacobson
@@ -52,23 +69,24 @@
header compression and
.Tn ICMP
filtering.
-.Pp
-However,
-.Tn SLIP
-can only transmit
-.Tn IPv4
-packets between preconfigured hosts on an asynchronous serial link.
-It has no provision for address negotiation,
-carriage of additional protocols (e.g.
-.Tn XNS ,
-.Tn AppleTalk ,
-.Tn DECNET ) ,
-and is not designed for synchronous serial links.
-This is why
-.Tn SLIP
-has been superseded by the Point-to-Point Protocol
-.Pq Tn PPP ,
-which does all of those things, and much more.
+The following flags to
+.Xr ifconfig 8
+control these properties of a SLIP link:
+.Bl -tag -width Ar
+.It Ar link0
+Turn on Van Jacobsen header compression.
+.It Ar -link0
+Turn off header compression.
+.It Ar link1
+Don't pass through ICMP packets.
+.It Ar -link1
+Do pass through ICMP packets.
+.It Ar link2
+If a packet with a compressed header is received, automatically enable
+compression of outgoing packets.
+.It Ar -link2
+Don't auto-enable compression.
+.El
.Sh DIAGNOSTICS
.Bl -diag
.It sl%d: af%d not supported .
@@ -80,6 +98,8 @@
.Xr inet 4 ,
.Xr intro 4 ,
.Xr ppp 4 ,
+.Xr strip 4 ,
+.Xr ifconfig 8 ,
.Xr slattach 8 ,
.Xr sliplogin 8 ,
.Xr slstats 8
@@ -94,3 +114,19 @@
.Nm
device appeared in
.Nx 1.0 .
+.Sh BUGS
+.Tn SLIP
+can only transmit
+.Tn IPv4
+packets between preconfigured hosts on an asynchronous serial link.
+It has no provision for address negotiation,
+carriage of additional protocols (e.g.
+.Tn XNS ,
+.Tn AppleTalk ,
+.Tn DECNET ) ,
+and is not designed for synchronous serial links.
+This is why
+.Tn SLIP
+has been superseded by the Point-to-Point Protocol
+.Pq Tn PPP ,
+which does all of those things, and much more.