[comp.sys.att] UNIX PC STARLAN ioctl

lenny@icus.ICUS.COM (Lenny Tropiano) (06/06/90)

While a lot of you are getting in a frenzy with the WIN/3B TCP/IP Ethernet
stuff, I felt it was necessary to pose a few questions to the net on STARLAN.
STARLAN boards for those who are interested should still be available from
Robert Slaski, and I recommend them very much.  Granted not too many machines
(especially non-AT&T ones) run STARLAN, and worst yet, the 1Mbps STARLAN, as
opposed to the 10Mbps (aka STARLAN-10).

Documentation on STARLAN is the pits, even the programmers manual only goes
into the high-level library calls found in the libslan.a library.  While
perusing the /usr/include/net and /usr/include/net/sys directories on my
system I started to get some ideas about doing "low-level" STARLAN operations,
and possibly learn a little more about this network media I have on my
two UNIX pc's.

The STARLAN driver on the UNIX pc has a special implementation of streams.
What modules can be pushed (I_PUSH) on to the /dev/starlan stream?  
The URP protocol (what it uses to communicate between machines, similar to
what Ethernet can use, TCP/IP) is a stream module.  Does anyone have 
documentation on how to use the low-level driver ioctl()'s as well as
the stream driver.  Doing a "strings" of my uucico (HDB) reveals some
interesting items...

These stream modules -- what do they do?  How do I use them?

slancall: push(ccmod) errno %d  		
slancall: push(urpmod) errno %d
slancall: push(psxmod) errno %d

In /usr/include/net/starlan.h, there are some interesting #defines ...


#define LIS_PROMISC	0x0001		/* Promiscuous listening */

(One could write some sort of thing to listen on the network and catch
 all the network packets in promiscous mode?)

#define ENC_MANCH	0x0004		/* Manchester encoding */
#define ENC_NRZ		0x0000		/* NRZ encoding */

(Encoding methods?  Excuse my network naivety)

/*
 * Ioctl commands (Unix)
 */

[...]
#define CS_DUMP		(CIOC|6)	/* Dump CSMA parameters */
#define CS_RST_CNTRS	(CIOC|7)	/* reset statistics counters */

These are used to get the STARLAN parameters for programs like
/usr/net/bin/remstat and /usr/net/bin/slnstat

STARLAN 1.1 NAU Statistics since Mon May 28 20:52:48 1990

 Prom:		08 00 6A 02 7C 99 00 6B 63 6F 52 54 11 21 EF DF
 System name:       icus
 Physical address:  08 00 6A 02 7C 99
 Chip lockups:             0   Resource errors:            0
 CRC errors:               0   DMA overruns:               0
 Alignment errors:         0   DMA underruns:              0
 Frames too short:         0   Pending sessions:           5
 Loss of CTS:              0   Frames received:        11998
 Loss of carrier:          0   Frames discarded:           0
 Deferrals:              122   Total writes:           11983
 Collisions:             141   Frames transmitted:     11975
 Collision aborts:         8   Writes lost:                0
                               Illegal packets:            0

Duration: 8 days  3 hours  44 minutes  16 seconds

#define CS_DIAGNOSE	(CIOC|12)	/* Issue a diag. command */

Diagnostic commands?  What commands?

#define CS_READPROM	(CIOC|21)	/* Read the on-board PROM */

To get that "Prom:" information ... (the network address of the board, etc.)

#define CS_MAINT_MODE	(CIOC|25)	/* Enter maintanence mode */

Maintanence mode?  

/*
 * Definitions pertaining to URP
 */

#define CS_XPARENT	(CIOC|40)	/* Set transparent mode */
#define CS_OPAQUE	(CIOC|41)	/* Set "opaque" mode */
[...]
Explain the difference between transparent mode and opaque mode?   And
why uucico does this? (again from string table...)

slancall: net_ioctl(CS_OPAQUE) errno %d

