-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- by the GNAT.Sockets package (g-socket.ads). This package should not be
-- directly with'ed by an applications program.
--- This is the version for GNU/Linux
+-- WARNING! This file is a default version that must be replaced for
+-- each platform by running gen-soccon.c which automatically generates
+-- the appropriate target specific values.
+
+-- The values below were computed from a i686-pc-linux-gnu environment,
+-- but are for illustration purposes only. As noted above, part of a port
+-- to a new target is to replace this file appropriately.
+
+-- This file is generated automatically, do not modify it by hand! Instead,
+-- make changes to gen-soccon.c and re-run it on each target.
package GNAT.Sockets.Constants is
MSG_PEEK : constant := 2; -- Peek at incoming data
MSG_EOR : constant := 128; -- Send end of record
MSG_WAITALL : constant := 256; -- Wait for full reception
+ MSG_NOSIGNAL : constant := 16384; -- No SIGPIPE on send
+ MSG_Forced_Flags : constant := MSG_NOSIGNAL;
+ -- Flags set on all send(2) calls
--------------------
-- Socket options --
--------------------
TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_SNDBUF : constant := 7; -- Set/get send buffer size
- SO_RCVBUF : constant := 8; -- Set/get recv buffer size
SO_REUSEADDR : constant := 2; -- Bind reuse local address
SO_KEEPALIVE : constant := 9; -- Enable keep-alive msgs
SO_LINGER : constant := 13; -- Defer close to flush data
- SO_ERROR : constant := 4; -- Get/clear error status
SO_BROADCAST : constant := 6; -- Can send broadcast msgs
- IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
+ SO_SNDBUF : constant := 7; -- Set/get send buffer size
+ SO_RCVBUF : constant := 8; -- Set/get recv buffer size
+ SO_SNDTIMEO : constant := 21; -- Emission timeout
+ SO_RCVTIMEO : constant := 20; -- Reception timeout
+ SO_ERROR : constant := 4; -- Get/clear error status
+ IP_MULTICAST_IF : constant := 32; -- Set/get mcast interface
IP_MULTICAST_TTL : constant := 33; -- Set/get multicast TTL
IP_MULTICAST_LOOP : constant := 34; -- Set/get mcast loopback
+ IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
+ IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
+
+ -------------------
+ -- System limits --
+ -------------------
+
+ IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
+
+ ----------------------
+ -- Type definitions --
+ ----------------------
+
+ -- Sizes (in bytes) of the components of struct timeval
+
+ SIZEOF_tv_sec : constant := 4; -- tv_sec
+ SIZEOF_tv_usec : constant := 4; -- tv_usec
+
+ ----------------------------------------
+ -- Properties of supported interfaces --
+ ----------------------------------------
+
+ Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
+
+ ----------------------
+ -- Additional flags --
+ ----------------------
+
+ Thread_Blocking_IO : constant Boolean := True;
+ -- Set False for contexts where socket i/o are process blocking
end GNAT.Sockets.Constants;