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 powerpc-linux
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.
42 package GNAT
.Sockets
.Constants
is
48 AF_INET
: constant := 2; -- IPv4 address family
49 AF_INET6
: constant := 10; -- IPv6 address family
55 SOCK_STREAM
: constant := 1; -- Stream socket
56 SOCK_DGRAM
: constant := 2; -- Datagram socket
62 EACCES
: constant := 13; -- Permission denied
63 EADDRINUSE
: constant := 98; -- Address already in use
64 EADDRNOTAVAIL
: constant := 99; -- Cannot assign address
65 EAFNOSUPPORT
: constant := 97; -- Addr family not supported
66 EALREADY
: constant := 114; -- Operation in progress
67 EBADF
: constant := 9; -- Bad file descriptor
68 ECONNABORTED
: constant := 103; -- Connection aborted
69 ECONNREFUSED
: constant := 111; -- Connection refused
70 ECONNRESET
: constant := 104; -- Connection reset by peer
71 EDESTADDRREQ
: constant := 89; -- Destination addr required
72 EFAULT
: constant := 14; -- Bad address
73 EHOSTDOWN
: constant := 112; -- Host is down
74 EHOSTUNREACH
: constant := 113; -- No route to host
75 EINPROGRESS
: constant := 115; -- 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 := 106; -- Socket already connected
80 ELOOP
: constant := 40; -- Too many symbolic lynks
81 EMFILE
: constant := 24; -- Too many open files
82 EMSGSIZE
: constant := 90; -- Message too long
83 ENAMETOOLONG
: constant := 36; -- Name too long
84 ENETDOWN
: constant := 100; -- Network is down
85 ENETRESET
: constant := 102; -- Disconn. on network reset
86 ENETUNREACH
: constant := 101; -- Network is unreachable
87 ENOBUFS
: constant := 105; -- No buffer space available
88 ENOPROTOOPT
: constant := 92; -- Protocol not available
89 ENOTCONN
: constant := 107; -- Socket not connected
90 ENOTSOCK
: constant := 88; -- Operation on non socket
91 EOPNOTSUPP
: constant := 95; -- Operation not supported
92 EPFNOSUPPORT
: constant := 96; -- Unknown protocol family
93 EPROTONOSUPPORT
: constant := 93; -- Unknown protocol
94 EPROTOTYPE
: constant := 91; -- Unknown protocol type
95 ESHUTDOWN
: constant := 108; -- Cannot send once shutdown
96 ESOCKTNOSUPPORT
: constant := 94; -- Socket type not supported
97 ETIMEDOUT
: constant := 110; -- Connection timed out
98 ETOOMANYREFS
: constant := 109; -- Too many references
99 EWOULDBLOCK
: constant := 11; -- Operation would block
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
114 FIONBIO
: constant := -2147195266; -- Set/clear non-blocking io
115 FIONREAD
: constant := 1074030207; -- How many bytes to read
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
125 ---------------------
126 -- Protocol levels --
127 ---------------------
129 SOL_SOCKET
: constant := 1; -- 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
138 MSG_OOB
: constant := 1; -- Process out-of-band data
139 MSG_PEEK
: constant := 2; -- Peek at incoming data
140 MSG_EOR
: constant := 128; -- Send end of record
141 MSG_WAITALL
: constant := 256; -- Wait for full reception
142 MSG_NOSIGNAL
: constant := 16384; -- No SIGPIPE on send
143 MSG_Forced_Flags
: constant := MSG_NOSIGNAL
;
144 -- Flags set on all send(2) calls
150 TCP_NODELAY
: constant := 1; -- Do not coalesce packets
151 SO_REUSEADDR
: constant := 2; -- Bind reuse local address
152 SO_KEEPALIVE
: constant := 9; -- Enable keep-alive msgs
153 SO_LINGER
: constant := 13; -- Defer close to flush data
154 SO_BROADCAST
: constant := 6; -- Can send broadcast msgs
155 SO_SNDBUF
: constant := 7; -- Set/get send buffer size
156 SO_RCVBUF
: constant := 8; -- Set/get recv buffer size
157 SO_SNDTIMEO
: constant := 19; -- Emission timeout
158 SO_RCVTIMEO
: constant := 18; -- Reception timeout
159 SO_ERROR
: constant := 4; -- Get/clear error status
160 IP_MULTICAST_IF
: constant := 32; -- Set/get mcast interface
161 IP_MULTICAST_TTL
: constant := 33; -- Set/get multicast TTL
162 IP_MULTICAST_LOOP
: constant := 34; -- Set/get mcast loopback
163 IP_ADD_MEMBERSHIP
: constant := 35; -- Join a multicast group
164 IP_DROP_MEMBERSHIP
: constant := 36; -- Leave a multicast group
170 IOV_MAX
: constant := 2147483647; -- Maximum writev iovcnt
172 ----------------------
173 -- Type definitions --
174 ----------------------
176 -- Sizes (in bytes) of the components of struct timeval
178 SIZEOF_tv_sec
: constant := 4; -- tv_sec
179 SIZEOF_tv_usec
: constant := 4; -- tv_usec
181 end GNAT
.Sockets
.Constants
;