[...]
#define N_ISN_OPTS	(CIOC|83)	/* Please don't ask!! */

Ok, I'll bite ... What the heck is this? :-)

[...]
 * See Intel 82586 documentation / errata sheets for more details

That's the LAN chip they use?  Is this the same chip as in STARLAN boards
of the IBM PC's?

/*
 * Length of the useful data in the PROM
 */

#define SL_PROM_SIZE	16
[...]
 Prom:		08 00 6A 02 7C 99 00 6B 63 6F 52 54 11 21 EF DF

Geez, I do count 16!   And the first 6 are the physical address.

Anything about STARLAN that would be interesting to know would be appreciated!
Thanks.

-Lenny
-- 
| Lenny Tropiano           ICUS Software Systems        lenny@icus.ICUS.COM |
| {ames,pacbell,decuac,sbcs,hombre,rayssd}!icus!lenny   attmail!icus!lenny  |
+------ ICUS Software Systems --  PO Box 1;  Islip Terrace, NY  11752 ------+

alex@umbc5.umbc.edu (Alex S. Crain) (06/06/90)

In article <1199@icus.ICUS.COM> lenny@icus.ICUS.COM (Lenny Tropiano) writes:
>While a lot of you are getting in a frenzy with the WIN/3B TCP/IP Ethernet
>stuff, I felt it was necessary to pose a few questions to the net on STARLAN.

	I can trade a little info here ...

	Intel sells a package with (two each) starlan chips, transformers, 
blank circuit cards and instructions for about $65. The cards use an XT bus,
and there is some MSDOS software for playing with them. I have the kit, and
I'm seriously considering scoring a used XT motherboard and power supply for
use in a slave controller. I'm figuring a remopte print spooler, thermostat 
furnace control, etc, all out of an PC mounted on a piece of plywood in the
phone closet.

	Now, for that little tidbit, I have a question. What do I have to
do to get cu to work with this stuff? uucp works fine over starlan, but cu
just hangs and times out after connectung to pc_uucp at the other end of the
line. I installed the starlan software and HDB via the install program, and
the starlan documentation doesn't mention cu at all. (nor does the HDB docs
mention starlan).

	Does anybody have HDB and starlan working together in all ways?

#################################		           :alex.
#Disclamer: Anyone who agrees   #                 Systems Programmer
#with me deserves what they get.#    University of Maryland Baltimore County
#################################	    alex@umbc3.umbc.edu

lenny@icus.ICUS.COM (Lenny Tropiano) (06/07/90)

In article <3398@umbc3.UMBC.EDU> alex@umbc5.umbc.edu.UUCP (Alex S. Crain) writes:
|>In article <1199@icus.ICUS.COM> lenny@icus.ICUS.COM (Lenny Tropiano) writes:
|>>While a lot of you are getting in a frenzy with the WIN/3B TCP/IP Ethernet
|>>stuff, I felt it was necessary to pose a few questions to the net on STARLAN.
|>
|>	I can trade a little info here ...
|>
|>	Intel sells a package with (two each) starlan chips, transformers, 
|>blank circuit cards and instructions for about $65. The cards use an XT bus,
|>and there is some MSDOS software for playing with them. I have the kit, and
[...]
Thanks for the tips, but I wonder if the MSDOS software really talks using
the same protocol (URP) instead of the OSI protocol used in the newer STARLAN
and STARLAN-10 boards.

|>	Now, for that little tidbit, I have a question. What do I have to
|>do to get cu to work with this stuff? uucp works fine over starlan, but cu
|>just hangs and times out after connectung to pc_uucp at the other end of the
[...]
Yes, it's a pain since you're right there is no docs.  I posted a program
solution to unix-pc.sources (rlogin) which connects faster anyhow.

|>	Does anybody have HDB and starlan working together in all ways?
|>

Here goes...

/usr/lib/uucp/Dialers:

SLAN_uucico ""	"" NLPS:000:001:102\N\c

