Appendix

 

Using/dev Entries

 

APPENDIX A

 

On the workstation is a directory called /dev. This directory

contains a host of devices. Some devices are pseudo devices

called] pseudo fry's. A pseudo try device is a process that acts

like a serial device, such as a terminal, There can be up to

255 of these. Each connection to the PortMaster requires a

pseudo try device, In addition, other Sun software programs

use pseudo tty devices. These include; workstation shelltool

windows, Rlogin, rsh or other network processes.

 

First, to use a device, the operating system has to have

support for that device. The second thing you need to access

a device is an entry in /der which is the name of that device,

The name entry in /der cross references to a major device

number and a minor device number. The major device

number is used for a single type of device in the operating

system, Psuedo ttys use the major device number 20 on Sun

Workstations. Then each of the devices which acts like a

pseudo tty is assigned a minor device number For example,

tile entry, /dev/ttyp0(b is the first pseudo-try entry in /dev.

Tile device 'name' is ttyp0. If the command:

 

Is -I /dev/ttyp0

 

is performed, the following entry would be displayed:

 

crw-rw-rw- 1 root 20. 0 Sep 2 08:20 /dev/ttyp0

 

This indicates that /dev/ttyp0 has major device number 20 (a

pseudo try) and minor device 0 (the first minor device

number).

 

Using Default/dev Entries

 

TO use the default /der devices, simply use the path and name

of the device, for example:

 

A-I

 

 

/dev/ttypO

 

The port types Device and TwoWay require a device name,

which is found in the /der directory. The generic Sun

Workstation operating system has support for 48 pseudo

devices. To go beyond the 48 devices, you must modify your

UNIX kernel.

 

Modifying your UNIX kernel

 

Refer to the Sun Installation documentation for more complete

descriptions of these steps. In the System and Network

Administration Guide, see the Re-configuring the System

Kernel chapter. In the generic configuration file, in the

/sysl<arch>/conf directory (where <arch> is the machine

architecture - sun3, sun4, sun4c), there is a line dealing with

pseudo-try devices. This line sets the default number of

pseudo-tty devices to 48:

 

pseudo-device pry #psuedo-tty's, also Beedod for SunVlew

 

Change the entry from 'pry' to 'pry64' and you will set tile

number of pseudo-tty devices to 64, Append any number you

wish, up to 255 to the 'pty' entry. No number defaults to 48

devices. You will then need to re-build your kernel, as

described in the Sun documentation.

 

Using MAKEDEV

 

The last step is to make entries in /dev to match the operating system support. The first 64 are created using a program called MAKEDEV. During a standard SunOS installation the first 48 device entries will be automatically created. They are:

 

/dev/ttyp0 - /dev/ttypf /dev/ttyq0 - /dev/ttyqf /dev/ttyr0 - /dev/ttyrf

 

 

An additional 16 may be created using MAKEDEV which is

located in tile /der directory. Use the command:

 

MAKEDEV pty3

 

and /dev/ttys0 - /dev/ttysf will be created.

 

Using PMDEV

 

To create entries above 64 devices, use PMDEV which is

located in the /usr/portmaster directory. This command takes

the form:

 

PMDEV pty[4. 5, 6.7.8.9]

 

Each time you use PMDEV. 32 devices are added to the /der

directory. For example, the command:

 

PMDEV pty4

 

would create an additional 32 devices:

 

/dex/tty)40 /dev/tly5F

 

Repeat PMDEV up to pty9 to create a total of 255 entries in

/dev.

 

There is a utility included~ with the PortMaster software called

]Sty. This program lists only the pseudo-tty devices that are

in /dev, sorted in numerical order. It is a quick way to check on what pseudo-try devices you have in your /der directory.

This program resides in the /usr/portmaster directory. Simply

use the command:

 

Istty

 

 

On To Specifications