~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to compat/os/opensolaris_10_netdb.h

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2011-01-21 18:43:56 UTC
  • mfrom: (1.4.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20110121184356-4zn7gwuzws6lpnuc
Tags: 3.1.10-1
* New upstream release (Closes: #609881)
  - Removed patches integrated upstream
    + 16-CVE-2010-3072
    + 17-CVE-2010-2951
  - Fixes TCP DNS lookups failure on IPv6-disabled systems (Closes: #607379)
  - Fixes HTTPS not working if IPv6 is disabled (Closes: #594713)

* debian/rules
  - Enable ZPH feature (Closes: #597687)

* debian/squid3.ufw.profile
  - Added UFW profile, thanks to Alessio Treglia (Closes: #605088)

* debian/control
  - Added versioned dependency on squid-langpack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copied from OpenSolaris 10 public sources
 
3
 * http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/head/netdb.h
 
4
 */
 
5
/*
 
6
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 
7
 * Use is subject to license terms.
 
8
 */
 
9
 
 
10
/*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
 
11
/*        All Rights Reserved   */
 
12
 
 
13
/*
 
14
 * BIND 4.9.3:
 
15
 *
 
16
 * Copyright (c) 1980, 1983, 1988, 1993
 
17
 *      The Regents of the University of California.  All rights reserved.
 
18
 *
 
19
 * Redistribution and use in source and binary forms, with or without
 
20
 * modification, are permitted provided that the following conditions
 
21
 * are met:
 
22
 * 1. Redistributions of source code must retain the above copyright
 
23
 *    notice, this list of conditions and the following disclaimer.
 
24
 * 2. Redistributions in binary form must reproduce the above copyright
 
25
 *    notice, this list of conditions and the following disclaimer in the
 
26
 *    documentation and/or other materials provided with the distribution.
 
27
 * 3. All advertising materials mentioning features or use of this software
 
28
 *    must display the following acknowledgement:
 
29
 *      This product includes software developed by the University of
 
30
 *      California, Berkeley and its contributors.
 
31
 * 4. Neither the name of the University nor the names of its contributors
 
32
 *    may be used to endorse or promote products derived from this software
 
33
 *    without specific prior written permission.
 
34
 *
 
35
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 
36
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
37
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
38
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 
39
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
40
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
41
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
42
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
43
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
44
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
45
 * SUCH DAMAGE.
 
46
 * -
 
47
 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
 
48
 *
 
49
 * Permission to use, copy, modify, and distribute this software for any
 
50
 * purpose with or without fee is hereby granted, provided that the above
 
51
 * copyright notice and this permission notice appear in all copies, and that
 
52
 * the name of Digital Equipment Corporation not be used in advertising or
 
53
 * publicity pertaining to distribution of the document or software without
 
54
 * specific, written prior permission.
 
55
 *
 
56
 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
 
57
 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
 
58
 * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
 
59
 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
 
60
 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
 
61
 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 
62
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 
63
 * SOFTWARE.
 
64
 * --Copyright--
 
65
 *
 
66
 * End BIND 4.9.3
 
67
 */
 
68
 
 
69
/*
 
70
 * Structures returned by network data base library.
 
71
 * All addresses are supplied in host order, and
 
72
 * returned in network order (suitable for use in system calls).
 
73
 */
 
74
 
 
75
#ifndef _NETDB_H
 
76
#define _NETDB_H
 
77
 
 
78
#include <sys/types.h>
 
79
#include <netinet/in.h>
 
80
#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 
81
#include <sys/socket.h>
 
82
#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
 
83
#include <sys/feature_tests.h>
 
84
 
 
85
#ifdef  __cplusplus
 
86
extern "C" {
 
87
#endif
 
88
 
 
89
#define _PATH_HEQUIV    "/etc/hosts.equiv"
 
90
#define _PATH_HOSTS     "/etc/hosts"
 
91
#define _PATH_IPNODES   "/etc/inet/ipnodes"
 
92
#define _PATH_IPSECALGS "/etc/inet/ipsecalgs"
 
93
#define _PATH_NETMASKS  "/etc/netmasks"
 
94
#define _PATH_NETWORKS  "/etc/networks"
 
95
#define _PATH_PROTOCOLS "/etc/protocols"
 
96
#define _PATH_SERVICES  "/etc/services"
 
97
 
 
98
    struct      hostent {
 
99
        char    *h_name;        /* official name of host */
 
100
        char    **h_aliases;    /* alias list */
 
101
        int     h_addrtype;     /* host address type */
 
102
        int     h_length;       /* length of address */
 
103
        char    **h_addr_list;  /* list of addresses from name server */
 
104
#define h_addr  h_addr_list[0]  /* address, for backward compatiblity */
 
105
    };
 
106
 
 
107
 
 
108
    /*
 
109
     * addrinfo introduced with IPv6 for Protocol-Independent Hostname
 
110
     * and Service Name Translation.
 
111
     */
 
112
 
 
113
#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 
114
    struct addrinfo {
 
115
        int ai_flags;           /* AI_PASSIVE, AI_CANONNAME, ... */
 
116
        int ai_family;          /* PF_xxx */
 
117
        int ai_socktype;        /* SOCK_xxx */
 
118
        int ai_protocol;        /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
 
119
#ifdef __sparcv9
 
120
        int _ai_pad;            /* for backwards compat with old size_t */
 
121
#endif /* __sparcv9 */
 
122
        socklen_t ai_addrlen;
 
123
        char *ai_canonname;     /* canonical name for hostname */
 
124
        struct sockaddr *ai_addr;       /* binary address */
 
125
        struct addrinfo *ai_next;       /* next structure in linked list */
 
126
    };
 
127
 
 
128
 
 
129
    /* addrinfo flags */
 
130
#define AI_PASSIVE      0x0008  /* intended for bind() + listen() */
 
131
#define AI_CANONNAME    0x0010  /* return canonical version of host */
 
132
#define AI_NUMERICHOST  0x0020  /* use numeric node address string */
 
133
#define AI_NUMERICSERV  0x0040  /* servname is assumed numeric */
 
134
 
 
135
    /* getipnodebyname() flags */
 
136
#define AI_V4MAPPED     0x0001  /* IPv4 mapped addresses if no IPv6 */
 
137
#define AI_ALL          0x0002  /* IPv6 and IPv4 mapped addresses */
 
138
#define AI_ADDRCONFIG   0x0004  /* AAAA or A records only if IPv6/IPv4 cnfg'd */
 
139
 
 
140
 
 
141
    /*
 
142
     * These were defined in RFC 2553 but not SUSv3
 
143
     * or RFC 3493 which obsoleted 2553.
 
144
     */
 
145
#if !defined(_XPG6) || defined(__EXTENSIONS__)
 
146
#define AI_DEFAULT      (AI_V4MAPPED | AI_ADDRCONFIG)
 
147
 
 
148
    /* addrinfo errors */
 
149
#define EAI_ADDRFAMILY  1       /* address family not supported */
 
150
#define EAI_NODATA      7       /* no address */
 
151
#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
 
152
#define EAI_AGAIN       2       /* DNS temporary failure */
 
153
#define EAI_BADFLAGS    3       /* invalid ai_flags */
 
154
#define EAI_FAIL        4       /* DNS non-recoverable failure */
 
155
#define EAI_FAMILY      5       /* ai_family not supported */
 
156
#define EAI_MEMORY      6       /* memory allocation failure */
 
157
#define EAI_NONAME      8       /* host/servname not known */
 
158
#define EAI_SERVICE     9       /* servname not supported for ai_socktype */
 
159
#define EAI_SOCKTYPE    10      /* ai_socktype not supported */
 
160
#define EAI_SYSTEM      11      /* system error in errno */
 
161
#define EAI_OVERFLOW    12      /* argument buffer overflow */
 
162
#define EAI_PROTOCOL    13
 
163
#define EAI_MAX         14
 
164
 
 
165
    /* getnameinfo flags */
 
166
#define NI_NOFQDN       0x0001
 
167
#define NI_NUMERICHOST  0x0002  /* return numeric form of address */
 
168
#define NI_NAMEREQD     0x0004  /* request DNS name */
 
169
#define NI_NUMERICSERV  0x0008
 
170
#define NI_DGRAM        0x0010
 
171
 
 
172
#if !defined(_XPG6) || defined(__EXTENSIONS__)
 
173
    /* Not listed in any standards document */
 
174
#define NI_WITHSCOPEID  0x0020
 
175
#define NI_NUMERICSCOPE 0x0040
 
176
 
 
177
    /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
 
178
#define NI_MAXHOST      1025
 
179
#define NI_MAXSERV      32
 
180
#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
 
181
#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
 
182
 
 
183
    /*
 
184
     * Scope delimit character
 
185
     */
 
186
#define SCOPE_DELIMITER '%'
 
187
 
 
188
 
 
189
    /*
 
190
     * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
 
191
     * and algorithms.
 
192
     */
 
193
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 
194
    typedef struct ipsecalgent {
 
195
        char **a_names;         /* algorithm names */
 
196
        int a_proto_num;        /* protocol number */
 
197
        int a_alg_num;          /* algorithm number */
 
198
        char *a_mech_name;      /* encryption framework mechanism name */
 
199
        int *a_block_sizes;     /* supported block sizes */
 
200
        int *a_key_sizes;       /* supported key sizes */
 
201
        int a_key_increment;    /* key size increment */
 
202
        int *a_mech_params;     /* mechanism specific parameters */
 
203
        int a_alg_flags;        /* algorithm flags */
 
204
    } ipsecalgent_t;
 
205
 
 
206
    /* well-known IPsec protocol numbers */
 
207
 
 
208
#define IPSEC_PROTO_AH          2
 
209
#define IPSEC_PROTO_ESP         3
 
210
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
211
 
 
212
    /*
 
213
     * Assumption here is that a network number
 
214
     * fits in 32 bits -- probably a poor one.
 
215
     */
 
216
    struct      netent {
 
217
        char            *n_name;        /* official name of net */
 
218
        char            **n_aliases;    /* alias list */
 
219
        int             n_addrtype;     /* net address type */
 
220
        in_addr_t       n_net;          /* network # */
 
221
    };
 
222
 
 
223
    struct      protoent {
 
224
        char    *p_name;        /* official protocol name */
 
225
        char    **p_aliases;    /* alias list */
 
226
        int     p_proto;        /* protocol # */
 
227
    };
 
228
 
 
229
    struct      servent {
 
230
        char    *s_name;        /* official service name */
 
231
        char    **s_aliases;    /* alias list */
 
232
        int     s_port;         /* port # */
 
233
        char    *s_proto;       /* protocol to use */
 
234
    };
 
235
 
 
236
#ifdef  __STDC__
 
237
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 
238
    struct hostent      *gethostbyname_r
 
239
    (const char *, struct hostent *, char *, int, int *h_errnop);
 
240
    struct hostent      *gethostbyaddr_r
 
241
    (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
 
242
    struct hostent      *getipnodebyname(const char *, int, int, int *);
 
243
    struct hostent      *getipnodebyaddr(const void *, size_t, int, int *);
 
244
    void                freehostent(struct hostent *);
 
245
    struct hostent      *gethostent_r(struct hostent *, char *, int, int *h_errnop);
 
246
 
 
247
    struct servent      *getservbyname_r
 
248
    (const char *name, const char *, struct servent *, char *, int);
 
249
    struct servent      *getservbyport_r
 
250
    (int port, const char *, struct servent *, char *, int);
 
251
    struct servent      *getservent_r(struct    servent *, char *, int);
 
252
 
 
253
    struct netent       *getnetbyname_r
 
254
    (const char *, struct netent *, char *, int);
 
255
    struct netent       *getnetbyaddr_r(long, int, struct netent *, char *, int);
 
256
    struct netent       *getnetent_r(struct netent *, char *, int);
 
257
 
 
258
    struct protoent     *getprotobyname_r
 
259
    (const char *, struct protoent *, char *, int);
 
260
    struct protoent     *getprotobynumber_r
 
261
    (int, struct protoent *, char *, int);
 
262
    struct protoent     *getprotoent_r(struct protoent *, char *, int);
 
263
 
 
264
    int getnetgrent_r(char **, char **, char **, char *, int);
 
265
    int innetgr(const char *, const char *, const char *, const char *);
 
266
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
267
 
 
268
    /* Old interfaces that return a pointer to a static area;  MT-unsafe */
 
269
    struct hostent      *gethostbyname(const char *);
 
270
    struct hostent      *gethostent(void);
 
271
    struct netent       *getnetbyaddr(in_addr_t, int);
 
272
    struct netent       *getnetbyname(const char *);
 
273
    struct netent       *getnetent(void);
 
274
    struct protoent     *getprotobyname(const char *);
 
275
    struct protoent     *getprotobynumber(int);
 
276
    struct protoent     *getprotoent(void);
 
277
    struct servent      *getservbyname(const char *, const char *);
 
278
    struct servent      *getservbyport(int, const char *);
 
279
    struct servent      *getservent(void);
 
280
 
 
281
    /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
 
282
#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 
283
    struct hostent      *gethostbyaddr(const void *, socklen_t, int);
 
284
#else
 
285
    struct hostent      *gethostbyaddr(const void *, size_t, int);
 
286
#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
 
287
 
 
288
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 
289
    int endhostent(void);
 
290
    int endnetent(void);
 
291
    int endprotoent(void);
 
292
    int endservent(void);
 
293
    int sethostent(int);
 
294
    int setnetent(int);
 
295
    int setprotoent(int);
 
296
    int setservent(int);
 
297
#else
 
298
    void endhostent(void);
 
299
    void endnetent(void);
 
300
    void endprotoent(void);
 
301
    void endservent(void);
 
302
    void sethostent(int);
 
303
    void setnetent(int);
 
304
    void setprotoent(int);
 
305
    void setservent(int);
 
306
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
307
 
 
308
#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 
309
 
 
310
#ifdef  _XPG6
 
311
#ifdef  __PRAGMA_REDEFINE_EXTNAME
 
312
#pragma redefine_extname getaddrinfo __xnet_getaddrinfo
 
313
#else   /* __PRAGMA_REDEFINE_EXTNAME */
 
314
#define getaddrinfo __xnet_getaddrinfo
 
315
#endif  /* __PRAGMA_REDEFINE_EXTNAME */
 
316
#endif  /* _XPG6 */
 
317
 
 
318
    int         getaddrinfo(const char *_RESTRICT_KYWD1,
 
319
                     const char *_RESTRICT_KYWD2,
 
320
                     const struct addrinfo *_RESTRICT_KYWD3,
 
321
                     struct addrinfo **_RESTRICT_KYWD4);
 
322
    void                freeaddrinfo(struct addrinfo *);
 
323
    const char  *gai_strerror(int);
 
324
    int         getnameinfo(const struct sockaddr *_RESTRICT_KYWD1,
 
325
                     socklen_t, char *_RESTRICT_KYWD2, socklen_t,
 
326
                     char *_RESTRICT_KYWD3, socklen_t, int);
 
327
#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
 
328
 
 
329
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 
330
    int getnetgrent(char **, char **, char **);
 
331
    int setnetgrent(const char *);
 
332
    int endnetgrent(void);
 
333
    int rcmd(char **, unsigned short,
 
334
             const char *, const char *, const char *, int *);
 
335
    int rcmd_af(char **, unsigned short,
 
336
                const char *, const char *, const char *, int *, int);
 
337
    int rresvport_af(int *, int);
 
338
    int rresvport_addr(int *, struct sockaddr_storage *);
 
339
    int rexec(char **, unsigned short,
 
340
              const char *, const char *, const char *, int *);
 
341
    int rexec_af(char **, unsigned short,
 
342
                 const char *, const char *, const char *, int *, int);
 
343
    int rresvport(int *);
 
344
    int ruserok(const char *, int, const char *, const char *);
 
345
    /* BIND */
 
346
    struct hostent      *gethostbyname2(const char *, int);
 
347
    void                herror(const char *);
 
348
    const char  *hstrerror(int);
 
349
    /* End BIND */
 
350
 
 
351
    /* IPsec algorithm prototype definitions */
 
352
    struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
 
353
    struct ipsecalgent *getipsecalgbynum(int, int, int *);
 
354
    int getipsecprotobyname(const char *doi_name);
 
355
    char *getipsecprotobynum(int doi_domain);
 
356
    void freeipsecalgent(struct ipsecalgent *ptr);
 
357
    /* END IPsec algorithm prototype definitions */
 
358
 
 
359
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
360
#else   /* __STDC__ */
 
361
    struct hostent      *gethostbyname_r();
 
362
    struct hostent      *gethostbyaddr_r();
 
363
    struct hostent      *getipnodebyname();
 
364
    struct hostent      *getipnodebyaddr();
 
365
    void                 freehostent();
 
366
    struct hostent      *gethostent_r();
 
367
    struct servent      *getservbyname_r();
 
368
    struct servent      *getservbyport_r();
 
369
    struct servent      *getservent_r();
 
370
    struct netent       *getnetbyname_r();
 
371
    struct netent       *getnetbyaddr_r();
 
372
    struct netent       *getnetent_r();
 
373
    struct protoent     *getprotobyname_r();
 
374
    struct protoent     *getprotobynumber_r();
 
375
    struct protoent     *getprotoent_r();
 
376
    int          getnetgrent_r();
 
377
    int          innetgr();
 
378
 
 
379
    /* Old interfaces that return a pointer to a static area;  MT-unsafe */
 
380
    struct hostent      *gethostbyname();
 
381
    struct hostent      *gethostbyaddr();
 
382
    struct hostent      *gethostent();
 
383
    struct netent       *getnetbyname();
 
384
    struct netent       *getnetbyaddr();
 
385
    struct netent       *getnetent();
 
386
    struct servent      *getservbyname();
 
387
    struct servent      *getservbyport();
 
388
    struct servent      *getservent();
 
389
    struct protoent     *getprotobyname();
 
390
    struct protoent     *getprotobynumber();
 
391
    struct protoent     *getprotoent();
 
392
    int          getnetgrent();
 
393
 
 
394
    int sethostent();
 
395
    int endhostent();
 
396
    int setnetent();
 
397
    int endnetent();
 
398
    int setservent();
 
399
    int endservent();
 
400
    int setprotoent();
 
401
    int endprotoent();
 
402
    int setnetgrent();
 
403
    int endnetgrent();
 
404
    int rcmd();
 
405
    int rcmd_af();
 
406
    int rexec();
 
407
    int rexec_af();
 
408
    int rresvport();
 
409
    int rresvport_af();
 
410
    int rresvport_addr();
 
411
    int ruserok();
 
412
    /* BIND */
 
413
    struct hostent      *gethostbyname2();
 
414
    void                herror();
 
415
    char                *hstrerror();
 
416
    /* IPv6 prototype definitons */
 
417
    int         getaddrinfo();
 
418
    void                freeaddrinfo();
 
419
    const char  *gai_strerror();
 
420
    int         getnameinfo();
 
421
    /* END IPv6 prototype definitions */
 
422
    /* End BIND */
 
423
 
 
424
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 
425
    /* IPsec algorithm prototype definitions */
 
426
    struct ipsecalgent *getalgbyname();
 
427
    struct ipsecalgent *getalgbydoi();
 
428
    int getdoidomainbyname();
 
429
    const char *getdoidomainbynum();
 
430
    void freealgent();
 
431
    /* END IPsec algorithm prototype definitions */
 
432
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
433
 
 
434
#endif  /* __STDC__ */
 
435
 
 
436
    /*
 
437
     * Error return codes from gethostbyname() and gethostbyaddr()
 
438
     * (when using the resolver)
 
439
     */
 
440
 
 
441
    extern  int h_errno;
 
442
 
 
443
#ifdef  _REENTRANT
 
444
#ifdef  __STDC__
 
445
    extern int  *__h_errno(void);
 
446
#else
 
447
    extern int  *__h_errno();
 
448
#endif  /* __STDC__ */
 
449
 
 
450
    /* Only #define h_errno if there is no conflict with other use */
 
451
#ifdef  H_ERRNO_IS_FUNCTION
 
452
#define h_errno (*__h_errno())
 
453
#endif  /* NO_H_ERRNO_DEFINE */
 
454
#endif  /* _REENTRANT */
 
455
 
 
456
    /*
 
457
     * Error return codes from gethostbyname() and gethostbyaddr()
 
458
     * (left in extern int h_errno).
 
459
     */
 
460
#define HOST_NOT_FOUND  1 /* Authoritive Answer Host not found */
 
461
#define TRY_AGAIN       2 /* Non-Authoritive Host not found, or SERVERFAIL */
 
462
#define NO_RECOVERY     3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
 
463
#define NO_DATA         4 /* Valid name, no data record of requested type */
 
464
 
 
465
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 
466
#define NO_ADDRESS      NO_DATA         /* no address, look for MX record */
 
467
 
 
468
    /* BIND */
 
469
#define NETDB_INTERNAL  -1      /* see errno */
 
470
#define NETDB_SUCCESS   0       /* no problem */
 
471
    /* End BIND */
 
472
 
 
473
#define MAXHOSTNAMELEN  256
 
474
 
 
475
#define MAXALIASES      35
 
476
#define MAXADDRS        35
 
477
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
478
 
 
479
#ifdef  __cplusplus
 
480
}
 
481
#endif
 
482
 
 
483
#endif  /* _NETDB_H */