OSDN Git Service

* approved by rth
[pf3gnuchains/gcc-fork.git] / gcc / ada / g-soccon.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 --                                                                          --
10 --              Copyright (C) 2001 Ada Core Technologies, Inc.              --
11 --                                                                          --
12 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
13 -- terms of the  GNU General Public License as published  by the Free Soft- --
14 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
15 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
18 -- for  more details.  You should have  received  a copy of the GNU General --
19 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
20 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
21 -- MA 02111-1307, USA.                                                      --
22 --                                                                          --
23 -- As a special exception,  if other files  instantiate  generics from this --
24 -- unit, or you link  this unit with other files  to produce an executable, --
25 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
26 -- covered  by the  GNU  General  Public  License.  This exception does not --
27 -- however invalidate  any other reasons why  the executable file  might be --
28 -- covered by the  GNU Public License.                                      --
29 --                                                                          --
30 -- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com).   --
31 --                                                                          --
32 ------------------------------------------------------------------------------
33
34 --  This is the version for GNU/Linux
35
36 package GNAT.Sockets.Constants is
37
38    --  Families
39
40    AF_INET              : constant :=                2;
41    AF_INET6             : constant :=               10;
42
43    --  Modes
44
45    SOCK_STREAM          : constant :=                1;
46    SOCK_DGRAM           : constant :=                2;
47
48    --  Socket Errors
49
50    EBADF                : constant :=                9;
51    ENOTSOCK             : constant :=               88;
52    ENOTCONN             : constant :=              107;
53    ENOBUFS              : constant :=              105;
54    EOPNOTSUPP           : constant :=               95;
55    EFAULT               : constant :=               14;
56    EWOULDBLOCK          : constant :=               11;
57    EADDRNOTAVAIL        : constant :=               99;
58    EMSGSIZE             : constant :=               90;
59    EADDRINUSE           : constant :=               98;
60    EINVAL               : constant :=               22;
61    EACCES               : constant :=               13;
62    EAFNOSUPPORT         : constant :=               97;
63    EISCONN              : constant :=              106;
64    ETIMEDOUT            : constant :=              110;
65    ECONNREFUSED         : constant :=              111;
66    ENETUNREACH          : constant :=              101;
67    EALREADY             : constant :=              114;
68    EINPROGRESS          : constant :=              115;
69    ENOPROTOOPT          : constant :=               92;
70    EPROTONOSUPPORT      : constant :=               93;
71    EINTR                : constant :=                4;
72    EIO                  : constant :=                5;
73    ESOCKTNOSUPPORT      : constant :=               94;
74
75    --  Host Errors
76
77    HOST_NOT_FOUND       : constant :=                1;
78    TRY_AGAIN            : constant :=                2;
79    NO_ADDRESS           : constant :=                4;
80    NO_RECOVERY          : constant :=                3;
81
82    --  Control Flags
83
84    FIONBIO              : constant :=            21537;
85    FIONREAD             : constant :=            21531;
86
87    --  Shutdown Modes
88
89    SHUT_RD              : constant :=                0;
90    SHUT_WR              : constant :=                1;
91    SHUT_RDWR            : constant :=                2;
92
93    --  Protocol Levels
94
95    SOL_SOCKET           : constant :=                1;
96    IPPROTO_IP           : constant :=                0;
97    IPPROTO_UDP          : constant :=               17;
98    IPPROTO_TCP          : constant :=                6;
99
100    --  Socket Options
101
102    TCP_NODELAY          : constant :=                1;
103    SO_SNDBUF            : constant :=                7;
104    SO_RCVBUF            : constant :=                8;
105    SO_REUSEADDR         : constant :=                2;
106    SO_KEEPALIVE         : constant :=                9;
107    SO_LINGER            : constant :=               13;
108    SO_ERROR             : constant :=                4;
109    SO_BROADCAST         : constant :=                6;
110    IP_ADD_MEMBERSHIP    : constant :=               35;
111    IP_DROP_MEMBERSHIP   : constant :=               36;
112    IP_MULTICAST_TTL     : constant :=               33;
113    IP_MULTICAST_LOOP    : constant :=               34;
114 end GNAT.Sockets.Constants;