Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / h / RCS / netdb.h,v
1 head     2.1;
2 branch   ;
3 access   ;
4 symbols  ;
5 locks    ; strict;
6 comment  @ * @;
7
8
9 2.1
10 date     90.04.05.15.06.01;  author sources;  state Exp;
11 branches ;
12 next     2.0;
13
14 2.0
15 date     89.11.17.15.56.56;  author sources;  state Exp;
16 branches ;
17 next     ;
18
19
20 desc
21 @named's netdb.h for BIND option
22 @
23
24
25 2.1
26 log
27 @add ID
28 @
29 text
30 @/* @@(#)$Id:$ */
31 /*
32  * Copyright (c) 1980,1983,1988 Regents of the University of California.
33  * All rights reserved.
34  *
35  * Redistribution and use in source and binary forms are permitted
36  * provided that this notice is preserved and that due credit is given
37  * to the University of California at Berkeley. The name of the University
38  * may not be used to endorse or promote products derived from this
39  * software without specific prior written permission. This software
40  * is provided ``as is'' without express or implied warranty.
41  *
42  *      @@(#)netdb.h    5.9 (Berkeley) 4/5/88
43  */
44
45 /*
46  * Structures returned by network
47  * data base library.  All addresses
48  * are supplied in host order, and
49  * returned in network order (suitable
50  * for use in system calls).
51  */
52 struct  hostent {
53         char    *h_name;        /* official name of host */
54         char    **h_aliases;    /* alias list */
55         int     h_addrtype;     /* host address type */
56         int     h_length;       /* length of address */
57         char    **h_addr_list;  /* list of addresses from name server */
58 #define h_addr  h_addr_list[0]  /* address, for backward compatiblity */
59 };
60
61 /*
62  * Assumption here is that a network number
63  * fits in 32 bits -- probably a poor one.
64  */
65 struct  netent {
66         char            *n_name;        /* official name of net */
67         char            **n_aliases;    /* alias list */
68         int             n_addrtype;     /* net address type */
69         unsigned long   n_net;          /* network # */
70 };
71
72 struct  servent {
73         char    *s_name;        /* official service name */
74         char    **s_aliases;    /* alias list */
75         int     s_port;         /* port # */
76         char    *s_proto;       /* protocol to use */
77 };
78
79 struct  protoent {
80         char    *p_name;        /* official protocol name */
81         char    **p_aliases;    /* alias list */
82         int     p_proto;        /* protocol # */
83 };
84
85 struct hostent  *gethostbyname(), *gethostbyaddr(), *gethostent();
86 struct netent   *getnetbyname(), *getnetbyaddr(), *getnetent();
87 struct servent  *getservbyname(), *getservbyport(), *getservent();
88 struct protoent *getprotobyname(), *getprotobynumber(), *getprotoent();
89
90 /*
91  * Error return codes from gethostbyname() and gethostbyaddr()
92  * (left in extern int h_errno).
93  */
94
95 #define HOST_NOT_FOUND  1 /* Authoritative Answer Host not found */
96 #define TRY_AGAIN       2 /* Non-Authoritive Host not found, or SERVERFAIL */
97 #define NO_RECOVERY     3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
98 #define NO_DATA         4 /* Valid name, no data record of requested type */
99 #define NO_ADDRESS      NO_DATA         /* no address, look for MX record */
100 @
101
102
103 2.0
104 log
105 @changes for SUN40 shared libraries and NNTP under bbc
106 @
107 text
108 @d1 1
109 @