8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / stand / lib / sa / netdb.h
blobd1c0e7c78e599b971c2ce90796bc939a5214c8d3
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 * Portions of this source code were derived from Berkeley 4.3 BSD
32 * under license from the Regents of the University of California.
35 #ifndef _SA_NETDB_H
36 #define _SA_NETDB_H
38 #pragma ident "%Z%%M% %I% %E% SMI"
42 * Exported interfaces for standalone's subset of libnsl's <netdb.h>.
43 * All standalone code *must* use this header rather than libnsl's.
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
50 #define MAXHOSTNAMELEN 256
52 #define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */
53 #define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
54 #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
55 #define NO_DATA 4 /* Valid name, no data record of requested type */
57 struct hostent {
58 char *h_name; /* official name of host */
59 char **h_aliases; /* alias list */
60 int h_addrtype; /* host address type */
61 int h_length; /* length of address */
62 char **h_addr_list; /* list of addresses from name server */
63 #define h_addr h_addr_list[0] /* address, for backward compatiblity */
66 extern int h_errno;
68 extern struct hostent *gethostbyname(const char *);
70 #ifdef __cplusplus
72 #endif
74 #endif /* _SA_NETDB_H */