There are two keys to a domain creator; one has destroy
rights, the other does not. Let DC represent a domain creator
key of either type. A domain creator has a key called its
"brander".
DC(DOMAINCREATOR__CREATE{=12};SB==>c;D)
Attempts to create a domain. SB must be an official
space bank; if not, c will be 1. The domain will be constructed
of three nodes obtained from the space bank SB; if three
nodes cannot be obtained, c will be 2 and SB will be unchanged.
If successful, D will be the only domain key to a new domain.
D has destroy rights. The domain's brand will be the brander
of this DC. This call is prompt if SB is. C1 through C13
and C16 through C47 will be DK(0).
While only you hold D after this call, consider (iden),
(id-ex) and (idth)
about how others might acquire D if access to DC is not
suitably restricted.
{obsolete}DC(DOMAINCREATOR__CREATE_DOMAIN{=0};,SB==>c;D)
Same as the above, except the unusual position of the
SB key.
DC(DOMAINCREATOR__DESTROY_DOMAIN{=1};D,SB==>c;)
Attempts to destroy domain D. D must be a domain key
to a domain whose brand is the brander of this DC. If SB
is not an official space bank c will be 1. If the attempt
to destroy any of the three nodes of the domain fails {e.g.,
because SB is not the same space bank that was used to create
the domain}, c will be 2. If D is not a domain with the
right brand, c will be 3. Otherwise, the operation is successful,
c is 0, and all keys to D become DK(0). This call is prompt
if SB is. {The databyte of D is ignored.}
DC(DOMAINCREATOR__DESTROY_ME{=8},(4,n);RE,SB,,EX)
Destroys the domain designated by resume key EX {the
caller} and returns to resume key RE. Useful for a domain
that wants to commit suicide and notify someone else when
it has. If EX is not a resume key to a domain whose brand
is the brander of this DC, return code 3 is returned to
EX. If SB is not an official space bank, return code 1
is returned to EX. If the attempt to destroy any of the
three nodes of the domain fails, return code 2 is returned
to EX. Otherwise, return code n is returned to RE. If the
string for n has fewer than 4 bytes it is padded with zeros.
Similar to "DESTROY_DOMAIN" above.
{obsolete}DC(DOMAINCREATOR__DESTROY_CALLER{=X'40000000'}+n;RE,SB,,EX
) where 0 <= n < 2**30
Similar to the above, but the return code n is restricted.
DC(DOMAINCREATOR__IDENTIFY_ENTRY{=2};E==>c;D)
If E is a start key and the brand of the domain designated
by E is the brander of this DC then this operation returns
the databyte {(crent)} of E in c and
a domain key to E's domain in D; otherwise it returns -1
in c. The databyte of D will be zero. This call is prompt.
DC(DOMAINCREATOR__IDENTIFY_EXIT{=3};E==>c;D)
Similar to "identify entry". E must be a return or fault
key. See (p3,res-ex) about
why restart keys are excluded.
{obsolete}DC(DOMAINCREATOR__DESTROY{=4};,SB==>c;)
Attempts to destroy DC. If DC does not have destroy rights,
c will be kt+2. If SB is not an official prompt space bank
c will be 1. If the attempt to return space used by DC fails,
c will be 2. Otherwise c will be 0 and all keys to DC {both
with and without destroy rights} will be DK(0).
DC(DOMAINCREATOR__IDENTIFY_thing;S==>c;D,N)
DC(DOMAINCREATOR__WEAKEN{=13};==>;WDC)
Returns a key WDC to DC without destroy rights.
DC(kt;==>c;) returns X'0D' in c promptly.
DC(kt+4 ==> c;)
If DC doesn't have destroy rights, c=kt+2.
Otherwise, this operation attempts to destroy the DC. c=0
if successful. c=1 if unsuccessful {because the bank that
DC was made from has been destroyed} {and DC is useless}.
The following definitions can be found in MACLIBS PLIGATES
and DOMAIN, member DOMCDEFS.
DOMAINCREATOR__CREATE_DOMAIN=0, DOMAINCREATOR__DESTROY_DOMAIN=1,
DOMAINCREATOR__IDENTIFY_ENTRY=2, DOMAINCREATOR__IDENTIFY_EXIT=3,
DOMAINCREATOR__DESTROY=4, DOMAINCREATOR__IDENTIFY_SEGMENT=5,
DOMAINCREATOR__IDENTIFY_SEGMENT_WITH_EXIT_KEY_KEEPER=6,
DOMAINCREATOR__IDENTIFY_SEGMENT_WITH_DOMAIN_KEY_KEEPER=7,
DOMAINCREATOR__WEAKEN=13,
DOMAINCREATOR__DESTROY_CALLER=X'40000000'
{arcane}{nonref}Design Notes:
{arcane}{nonref}Design proposal: We want to have a weakened
version of a DC so that a domain can destroy itself without
interfering with DDT {i.e., without being able to get a
strong key to itself}.
It would be useful to have an operation on a DC that takes
a domain key to a domain, the bank from which that domain
was built and severs all keys to that domain and returns
a new domain key thereto. This is safe because all of the
necessary authority is already present in the DC and its
parameters. It would be efficient because the DC could ask
the bank to sever the root node.