[net.unix-wizards] naming convention sl# in netstat

colleen@rlgvax.UUCP (Colleen Colangelo) (12/12/85)

I was wondering why the BSD 4.2 netstat command chose to use the 
"sl unit number" naming convention?  It probably would have been more 
useful to the user to use the associated ttyname instead.  

chris@umcp-cs.UUCP (Chris Torek) (12/15/85)

In article <847@rlgvax.UUCP> colleen@rlgvax.UUCP (Colleen Colangelo) writes:

> I was wondering why the BSD 4.2 netstat command chose to use the 
> "sl unit number" naming convention?  It probably would have been more 
> useful to the user to use the associated ttyname instead.  

Well, first, the `sl' `interface' is not properly a part of 4.2BSD;
but in any case, the reason netstat cannot show the tty name is
that there is none to show.  The connection between an sl interface
and the tty line it uses is private to the interface.  Moreover,
all that the sl code holds is a pointer to the `tty' structure.

You could write a specialised program that digs into the kernel
data structures, finds the tty structure, extracts the major and
minor device numbers, then searches /dev for the tty entry, in much
the same way that `ps' finds the control terminal of a process.

Now, for everyone who has never heard of `sl', it is a protocol,
and a set of software, that can be installed in a 4.2BSD kernel.
It converts IP packets into 8 bit wide serial data suitable for
RS232 devices, and converts incoming serial data back into 4.2
kernel style network packets.  Thus it allows two 4.2 machines to
be networked together using conventional `tty' lines.  You should
be aware that this is not a proper substitute for a high speed
local area network; even 19200 baud is rather low for real
communications purposes.  We used it here as a band aid to patch
together several Ethernet LANs until the campus broadband system
became operational.

The original 4.2 sl code was written by Rick Adams of the Center
for Seismic Studies.  I have been giving out my modifications to
Rick's code, including a version that now works for 4.3BSD Beta
systems (and presumably `true 4.3' when it is released).  Send me
mail for details.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu