tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / network / stacks / AROSTCP / bsdsocket / api / auto_netdb.c
blob506fe07cb0f46590171f1794b370fb95f9c78cdc
1 #define NOTEX
2 /****** bsdsocket.library/gethostbyaddr *************************************
4 * SEE ALSO
5 * gethostbyname()
7 *****************************************************************************
9 */
11 /****** bsdsocket.library/gethostbyname *************************************
13 * NAME
14 * gethostbyname, gethostbyaddr - get network host entry
16 * SYNOPSIS
17 * #include <sys/types.h>
18 * #include <sys/socket.h>
19 * #include <netdb.h>
21 * hostent = gethostbyname(name)
22 * D0 A0
24 * struct hostent *gethostbyname(char *);
26 * hostent = gethostbyaddr(addr, len, type)
27 * D0 A0 D0 D1
29 * struct hostent *gethostbyaddr(caddr_t, LONG, LONG);
32 * DESCRIPTION
33 * gethostbyname() and gethostbyaddr() both return a pointer
34 * to an object with the following structure containing the
35 * data received from a name server or the broken-out fields
36 * of a line in netdb configuration file. In the case of
37 * gethostbyaddr(), addr is a pointer to the binary format
38 * address of length len (not a character string) and type is
39 * an address family as defined in <sys/socket.h>.
41 * struct hostent {
42 * char *h_name; \* official name of host *\
43 * char **h_aliases; \* alias list *\
44 * int h_addrtype; \* address type *\
45 * int h_length; \* length of address *\
46 * char **h_addr_list; \* list of addresses from name server *\
47 * };
49 * The members of this structure are:
51 * h_name Official name of the host.
53 * h_aliases A zero terminated array of alternate
54 * names for the host.
56 * h_addrtype The type of address being returned;
57 * currently always AF_INET.
59 * h_length The length, in bytes, of the address.
61 * h_addr_list A pointer to a list of network addresses
62 * for the named host. Host addresses are
63 * returned in network byte order.
65 * DIAGNOSTICS
66 * A NULL pointer is returned if no matching entry was found or
67 * error occured.
69 * BUGS
70 * All information is contained in a static area so it must be
71 * copied if it is to be saved. Only the Internet address for-
72 * mat is currently understood.
74 * SEE ALSO
75 * AmiTCP/IP configuration
77 *****************************************************************************
81 #define NOTEX
82 /****** bsdsocket.library/getnetbyaddr **************************************
84 * SEE ALSO
85 * getnetbyname()
87 *****************************************************************************
91 /****** bsdsocket.library/getnetbyname **************************************
93 * NAME
94 * getnetbyname, getnetbyaddr - get network entry
96 * SYNOPSIS
97 * #include <netdb.h>
99 * netent = getnetbyname(name)
100 * D0 A0
102 * struct netent *getnetbyname(char *);
104 * netent = getnetbyaddr(net, type)
105 * D0 D0 D1
107 * struct netent *getnetbyaddr(long, long);
109 * DESCRIPTION
110 * getnetbyname(), and getnetbyaddr() both return a pointer to
111 * an object with the following structure containing the
112 * broken-out fields of a line in netdb configuration file.
114 * struct netent {
115 * char *n_name; \* official name of net *\
116 * char **n_aliases; \* alias list *\
117 * int n_addrtype; \* net number type *\
118 * long n_net; \* net number *\
119 * };
121 * The members of this structure are:
123 * n_name The official name of the network.
125 * n_aliases A zero terminated list of alternate
126 * names for the network.
128 * n_addrtype The type of the network number returned;
129 * currently only AF_INET.
131 * n_net The network number. Network numbers are
132 * returned in machine byte order.
134 * Network numbers are supplied in host order.
136 * Type specifies the address type to use, currently only
137 * AF_INET is supported.
139 * DIAGNOSTICS
140 * A NULL pointer is returned if no matching entry was found or
141 * error occured.
143 * BUGS
144 * All information is contained in a static area so it must be
145 * copied if it is to be saved.
147 * Only Internet network numbers are currently understood.
149 * SEE ALSO
150 * AmiTCP/IP configuration
152 *****************************************************************************
156 /****** bsdsocket.library/getprotobyname ************************************
158 * NAME
159 * getprotobyname, getprotobynumber - get protocol entry
161 * SYNOPSIS
162 * #include <netdb.h>
164 * protoent = getprotobyname(name)
165 * D0 A0
167 * struct protoent *getprotobyname(char *);
169 * protoent = getprotobynumber(proto)
170 * D0 D0
172 * struct protoent *getprotobynumber(long);
174 * DESCRIPTION
175 * getprotobyname() and getprotobynumber() both return a pointer
176 * to an object with the following structure containing the
177 * broken-out fields of a line in netdb configuration file
179 * struct protoent {
180 * char *p_name; \* official name of protocol *\
181 * char **p_aliases; \* alias list *\
182 * int p_proto; \* protocol number *\
183 * };
185 * The members of this structure are:
187 * p_name The official name of the protocol.
188 * p_aliases A zero terminated list of alternate
189 * names for the protocol.
190 * p_proto The protocol number.
193 * DIAGNOSTICS
194 * A NULL pointer is returned if no matching entry was found or
195 * error occured.
197 * BUGS
198 * All information is contained in a static area so it must be
199 * copied if it is to be saved. Only the Internet protocols
200 * are currently understood.
202 * SEE ALSO
203 * AmiTCP/IP configuration
205 *****************************************************************************
209 #define NOTEX
210 /****** bsdsocket.library/getprotobynumber **********************************
212 * SEE ALSO
213 * getprotobyname()
215 *****************************************************************************
219 /****** bsdsocket.library/getservbyname *************************************
221 * NAME
222 * getservbyname, getservbyport - get service entry
224 * SYNOPSIS
225 * #include <netdb.h>
227 * servent = getservbyname(name, proto)
228 * D0 A0 A1
230 * struct servent *getservbyname(char *, char *)
232 * servent = getservbyport(port, proto)
233 * D0 D0 A0
235 * struct servent *getservbyport(long, char *);
237 * DESCRIPTION
238 * getservbyname() and getservbyport() both return a pointer to
239 * an object with the following structure containing the
240 * broken-out fields of a line in netdb configuration file.
242 * struct servent {
243 * char *s_name; \* official name of service *\
244 * char **s_aliases; \* alias list *\
245 * int s_port; \* port service resides at *\
246 * char *s_proto; \* protocol to use *\
247 * };
249 * The members of this structure are:
250 * s_name The official name of the service.
251 * s_aliases A zero terminated list of alternate
252 * names for the service.
253 * s_port The port number at which the ser-
254 * vice resides. Port numbers are
255 * returned in network short byte
256 * order.
257 * s_proto The name of the protocol to use
258 * when contacting the service.
260 * The proto argument specifies the protocol for which to the
261 * sercive is to use. It is a normal C string, e.g. "tcp" or
262 * "udp".
264 * DIAGNOSTICS
265 * A NULL pointer is returned if no matching entry was found or
266 * error occured.
268 * BUGS
269 * All information is contained in a static area so it must be
270 * copied if it is to be saved. Expecting port numbers to fit
271 * in a 32 bit quantity is probably naive.
273 * SEE ALSO
274 * AmiTCP/IP configuration
276 *****************************************************************************
280 #define NOTEX
281 /****** bsdsocket.library/getservbyport *************************************
283 * SEE ALSO
284 * getservbyname()
286 *****************************************************************************