netdb.h (4399be3cbd35324f7a2c00d77229d995b4022138) netdb.h (d58a9efd01c363186b7eed0e75a0bf074856bec8)
1/*-
2 * Copyright (c) 1980, 1983, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)netdb.h 8.1 (Berkeley) 6/2/93
1/*-
2 * Copyright (c) 1980, 1983, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)netdb.h 8.1 (Berkeley) 6/2/93
34 * $Id: netdb.h,v 1.1.1.1 1994/05/24 09:57:18 rgrimes Exp $
34 * $Id: netdb.h,v 1.2 1995/05/30 04:54:41 rgrimes Exp $
35 * -
36 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
37 *
38 * Permission to use, copy, modify, and distribute this software for any
39 * purpose with or without fee is hereby granted, provided that the above
40 * copyright notice and this permission notice appear in all copies, and that
41 * the name of Digital Equipment Corporation not be used in advertising or
42 * publicity pertaining to distribution of the document or software without

--- 15 unchanged lines hidden (view full) ---

58#define _NETDB_H_
59
60#define _PATH_HEQUIV "/etc/hosts.equiv"
61#define _PATH_HOSTS "/etc/hosts"
62#define _PATH_NETWORKS "/etc/networks"
63#define _PATH_PROTOCOLS "/etc/protocols"
64#define _PATH_SERVICES "/etc/services"
65
35 * -
36 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
37 *
38 * Permission to use, copy, modify, and distribute this software for any
39 * purpose with or without fee is hereby granted, provided that the above
40 * copyright notice and this permission notice appear in all copies, and that
41 * the name of Digital Equipment Corporation not be used in advertising or
42 * publicity pertaining to distribution of the document or software without

--- 15 unchanged lines hidden (view full) ---

58#define _NETDB_H_
59
60#define _PATH_HEQUIV "/etc/hosts.equiv"
61#define _PATH_HOSTS "/etc/hosts"
62#define _PATH_NETWORKS "/etc/networks"
63#define _PATH_PROTOCOLS "/etc/protocols"
64#define _PATH_SERVICES "/etc/services"
65
66extern int h_errno;
67
66/*
67 * Structures returned by network data base library. All addresses are
68 * supplied in host order, and returned in network order (suitable for
69 * use in system calls).
70 */
71struct hostent {
72 char *h_name; /* official name of host */
73 char **h_aliases; /* alias list */

--- 27 unchanged lines hidden (view full) ---

101 int p_proto; /* protocol # */
102};
103
104/*
105 * Error return codes from gethostbyname() and gethostbyaddr()
106 * (left in extern int h_errno).
107 */
108
68/*
69 * Structures returned by network data base library. All addresses are
70 * supplied in host order, and returned in network order (suitable for
71 * use in system calls).
72 */
73struct hostent {
74 char *h_name; /* official name of host */
75 char **h_aliases; /* alias list */

--- 27 unchanged lines hidden (view full) ---

103 int p_proto; /* protocol # */
104};
105
106/*
107 * Error return codes from gethostbyname() and gethostbyaddr()
108 * (left in extern int h_errno).
109 */
110
111#define NETDB_INTERNAL -1 /* see errno */
112#define NETDB_SUCCESS 0 /* no problem */
109#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
110#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
111#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
112#define NO_DATA 4 /* Valid name, no data record of requested type */
113#define NO_ADDRESS NO_DATA /* no address, look for MX record */
114
115#include <sys/cdefs.h>
116

--- 10 unchanged lines hidden (view full) ---

127struct netent *getnetent __P((void));
128struct protoent *getprotobyname __P((const char *));
129struct protoent *getprotobynumber __P((int));
130struct protoent *getprotoent __P((void));
131struct servent *getservbyname __P((const char *, const char *));
132struct servent *getservbyport __P((int, const char *));
133struct servent *getservent __P((void));
134void herror __P((const char *));
113#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
114#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
115#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
116#define NO_DATA 4 /* Valid name, no data record of requested type */
117#define NO_ADDRESS NO_DATA /* no address, look for MX record */
118
119#include <sys/cdefs.h>
120

--- 10 unchanged lines hidden (view full) ---

131struct netent *getnetent __P((void));
132struct protoent *getprotobyname __P((const char *));
133struct protoent *getprotobynumber __P((int));
134struct protoent *getprotoent __P((void));
135struct servent *getservbyname __P((const char *, const char *));
136struct servent *getservbyport __P((int, const char *));
137struct servent *getservent __P((void));
138void herror __P((const char *));
135char *hstrerror __P((int));
139const char *hstrerror __P((int));
136void sethostent __P((int));
137/* void sethostfile __P((const char *)); */
138void setnetent __P((int));
139void setprotoent __P((int));
140void setservent __P((int));
141__END_DECLS
142
143#endif /* !_NETDB_H_ */
140void sethostent __P((int));
141/* void sethostfile __P((const char *)); */
142void setnetent __P((int));
143void setprotoent __P((int));
144void setservent __P((int));
145__END_DECLS
146
147#endif /* !_NETDB_H_ */