1 |
12 |
jlechner |
------------------------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
-- GNAT COMPILER COMPONENTS --
|
4 |
|
|
-- --
|
5 |
|
|
-- G N A T . S O C K E T S . C O N S T A N T S --
|
6 |
|
|
-- --
|
7 |
|
|
-- S p e c --
|
8 |
|
|
-- --
|
9 |
|
|
-- Copyright (C) 2000-2005, Free Software Foundation, Inc. --
|
10 |
|
|
-- --
|
11 |
|
|
-- GNAT is free software; you can redistribute it and/or modify it under --
|
12 |
|
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
13 |
|
|
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
14 |
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
15 |
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
16 |
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
17 |
|
|
-- for more details. You should have received a copy of the GNU General --
|
18 |
|
|
-- Public License distributed with GNAT; see file COPYING. If not, write --
|
19 |
|
|
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
|
20 |
|
|
-- Boston, MA 02110-1301, USA. --
|
21 |
|
|
-- --
|
22 |
|
|
-- As a special exception, if other files instantiate generics from this --
|
23 |
|
|
-- unit, or you link this unit with other files to produce an executable, --
|
24 |
|
|
-- this unit does not by itself cause the resulting executable to be --
|
25 |
|
|
-- covered by the GNU General Public License. This exception does not --
|
26 |
|
|
-- however invalidate any other reasons why the executable file might be --
|
27 |
|
|
-- covered by the GNU Public License. --
|
28 |
|
|
-- --
|
29 |
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
30 |
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
31 |
|
|
-- --
|
32 |
|
|
------------------------------------------------------------------------------
|
33 |
|
|
|
34 |
|
|
-- This package provides target dependent definitions of constant for use
|
35 |
|
|
-- by the GNAT.Sockets package (g-socket.ads). This package should not be
|
36 |
|
|
-- directly with'ed by an applications program.
|
37 |
|
|
|
38 |
|
|
-- This is the version for pentium-mingw32msv
|
39 |
|
|
-- This file is generated automatically, do not modify it by hand! Instead,
|
40 |
|
|
-- make changes to gen-soccon.c and re-run it on each target.
|
41 |
|
|
|
42 |
|
|
package GNAT.Sockets.Constants is
|
43 |
|
|
|
44 |
|
|
--------------
|
45 |
|
|
-- Families --
|
46 |
|
|
--------------
|
47 |
|
|
|
48 |
|
|
AF_INET : constant := 2; -- IPv4 address family
|
49 |
|
|
AF_INET6 : constant := 23; -- IPv6 address family
|
50 |
|
|
|
51 |
|
|
-----------
|
52 |
|
|
-- Modes --
|
53 |
|
|
-----------
|
54 |
|
|
|
55 |
|
|
SOCK_STREAM : constant := 1; -- Stream socket
|
56 |
|
|
SOCK_DGRAM : constant := 2; -- Datagram socket
|
57 |
|
|
|
58 |
|
|
-------------------
|
59 |
|
|
-- Socket errors --
|
60 |
|
|
-------------------
|
61 |
|
|
|
62 |
|
|
EACCES : constant := 10013; -- Permission denied
|
63 |
|
|
EADDRINUSE : constant := 10048; -- Address already in use
|
64 |
|
|
EADDRNOTAVAIL : constant := 10049; -- Cannot assign address
|
65 |
|
|
EAFNOSUPPORT : constant := 10047; -- Addr family not supported
|
66 |
|
|
EALREADY : constant := 10037; -- Operation in progress
|
67 |
|
|
EBADF : constant := 10009; -- Bad file descriptor
|
68 |
|
|
ECONNABORTED : constant := 10053; -- Connection aborted
|
69 |
|
|
ECONNREFUSED : constant := 10061; -- Connection refused
|
70 |
|
|
ECONNRESET : constant := 10054; -- Connection reset by peer
|
71 |
|
|
EDESTADDRREQ : constant := 10039; -- Destination addr required
|
72 |
|
|
EFAULT : constant := 10014; -- Bad address
|
73 |
|
|
EHOSTDOWN : constant := 10064; -- Host is down
|
74 |
|
|
EHOSTUNREACH : constant := 10065; -- No route to host
|
75 |
|
|
EINPROGRESS : constant := 10036; -- Operation now in progress
|
76 |
|
|
EINTR : constant := 10004; -- Interrupted system call
|
77 |
|
|
EINVAL : constant := 10022; -- Invalid argument
|
78 |
|
|
EIO : constant := 10101; -- Input output error
|
79 |
|
|
EISCONN : constant := 10056; -- Socket already connected
|
80 |
|
|
ELOOP : constant := 10062; -- Too many symbolic lynks
|
81 |
|
|
EMFILE : constant := 10024; -- Too many open files
|
82 |
|
|
EMSGSIZE : constant := 10040; -- Message too long
|
83 |
|
|
ENAMETOOLONG : constant := 10063; -- Name too long
|
84 |
|
|
ENETDOWN : constant := 10050; -- Network is down
|
85 |
|
|
ENETRESET : constant := 10052; -- Disconn. on network reset
|
86 |
|
|
ENETUNREACH : constant := 10051; -- Network is unreachable
|
87 |
|
|
ENOBUFS : constant := 10055; -- No buffer space available
|
88 |
|
|
ENOPROTOOPT : constant := 10042; -- Protocol not available
|
89 |
|
|
ENOTCONN : constant := 10057; -- Socket not connected
|
90 |
|
|
ENOTSOCK : constant := 10038; -- Operation on non socket
|
91 |
|
|
EOPNOTSUPP : constant := 10045; -- Operation not supported
|
92 |
|
|
EPFNOSUPPORT : constant := 10046; -- Unknown protocol family
|
93 |
|
|
EPROTONOSUPPORT : constant := 10043; -- Unknown protocol
|
94 |
|
|
EPROTOTYPE : constant := 10041; -- Unknown protocol type
|
95 |
|
|
ESHUTDOWN : constant := 10058; -- Cannot send once shutdown
|
96 |
|
|
ESOCKTNOSUPPORT : constant := 10044; -- Socket type not supported
|
97 |
|
|
ETIMEDOUT : constant := 10060; -- Connection timed out
|
98 |
|
|
ETOOMANYREFS : constant := 10059; -- Too many references
|
99 |
|
|
EWOULDBLOCK : constant := 10035; -- Operation would block
|
100 |
|
|
|
101 |
|
|
-----------------
|
102 |
|
|
-- Host errors --
|
103 |
|
|
-----------------
|
104 |
|
|
|
105 |
|
|
HOST_NOT_FOUND : constant := 11001; -- Unknown host
|
106 |
|
|
TRY_AGAIN : constant := 11002; -- Host name lookup failure
|
107 |
|
|
NO_DATA : constant := 11004; -- No data record for name
|
108 |
|
|
NO_RECOVERY : constant := 11003; -- Non recoverable errors
|
109 |
|
|
|
110 |
|
|
-------------------
|
111 |
|
|
-- Control flags --
|
112 |
|
|
-------------------
|
113 |
|
|
|
114 |
|
|
FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
|
115 |
|
|
FIONREAD : constant := 1074030207; -- How many bytes to read
|
116 |
|
|
|
117 |
|
|
--------------------
|
118 |
|
|
-- Shutdown modes --
|
119 |
|
|
--------------------
|
120 |
|
|
|
121 |
|
|
SHUT_RD : constant := 0; -- No more recv
|
122 |
|
|
SHUT_WR : constant := 1; -- No more send
|
123 |
|
|
SHUT_RDWR : constant := 2; -- No more recv/send
|
124 |
|
|
|
125 |
|
|
---------------------
|
126 |
|
|
-- Protocol levels --
|
127 |
|
|
---------------------
|
128 |
|
|
|
129 |
|
|
SOL_SOCKET : constant := 65535; -- Options for socket level
|
130 |
|
|
IPPROTO_IP : constant := 0; -- Dummy protocol for IP
|
131 |
|
|
IPPROTO_UDP : constant := 17; -- UDP
|
132 |
|
|
IPPROTO_TCP : constant := 6; -- TCP
|
133 |
|
|
|
134 |
|
|
-------------------
|
135 |
|
|
-- Request flags --
|
136 |
|
|
-------------------
|
137 |
|
|
|
138 |
|
|
MSG_OOB : constant := 1; -- Process out-of-band data
|
139 |
|
|
MSG_PEEK : constant := 2; -- Peek at incoming data
|
140 |
|
|
MSG_EOR : constant := -1; -- Send end of record
|
141 |
|
|
MSG_WAITALL : constant := -1; -- Wait for full reception
|
142 |
|
|
MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
|
143 |
|
|
MSG_Forced_Flags : constant := 0;
|
144 |
|
|
-- Flags set on all send(2) calls
|
145 |
|
|
|
146 |
|
|
--------------------
|
147 |
|
|
-- Socket options --
|
148 |
|
|
--------------------
|
149 |
|
|
|
150 |
|
|
TCP_NODELAY : constant := 1; -- Do not coalesce packets
|
151 |
|
|
SO_REUSEADDR : constant := 4; -- Bind reuse local address
|
152 |
|
|
SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
|
153 |
|
|
SO_LINGER : constant := 128; -- Defer close to flush data
|
154 |
|
|
SO_BROADCAST : constant := 32; -- Can send broadcast msgs
|
155 |
|
|
SO_SNDBUF : constant := 4097; -- Set/get send buffer size
|
156 |
|
|
SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
|
157 |
|
|
SO_SNDTIMEO : constant := 4101; -- Emission timeout
|
158 |
|
|
SO_RCVTIMEO : constant := 4102; -- Reception timeout
|
159 |
|
|
SO_ERROR : constant := 4103; -- Get/clear error status
|
160 |
|
|
IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
|
161 |
|
|
IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
|
162 |
|
|
IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
|
163 |
|
|
IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
|
164 |
|
|
IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
|
165 |
|
|
|
166 |
|
|
-------------------
|
167 |
|
|
-- System limits --
|
168 |
|
|
-------------------
|
169 |
|
|
|
170 |
|
|
IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
|
171 |
|
|
|
172 |
|
|
----------------------
|
173 |
|
|
-- Type definitions --
|
174 |
|
|
----------------------
|
175 |
|
|
|
176 |
|
|
-- Sizes (in bytes) of the components of struct timeval
|
177 |
|
|
|
178 |
|
|
SIZEOF_tv_sec : constant := 4; -- tv_sec
|
179 |
|
|
SIZEOF_tv_usec : constant := 4; -- tv_usec
|
180 |
|
|
|
181 |
|
|
end GNAT.Sockets.Constants;
|