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 mips-sgi-irix6.5
|
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 := 24; -- IPv6 address family
|
50 |
|
|
|
51 |
|
|
-----------
|
52 |
|
|
-- Modes --
|
53 |
|
|
-----------
|
54 |
|
|
|
55 |
|
|
SOCK_STREAM : constant := 2; -- Stream socket
|
56 |
|
|
SOCK_DGRAM : constant := 1; -- Datagram socket
|
57 |
|
|
|
58 |
|
|
-------------------
|
59 |
|
|
-- Socket errors --
|
60 |
|
|
-------------------
|
61 |
|
|
|
62 |
|
|
EACCES : constant := 13; -- Permission denied
|
63 |
|
|
EADDRINUSE : constant := 125; -- Address already in use
|
64 |
|
|
EADDRNOTAVAIL : constant := 126; -- Cannot assign address
|
65 |
|
|
EAFNOSUPPORT : constant := 124; -- Addr family not supported
|
66 |
|
|
EALREADY : constant := 149; -- Operation in progress
|
67 |
|
|
EBADF : constant := 9; -- Bad file descriptor
|
68 |
|
|
ECONNABORTED : constant := 130; -- Connection aborted
|
69 |
|
|
ECONNREFUSED : constant := 146; -- Connection refused
|
70 |
|
|
ECONNRESET : constant := 131; -- Connection reset by peer
|
71 |
|
|
EDESTADDRREQ : constant := 96; -- Destination addr required
|
72 |
|
|
EFAULT : constant := 14; -- Bad address
|
73 |
|
|
EHOSTDOWN : constant := 147; -- Host is down
|
74 |
|
|
EHOSTUNREACH : constant := 148; -- No route to host
|
75 |
|
|
EINPROGRESS : constant := 150; -- Operation now in progress
|
76 |
|
|
EINTR : constant := 4; -- Interrupted system call
|
77 |
|
|
EINVAL : constant := 22; -- Invalid argument
|
78 |
|
|
EIO : constant := 5; -- Input output error
|
79 |
|
|
EISCONN : constant := 133; -- Socket already connected
|
80 |
|
|
ELOOP : constant := 90; -- Too many symbolic lynks
|
81 |
|
|
EMFILE : constant := 24; -- Too many open files
|
82 |
|
|
EMSGSIZE : constant := 97; -- Message too long
|
83 |
|
|
ENAMETOOLONG : constant := 78; -- Name too long
|
84 |
|
|
ENETDOWN : constant := 127; -- Network is down
|
85 |
|
|
ENETRESET : constant := 129; -- Disconn. on network reset
|
86 |
|
|
ENETUNREACH : constant := 128; -- Network is unreachable
|
87 |
|
|
ENOBUFS : constant := 132; -- No buffer space available
|
88 |
|
|
ENOPROTOOPT : constant := 99; -- Protocol not available
|
89 |
|
|
ENOTCONN : constant := 134; -- Socket not connected
|
90 |
|
|
ENOTSOCK : constant := 95; -- Operation on non socket
|
91 |
|
|
EOPNOTSUPP : constant := 122; -- Operation not supported
|
92 |
|
|
EPFNOSUPPORT : constant := 123; -- Unknown protocol family
|
93 |
|
|
EPROTONOSUPPORT : constant := 120; -- Unknown protocol
|
94 |
|
|
EPROTOTYPE : constant := 98; -- Unknown protocol type
|
95 |
|
|
ESHUTDOWN : constant := 143; -- Cannot send once shutdown
|
96 |
|
|
ESOCKTNOSUPPORT : constant := 121; -- Socket type not supported
|
97 |
|
|
ETIMEDOUT : constant := 145; -- Connection timed out
|
98 |
|
|
ETOOMANYREFS : constant := 144; -- Too many references
|
99 |
|
|
EWOULDBLOCK : constant := 11; -- Operation would block
|
100 |
|
|
|
101 |
|
|
-----------------
|
102 |
|
|
-- Host errors --
|
103 |
|
|
-----------------
|
104 |
|
|
|
105 |
|
|
HOST_NOT_FOUND : constant := 1; -- Unknown host
|
106 |
|
|
TRY_AGAIN : constant := 2; -- Host name lookup failure
|
107 |
|
|
NO_DATA : constant := 4; -- No data record for name
|
108 |
|
|
NO_RECOVERY : constant := 3; -- 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 := 8; -- Send end of record
|
141 |
|
|
MSG_WAITALL : constant := 64; -- 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 := 20; -- Set/get mcast interface
|
161 |
|
|
IP_MULTICAST_TTL : constant := 21; -- Set/get multicast TTL
|
162 |
|
|
IP_MULTICAST_LOOP : constant := 22; -- Set/get mcast loopback
|
163 |
|
|
IP_ADD_MEMBERSHIP : constant := 23; -- Join a multicast group
|
164 |
|
|
IP_DROP_MEMBERSHIP : constant := 24; -- 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;
|