- D472416A6FDBB7FD240664149E4A120F449AC15839D611E8A6987C145D3FE13C0A2227FE8C6BA3BC8F4ED2350973E7DFE6A074AB87CB02FBAF786396169FE5CF
+ 973FCD28AFF8D88504DE9A8507277D84C0514EDDE25437433F00E3662DA0070BEE6FC80D428FCCEBD7B0F996C5B0EDA8E2BBFCE9FCDD99A542C5AD647B4B5A09
smg_comms/src/data_structs.ads
(44 . 14)(44 . 13)
13 RZ at 12 range 0 .. 7;
14 end record;
15
16 -- length of a text field (i.e. 16 bits, strictly > 0)
17 subtype Text_Len is Positive range 1..2**16-1;
18
19 -- A set of file names glued into a single string
20 -- NB: there IS at least ONE filename and one character
21 -- Upper limit for Text_Len is due to protocol's spec of text basic type
22 type U16_Array is array (Text_Len range <> ) of Interfaces.Unsigned_16;
23 type Filenames( F_No: Text_Len := 1; Sz: Text_Len := 1 ) is
24 type U16_Array is array (Raw_Types.Text_Len range <> )
25 of Interfaces.Unsigned_16;
26 type Filenames( F_No: Raw_Types.Text_Len := 1;
27 Sz: Raw_Types.Text_Len := 1 ) is
28 record
29 -- filenames glued together into 1 single string
30 S : String( 1 .. Sz ) := (others => '0');
(60 . 9)(59 . 9)
32 end record;
33
34 -- A chunk of a file (for file transfer)
35 type File_Chunk( Len : Text_Len := 1;
36 type File_Chunk( Len : Raw_Types.Text_Len := 1;
37 Count : Interfaces.Unsigned_16 := 1;
38 Name_Len: Text_len := 1) is
39 Name_Len: Raw_Types.Text_len := 1) is
40 record
41 Filename: String(1..Name_Len);
42 Content : Raw_Types.Octets(1..Len);
(112 . 4)(111 . 27)
44 end case;
45 end record;
46
47 type Player_RSA is
48 record
49 -- communication protocol Version number
50 Proto_V : Interfaces.Unsigned_8;
51
52 -- communication protocol Subversion number
53 Proto_Subv : Interfaces.Unsigned_16;
54
55 -- Keccak hash of client binary
56 Client_Hash: Raw_Types.Octets_8;
57
58 -- public exponent (e) of RSA key (64 bits precisely)
59 -- nb: this is protocol-specific e, aka shorter than TMSR e...
60 e : Raw_Types.Octets_8;
61
62 -- public modulus (n) of RSA key (490 bits precisely)
63 n : Raw_Types.RSA_len;
64
65 -- preferred padding; magic value 0x13370000 means random padding
66 Padding : Raw_Types.Octets_8;
67
68 end record;
69
70 end Data_Structs;