|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Sub_Registration, seg_0543d4
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
package body Sub_Registration is
function Is_Registration (Mess : Message.Tmessage) return Boolean is
Comm : Message.Command_Type;
begin
Message.Unfill_Command (Mess, Comm);
if Message.Command_Type'Image (Comm) =
Message.Command_Type'Image (Message.Registration) then
return True;
else
return False;
end if;
end Is_Registration;
function Is_Unregistration (Mess : Message.Tmessage) return Boolean is
Comm : Message.Command_Type;
begin
Message.Unfill_Command (Mess, Comm);
if Message.Command_Type'Image (Comm) =
Message.Command_Type'Image (Message.Unregistration) then
return True;
else
return False;
end if;
end Is_Unregistration;
procedure Alloc_Ident (Mess : in out Message.Tmessage;
Ident : out Identification.Tclient_Id) is
Id : Identification.Tclient_Id;
Description : Objects_Known.Tdescription;
begin
Extract_Host_And_Name_And_Sock (Mess.Content, Description.Host,
Description.Name, Description.Sock);
Identification.Set_Unique_Id (Id);
Objects_Known.Enter_New_Object (Id, Description);
Ident := Id;
end Alloc_Ident;
procedure Desalloc_Ident (Ident : in Identification.Tclient_Id) is
begin
Identification.Unset_Unique_Id (Ident);
Objects_Known.Delete_Object (Ident);
end Desalloc_Ident;
procedure Extract_Host_And_Name_And_Sock
(From : Message.Content_String;
Host : in out Message.Content_String;
Name : in out Message.Content_String;
Sock : in out Message.Content_String) is
I : Natural := 1;
J : Natural := 1;
begin
loop
exit when Bounded_String.Extract (From, J, J) = ":";
J := J + 1;
end loop;
Bounded_String.Copy
(Source => Bounded_String.Extract (From, I, J), Target => Host);
J := J + 1;
I := J;
loop
exit when Bounded_String.Extract (From, J, J) = ":";
J := J + 1;
end loop;
Bounded_String.Copy
(Source => Bounded_String.Extract (From, I, J), Target => Sock);
J := J + 1;
I := J;
loop
exit when Bounded_String.Extract (From, J, J) = ":";
J := J + 1;
end loop;
Bounded_String.Copy
(Source => Bounded_String.Extract (From, I, J), Target => Name);
end Extract_Host_And_Name_And_Sock;
end Sub_Registration;
nblk1=4
nid=3
hdr6=6
[0x00] rec0=1f rec1=00 rec2=01 rec3=022
[0x01] rec0=19 rec1=00 rec2=02 rec3=058
[0x02] rec0=19 rec1=00 rec2=04 rec3=000
[0x03] rec0=05 rec1=c8 rec2=0a rec3=142
tail 0x2175d270c87b65c69cb89 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 00 02 0b 80 04 31 3b 20 20 04 00 11 20 20 20 ┆ 1; ┆