+2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
+
+ * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
+ * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
+
2019-07-11 Justin Squirek <squirek@adacore.com>
* exp_ch9.adb (Build_Private_Protected_Declaration): Add
Modes : constant array (Mode_Type) of C.int :=
(Socket_Stream => SOSC.SOCK_STREAM,
- Socket_Datagram => SOSC.SOCK_DGRAM);
+ Socket_Datagram => SOSC.SOCK_DGRAM,
+ Socket_Raw => SOSC.SOCK_RAW);
Shutmodes : constant array (Shutmode_Type) of C.int :=
(Shut_Read => SOSC.SHUT_RD,
-- The order of the enumeration elements should not be changed unilaterally
-- because the IPv6_TCP_Preferred routine rely on it.
- type Mode_Type is (Socket_Stream, Socket_Datagram);
+ type Mode_Type is (Socket_Stream, Socket_Datagram, Socket_Raw);
-- Stream sockets provide connection-oriented byte streams. Datagram
- -- sockets support unreliable connectionless message based communication.
+ -- sockets support unreliable connectionless message-based communication.
+ -- Raw sockets provide raw network-protocol access.
-- The order of the enumeration elements should not be changed unilaterally
- -- because the IPv6_TCP_Preferred routine rely on it.
+ -- because the IPv6_TCP_Preferred routine relies on it.
type Shutmode_Type is (Shut_Read, Shut_Write, Shut_Read_Write);
-- When a process closes a socket, the policy is to retain any data queued
-- until either a delivery or a timeout expiration (in this case, the data
- -- are discarded). A finer control is available through shutdown. With
+ -- are discarded). Finer control is available through shutdown. With
-- Shut_Read, no more data can be received from the socket. With_Write, no
-- more data can be transmitted. Neither transmission nor reception can be
-- performed with Shut_Read_Write.