OSDN Git Service

2008-04-08 Ed Schonberg <schonberg@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / g-soccon-linux-mips.ads
1 ------------------------------------------------------------------------------
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-linux, manually edited for the first shot
39 --  no mips hardware at hand
40 --  using http://www.gelato.unsw.edu.au/lxr/source/include/asm-mips/socket.h
41 --  in order to find differents values
42 --  This file is generated automatically, do not modify it by hand! Instead,
43 --  make changes to gen-soccon.c and re-run it on each target.
44
45 package GNAT.Sockets.Constants is
46
47    --------------
48    -- Families --
49    --------------
50
51    AF_INET            : constant :=            2; --  IPv4 address family
52    AF_INET6           : constant :=           10; --  IPv6 address family
53
54    -----------
55    -- Modes --
56    -----------
57
58    SOCK_STREAM        : constant :=            1; --  Stream socket
59    SOCK_DGRAM         : constant :=            2; --  Datagram socket
60
61    -------------------
62    -- Socket errors --
63    -------------------
64
65    EACCES             : constant :=           13; --  Permission denied
66    EADDRINUSE         : constant :=           98; --  Address already in use
67    EADDRNOTAVAIL      : constant :=           99; --  Cannot assign address
68    EAFNOSUPPORT       : constant :=           97; --  Addr family not supported
69    EALREADY           : constant :=          114; --  Operation in progress
70    EBADF              : constant :=            9; --  Bad file descriptor
71    ECONNABORTED       : constant :=          103; --  Connection aborted
72    ECONNREFUSED       : constant :=          111; --  Connection refused
73    ECONNRESET         : constant :=          104; --  Connection reset by peer
74    EDESTADDRREQ       : constant :=           89; --  Destination addr required
75    EFAULT             : constant :=           14; --  Bad address
76    EHOSTDOWN          : constant :=          112; --  Host is down
77    EHOSTUNREACH       : constant :=          113; --  No route to host
78    EINPROGRESS        : constant :=          115; --  Operation now in progress
79    EINTR              : constant :=            4; --  Interrupted system call
80    EINVAL             : constant :=           22; --  Invalid argument
81    EIO                : constant :=            5; --  Input output error
82    EISCONN            : constant :=          106; --  Socket already connected
83    ELOOP              : constant :=           40; --  Too many symbolic lynks
84    EMFILE             : constant :=           24; --  Too many open files
85    EMSGSIZE           : constant :=           90; --  Message too long
86    ENAMETOOLONG       : constant :=           36; --  Name too long
87    ENETDOWN           : constant :=          100; --  Network is down
88    ENETRESET          : constant :=          102; --  Disconn. on network reset
89    ENETUNREACH        : constant :=          101; --  Network is unreachable
90    ENOBUFS            : constant :=          105; --  No buffer space available
91    ENOPROTOOPT        : constant :=           92; --  Protocol not available
92    ENOTCONN           : constant :=          107; --  Socket not connected
93    ENOTSOCK           : constant :=           88; --  Operation on non socket
94    EOPNOTSUPP         : constant :=           95; --  Operation not supported
95    EPFNOSUPPORT       : constant :=           96; --  Unknown protocol family
96    EPROTONOSUPPORT    : constant :=           93; --  Unknown protocol
97    EPROTOTYPE         : constant :=           91; --  Unknown protocol type
98    ESHUTDOWN          : constant :=          108; --  Cannot send once shutdown
99    ESOCKTNOSUPPORT    : constant :=           94; --  Socket type not supported
100    ETIMEDOUT          : constant :=          110; --  Connection timed out
101    ETOOMANYREFS       : constant :=          109; --  Too many references
102    EWOULDBLOCK        : constant :=           11; --  Operation would block
103
104    -----------------
105    -- Host errors --
106    -----------------
107
108    HOST_NOT_FOUND     : constant :=            1; --  Unknown host
109    TRY_AGAIN          : constant :=            2; --  Host name lookup failure
110    NO_DATA            : constant :=            4; --  No data record for name
111    NO_RECOVERY        : constant :=            3; --  Non recoverable errors
112
113    -------------------
114    -- Control flags --
115    -------------------
116
117    FIONBIO            : constant :=     16#667e#; --  Set/clear non-blocking io
118    FIONREAD           : constant :=     16#467f#; --  How many bytes to read
119
120    --------------------
121    -- Shutdown modes --
122    --------------------
123
124    SHUT_RD            : constant :=            0; --  No more recv
125    SHUT_WR            : constant :=            1; --  No more send
126    SHUT_RDWR          : constant :=            2; --  No more recv/send
127
128    ---------------------
129    -- Protocol levels --
130    ---------------------
131
132    SOL_SOCKET         : constant :=            1; --  Options for socket level
133    IPPROTO_IP         : constant :=            0; --  Dummy protocol for IP
134    IPPROTO_UDP        : constant :=           17; --  UDP
135    IPPROTO_TCP        : constant :=            6; --  TCP
136
137    -------------------
138    -- Request flags --
139    -------------------
140
141    MSG_OOB            : constant :=            1; --  Process out-of-band data
142    MSG_PEEK           : constant :=            2; --  Peek at incoming data
143    MSG_EOR            : constant :=          128; --  Send end of record
144    MSG_WAITALL        : constant :=          256; --  Wait for full reception
145    MSG_NOSIGNAL       : constant :=        16384; --  No SIGPIPE on send
146    MSG_Forced_Flags   : constant := MSG_NOSIGNAL;
147    --  Flags set on all send(2) calls
148
149    --------------------
150    -- Socket options --
151    --------------------
152
153    TCP_NODELAY        : constant :=            1; --  Do not coalesce packets
154    SO_REUSEADDR       : constant :=            4; --  Bind reuse local address
155    SO_KEEPALIVE       : constant :=            8; --  Enable keep-alive msgs
156    SO_LINGER          : constant :=       16#80#; --  Defer close to flush data
157    SO_BROADCAST       : constant :=       16#20#; --  Can send broadcast msgs
158    SO_SNDBUF          : constant :=     16#1001#; --  Set/get send buffer size
159    SO_RCVBUF          : constant :=     16#1002#; --  Set/get recv buffer size
160    SO_SNDTIMEO        : constant :=     16#1005#; --  Emission timeout
161    SO_RCVTIMEO        : constant :=     16#1006#; --  Reception timeout
162    SO_ERROR           : constant :=     16#1007#; --  Get/clear error status
163    IP_MULTICAST_IF    : constant :=           32; --  Set/get mcast interface
164    IP_MULTICAST_TTL   : constant :=           33; --  Set/get multicast TTL
165    IP_MULTICAST_LOOP  : constant :=           34; --  Set/get mcast loopback
166    IP_ADD_MEMBERSHIP  : constant :=           35; --  Join a multicast group
167    IP_DROP_MEMBERSHIP : constant :=           36; --  Leave a multicast group
168
169    -------------------
170    -- System limits --
171    -------------------
172
173    IOV_MAX            : constant :=   2147483647; --  Maximum writev iovcnt
174
175    ----------------------
176    -- Type definitions --
177    ----------------------
178
179    --  Sizes (in bytes) of the components of struct timeval
180
181    SIZEOF_tv_sec      : constant :=            4; --  tv_sec
182    SIZEOF_tv_usec     : constant :=            4; --  tv_usec
183
184    ----------------------------------------
185    -- Properties of supported interfaces --
186    ----------------------------------------
187
188    Need_Netdb_Buffer  : constant :=            1; --  Need buffer for Netdb ops
189
190    ----------------------
191    -- Additional flags --
192    ----------------------
193
194    Thread_Blocking_IO : constant Boolean := True;
195    --  Set False for contexts where socket i/o are process blocking
196
197 end GNAT.Sockets.Constants;