/usr/lib/uucp/Sysfiles:

service=cu	systems=Systems.cu:Systems

/usr/lib/uucp/Systems.cu:

icusdvlp Any STARLAN_OTHER -

/usr/lib/uucp/Systems:

icusdvlp Any;5 STARLAN_NAU - icusdvlp ogin:--ogin:--ogin: Uicus 

/usr/lib/uucp/Devices:
#
# Starlan network connection
#
STARLAN_NAU,eg starlan - Any STARLAN \D.serve SLAN_uucico
STARLAN_OTHER starlan - Any STARLAN

Also, which I don't remember if this was a prerequisite of the STARLAN
cu work, I created a /dev/psx directory and created some devices called
p0, p1, p2 ... p9

total 0
crw-rw-rw-  1 root    root     13,  0 Oct 20  1989 p0
crw-rw-rw-  1 root    root     13,  1 Feb 26 21:08 p1
crw-rw-rw-  1 root    root     13,  2 Oct 10  1989 p2
crw-rw-rw-  1 root    root     13,  3 Oct 11  1989 p3
crw-rw-rw-  1 root    root     13,  4 Oct 11  1989 p4
crw-rw-rw-  1 root    root     13,  5 Oct 11  1989 p5
crw-rw-rw-  1 root    root     13,  6 Oct 11  1989 p6
crw-rw-rw-  1 root    root     13,  7 Oct 11  1989 p7
crw-rw-rw-  1 root    root     13,  8 Oct 11  1989 p8
crw-rw-rw-  1 root    root     13,  9 Oct 11  1989 p9

The /dev/p0 device is created by the psx device driver within STARLAN
when /usr/bin/cu starts a STARLAN login.  It's weird.  But I think
for some reason the errno=6 return is because it looks for the device.

For those that wonder... the major number 13 is gotten from the masterupd -l:

[...]
13	psx	psx	ioctl write read close open release char

It's probably different on your machine!

This should help?!  If not, rlogin will.

-Lenny
-- 
| Lenny Tropiano           ICUS Software Systems        lenny@icus.ICUS.COM |
| {ames,pacbell,decuac,sbcs,hombre,rayssd}!icus!lenny   attmail!icus!lenny  |
+------ ICUS Software Systems --  PO Box 1;  Islip Terrace, NY  11752 ------+

brad@slammer.UUCP (Brad Isley) (06/08/90)

In article <1199@icus.ICUS.COM> lenny@icus.ICUS.COM (Lenny Tropiano) writes:
>While a lot of you are getting in a frenzy with the WIN/3B TCP/IP Ethernet
>stuff, I felt it was necessary to pose a few questions to the net on STARLAN.

I'll jump right in and pose another.
I'm ashamedly ignorant about these network protocols, so maybe someone
with a tad more knowledge could answer this question:
Can I use the STARLAN board to connect an X terminal to my 3b1?
I'll be starting on an X port to the 3b1 Real Soon Now if this can be done.

As usual, thanks in advance.
-brad
-- 
...!emory!stiatl!slammer!brad
...!gatech!bagend!slammer!brad   (Brad Isley)

les@chinet.chi.il.us (Leslie Mikesell) (06/08/90)

In article <1199@icus.ICUS.COM> lenny@icus.ICUS.COM (Lenny Tropiano) writes:

>Documentation on STARLAN is the pits, even the programmers manual only goes
>into the high-level library calls found in the libslan.a library.

Do you have the
AT&T Starlan Network Application Programmers Reference Manual (999-300-208IS)?
It comes with some sample programs for both unix and dos that run on top
of either the URP or OSI protocols.  Also, DOS kermit, versions 2.9 and
up, will connect over starlan (to each other for file xfer, and to
unix hosts for terminal emulation). This also works with either version
of the DOS starlan software.  Too bad the OSI version was never done for
the 3b1.

Les Mikesell
  les@chinet.chi.il.us