1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- G N A T . S O C K E T S . C O N S T A N T S --
9 -- Copyright (C) 2000-2005, Free Software Foundation, Inc. --
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. --
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. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
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.
38 -- This is the version for Interix
39 -- Do not edit this file by hand, instead edit and re-run gen-soccon.c
41 package GNAT
.Sockets
.Constants
is
47 AF_INET
: constant := 2; -- IPv4 address family
48 AF_INET6
: constant := -1; -- IPv6 address family
54 SOCK_STREAM
: constant := 1; -- Stream socket
55 SOCK_DGRAM
: constant := 2; -- Datagram socket
61 EACCES
: constant := 13; -- Permission denied
62 EADDRINUSE
: constant := 48; -- Address already in use
63 EADDRNOTAVAIL
: constant := 49; -- Cannot assign address
64 EAFNOSUPPORT
: constant := 47; -- Addr family not supported
65 EALREADY
: constant := 37; -- Operation in progress
66 EBADF
: constant := 9; -- Bad file descriptor
67 ECONNABORTED
: constant := 53; -- Connection aborted
68 ECONNREFUSED
: constant := 61; -- Connection refused
69 ECONNRESET
: constant := 54; -- Connection reset by peer
70 EDESTADDRREQ
: constant := 82; -- Destination addr required
71 EFAULT
: constant := 14; -- Bad address
72 EHOSTDOWN
: constant := 64; -- Host is down
73 EHOSTUNREACH
: constant := 65; -- No route to host
74 EINPROGRESS
: constant := 80; -- Operation now in progress
75 EINTR
: constant := 4; -- Interrupted system call
76 EINVAL
: constant := 22; -- Invalid argument
77 EIO
: constant := 5; -- Input output error
78 EISCONN
: constant := 56; -- Socket already connected
79 ELOOP
: constant := 62; -- Too many symbolic lynks
80 EMFILE
: constant := 24; -- Too many open files
81 EMSGSIZE
: constant := 83; -- Message too long
82 ENAMETOOLONG
: constant := 38; -- Name too long
83 ENETDOWN
: constant := 50; -- Network is down
84 ENETRESET
: constant := 52; -- Disconn. on network reset
85 ENETUNREACH
: constant := 51; -- Network is unreachable
86 ENOBUFS
: constant := 55; -- No buffer space available
87 ENOPROTOOPT
: constant := 85; -- Protocol not available
88 ENOTCONN
: constant := 57; -- Socket not connected
89 ENOTSOCK
: constant := 81; -- Operation on non socket
90 EOPNOTSUPP
: constant := 45; -- Operation not supported
91 EPFNOSUPPORT
: constant := 46; -- Unknown protocol family
92 EPROTONOSUPPORT
: constant := 43; -- Unknown protocol
93 EPROTOTYPE
: constant := 84; -- Unknown protocol type
94 ESHUTDOWN
: constant := 58; -- Cannot send once shutdown
95 ESOCKTNOSUPPORT
: constant := 44; -- Socket type not supported
96 ETIMEDOUT
: constant := 60; -- Connection timed out
97 ETOOMANYREFS
: constant := 59; -- Too many references
98 EWOULDBLOCK
: constant := 11; -- Operation would block
104 HOST_NOT_FOUND
: constant := 90; -- Unknown host
105 TRY_AGAIN
: constant := 91; -- Host name lookup failure
106 NO_DATA
: constant := 93; -- No data record for name
107 NO_RECOVERY
: constant := 92; -- Non recoverable errors
113 FIONBIO
: constant := -2147195390; -- Set/clear non-blocking io
114 FIONREAD
: constant := 1074030081; -- How many bytes to read
120 SHUT_RD
: constant := 0; -- No more recv
121 SHUT_WR
: constant := 1; -- No more send
122 SHUT_RDWR
: constant := 2; -- No more recv/send
124 ---------------------
125 -- Protocol levels --
126 ---------------------
128 SOL_SOCKET
: constant := 65535; -- Options for socket level
129 IPPROTO_IP
: constant := 0; -- Dummy protocol for IP
130 IPPROTO_UDP
: constant := 17; -- UDP
131 IPPROTO_TCP
: constant := 6; -- TCP
137 MSG_OOB
: constant := 1; -- Process out-of-band data
138 MSG_PEEK
: constant := 2; -- Peek at incoming data
139 MSG_EOR
: constant := 8; -- Send end of record
140 MSG_WAITALL
: constant := 64; -- Wait for full reception
141 MSG_NOSIGNAL
: constant := -1; -- No SIGPIPE on send
142 MSG_Forced_Flags
: constant := 0;
148 TCP_NODELAY
: constant := 1; -- Do not coalesce packets
149 SO_SNDBUF
: constant := 4097; -- Set/get send buffer size
150 SO_RCVBUF
: constant := 4098; -- Set/get recv buffer size
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_ERROR
: constant := 4103; -- Get/clear error status
155 SO_BROADCAST
: constant := 32; -- Can send broadcast msgs
156 IP_ADD_MEMBERSHIP
: constant := 5; -- Join a multicast group
157 IP_DROP_MEMBERSHIP
: constant := 6; -- Leave a multicast group
158 IP_MULTICAST_TTL
: constant := 3; -- Set/get multicast TTL
159 IP_MULTICAST_LOOP
: constant := 4; -- Set/get mcast loopback
161 end GNAT
.Sockets
.Constants
;