.th seid IIa 4/21/86
.sh NAME
seid \- secure entity identifier
.sh SYNOPSIS
.nf
 nsp_type = char;

 seid = RECORD

       nsp     : nsp_type;
       uniq_id0: char;    
       uniq_id1: cardinal 
 END;
.fi
.sh DESCRIPTION
A seid uniquely identifies each KSOS object.  A seid has two fields,
the name space partition (nsp) and a 24 bit field.  Each Kernel object
class is given its own nsp.  The 24 bit field is used to identify the
individual instances of the Kernel object.  (This field is subdivided
into uniq_id0 and uniq_id1 pieces.)
.s2
The following table contains the valid name space partitions.
.ta 0.5i 2.5iC  3.0i

.Ct        null_nsp          0      "null"
.Ct        extent_nsp        1      "extents"
.Ct        terminal_nsp      2      "terminal"
.Ct        device_nsp        3      "devices"
.Ct        process_nsp       4      "processes"
.Ct        segment_nsp       5      "segments"
.Ct        subtype_nsp       6      "subtypes"
.Ct        kernel_nsp        7      "kernel"
.Ct        same_nsp        128    "reserved for directories"
.Ct        root_nsp        129    "ROOT file system"
.Ct        low_file_nsp    129    "lower limit on file system nsp"
.Ct        high_file_nsp   255    "upper limit on file system nsp"
.dt
.s2
The root file system has the distinguished value of 129.  All other
file systems have nsp values from 130 to 255, which are returned by the
Kernel when the file system is mounted.
.s2
The description given is sufficient for all users except system
programmers.  The 24 bit quantity has many different fields
discriminated by the nsp.

.sh "Null Seid"
.s2
The null_seid is a distinguished value.  Uniq_id0 and uniq_id1 have
values of zero.  In general the null_seid acts as a place holder.  The
null_seid is always translated by the Kernel interface to be the seid
of the calling process.
.sh "Process Seid"
.s2
Each process has a seid which is valid for the life of the process.
Uniq_id0 contains the process table index.  Uniq_id1 contains a random
number to make the process seid unique over some period of time.
.sh "Segment Seid"
.s2
Each segment has a seid which is valid for the life of the segment.
Uniq_id0 contains the global segment table index, while uniq_id1
contains a random number to make the segment seid unique over some
period of time.
.sh "Kernel Seid"
.s2
The Kernel seid is a distinguished value used to identify messages sent
by the Kernel.  Both uniq_id0 and uniq_id1 contain zero values.
.sh "Device Seid"
.s2
Each device has a seid which is valid for the life of KSOS.  Changing
these seids will cause compatibility problems between KSOS systems.
Uniq_id0 contains the device class.  The device class identifies the
type of device being used.  The following device class assignments have
been made.

.ta  0.5i 4.5i
.Ct "disks                             "   1-9
.Ct "tapes                             "   11-19
.Ct "asynchronous communication devices"   21-29
.Ct "synchronous communication devices "   31-39
.Ct "network communications devices    "   41-49
.Ct "paper tape devices                "   51-59
.Ct "card readers                      "   61-69
.Ct "printers                          "   71-79
.dt
.s3
The following device class numbers have been assigned
to the following devices.

.ta 0.5i 2.0i 3.0iR 4.0i 5.0iR
.Ct disks           RK05 1      RWP04 2
.Ct ""              RWP05 3     PWP06 4
.Ct ""              RWS04 5

.Ct tapes           TWE16 11    TM11 12
.Ct ""              TU56 13

.Ct network         IMP11B 41   LHDH 42

.Ct "paper tape"      PR11 51     PC11 52

.Ct printers        LP11 71
.dt
.s2
Uniq_id1 distinguishes multiple devices of the same type.  The first
device has a value of zero and all the rest are numbered sequentially.
This field can not be greater than 256.
.sh "Extent Seid"
.s2
All block addressable devices contain extents.  Each extent has its own
seid.  For each device, the first four extents are predefined across
all KSOS systems.  Uniq_id0 is set to the device class.  Uniq_id1 is
composed of the device unit number in the low byte and the explicit
extent number in the high byte. 

.sh "Subtype Seid"
.s2
The subtype seids are valid across all KSOS systems.
Subtype seids are always predefined.  The following
subtype seids have been defined.

.ta 1.0i  3.5i 4.5i
.Ct seid    uniq_id0 uniq_id1

.Ct "UNIX directory"   100   0
.Ct "KSOS file system" 100   1
.Ct "Network Files"    100   2
.CT "Swap"             100   3
.CT "     and kernel"  100   4
.CT "System extent"    100   5
.dt


.sh "Terminal Seid"
.s2
Each terminal has a seid which is valid across all KSOS systems.  Two
types of terminal devices are supported, the DL and DH.  DL devices
have uniq_id0 values of 0 through 49.  The value of 0 is reserved for
the console device.  DH devices have their uniq_id0 starting with 50.
Uniq_id1 is always the terminal path number.  The path number is
assigned by the NKSR each time a user changes to a new level.  The path
numbers 0 and 1 are reserved for the secure server and the secure
services respectively.
.sh "File Seid"
.s2
A file has a seid which is valid for the life of the file.  The nsp
indicates which file system the file is on.  The uniq_id0 and uniq_id1
fields contain the file`s 24 bit Jnode number.  The Jnode number is
analogous to a UNIX inode number.
