tree checksum vpatch file split hunks
all signers: asciilifeform diana_coman
antecedents: udp_genesis
press order:
udp_genesis | asciilifeform diana_coman |
udp_errata_asciilifeform | asciilifeform diana_coman |
patch:
(64 . 6)(64 . 8)
5
6 end if;
7
8 UDP.Close_Socket(Socket);
9
10 Put_Line("Done.");
11
12 end UDP_Echo_Demo;
- 68CE604C3473B8E39860974754A353618BA8F1F34A3038C111D0CF64E4558A9BC909F63368BF71D076C4895129AC2EFB5F44E27F03B7FB38D515ACD4E6DA2E62(45 . 6)(45 . 7)
17 pragma Restrictions(No_Floating_Point);
18 pragma Restrictions(No_Implementation_Aspect_Specifications);
19 pragma Restrictions(No_Implementation_Units);
20 pragma Restrictions(No_Implicit_Conditionals);
21 pragma Restrictions(No_Implicit_Dynamic_Code);
22 pragma Restrictions(No_Implicit_Heap_Allocations);
23 pragma Restrictions(No_Implicit_Protected_Object_Allocations);
- 08D9E728F35338ACA8CBD7B2D0D1A124F731E286C15DF2E65C4D7C9BB6BF750CD44ACBB818ECA656BFD3402B77927C300693978576622E6E241C2F00824CC7FE(71 . 7)(71 . 7)- E5225E08AAD2ECDAA42E10638FFF93C70F5756AD293CC7FCA22DFB156583DBEF132EEAF48EB36B6614637DD22EFEFB5CFC43FD724456E9E80E39ACC1742D157E
28 end Open_Socket;
29
30
31 -- Permanently close the given open given socket
32 -- Permanently close the given open socket
33 procedure Close_Socket(S : in out Socket) is
34 begin
35 Unix_UDP_Socket_Close(Socket => S'Address);
(94 . 8)(94 . 11)
37 Close_Socket(S);
38 raise UDP_Failed_Transmit;
39 when others =>
40 -- No eggog
41 null;
42 -- No eggog, but must check if sent all bytes:
43 if (Result /= Payload'Length) then
44 Close_Socket(S);
45 raise UDP_Truncated_Send;
46 end if;
47 end case;
48 end Transmit;
49
(30 . 7)(30 . 6)- 1CE3FCE5802BD1C1DF524A6C3E1C9B2A45C62535D72602BE8C7EF81E47CC543CE4D150AE2F1DCA99D7B77F64209D2F47789AE08DEE79473009F0531DF1B77AA0
54
55 type Payload is array(1 .. Payload_Size) of Unsigned_8;
56
57 -- type IP_Address is array(1 .. 4) of Unsigned_8;
58 subtype IP_Address is Unsigned_32;
59 subtype IP_Port is Unsigned_16;
60
(63 . 7)(62 . 7)
62 procedure Open_Socket(S : out Socket;
63 Local_Endpoint : in Endpoint);
64
65 -- Permanently close the given open given socket
66 -- Permanently close the given open socket
67 procedure Close_Socket(S : in out Socket);
68
69 -- Transmit the Payload, via Socket, to given Destination
(84 . 6)(83 . 7)
71 UDP_Failed_SetOpt : exception;
72 UDP_Failed_Bind : exception;
73 UDP_Failed_Transmit : exception;
74 UDP_Truncated_Send : exception;
75 UDP_Failed_Receive : exception;
76
77 private
(41 . 6)(41 . 7)- 5E6A00D7ADE4D49943694A4158F8E30C101A0FD47116632D6AB4EC42358D506B0E4EBCE8D199A5DFBD6B6684A3E2DA67F50509E4AD19707F405CFE4E07599242
82 char *txt = inet_ntoa(addr);
83 strncpy(buf, txt, buf_size);
84 }
85 /* Should be replaced with native routine */
86
87
88 /* string to local-endian ip conversion */
(51 . 6)(52 . 7)
90 *ip = ntohl(addr.s_addr);
91 return 0;
92 }
93 /* Should be replaced with native routine */
94
95
96 int unix_udp_socket_open(UDP_Socket *S,
(1 . 1)(1 . 2)
101 543080 udp_genesis diana_coman Regrind of asciilifeform's UDP lib genesis, to bring it to current format (Keccak hashes, manifest file and standard compliant names for vpatches). A minimal library for UDP communications with fixed-size payloads sent/received over the wire. Uses Ada and C code.
102 543081 udp_errata_asciilifeform diana_coman Regrind of asciilifeform's errata on his UDP lib: adds closing socket calls, corrects and adds to comments.
- 40398049EB151A9D306259D68A3865847C6591020AD12DA0D9E374DF9B5B8B7C2812576ED9298E83B115AC6636FE402B398C0810287E0CBF7904A05D2632F918(88 . 6)(88 . 8)
107
108 end if;
109
110 UDP.Close_Socket(Socket);
111
112 Put_Line("Done.");
113
114 end UDP_Tx_Demo;