Back to index

glibc  2.9
netdb.h
Go to the documentation of this file.
00001 /* @(#)netdb.h       2.1 88/07/29 3.9 RPCSRC */
00002 /*
00003  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00004  * unrestricted use provided that this legend is included on all tape
00005  * media and as a part of the software program in whole or part.  Users
00006  * may copy or modify Sun RPC without charge, but are not authorized
00007  * to license or distribute it to anyone else except as part of a product or
00008  * program developed by the user.
00009  *
00010  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
00011  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
00012  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
00013  *
00014  * Sun RPC is provided with no support and without any obligation on the
00015  * part of Sun Microsystems, Inc. to assist in its use, correction,
00016  * modification or enhancement.
00017  *
00018  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
00019  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
00020  * OR ANY PART THEREOF.
00021  *
00022  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
00023  * or profits or other special, indirect and consequential damages, even if
00024  * Sun has been advised of the possibility of such damages.
00025  *
00026  * Sun Microsystems, Inc.
00027  * 2550 Garcia Avenue
00028  * Mountain View, California  94043
00029  */
00030 /*     @(#)rpc.h 1.8 87/07/24 SMI  */
00031 
00032 /* Cleaned up for GNU C library roland@gnu.ai.mit.edu:
00033    added multiple inclusion protection and use of <sys/cdefs.h>.
00034    In GNU this file is #include'd by <netdb.h>.  */
00035 
00036 #ifndef _RPC_NETDB_H
00037 #define _RPC_NETDB_H 1
00038 
00039 #include <features.h>
00040 
00041 #define __need_size_t
00042 #include <stddef.h>
00043 
00044 __BEGIN_DECLS
00045 
00046 struct rpcent
00047 {
00048   char *r_name;             /* Name of server for this rpc program.  */
00049   char **r_aliases;  /* Alias list.  */
00050   int r_number;             /* RPC program number.  */
00051 };
00052 
00053 extern void setrpcent (int __stayopen) __THROW;
00054 extern void endrpcent (void) __THROW;
00055 extern struct rpcent *getrpcbyname (__const char *__name) __THROW;
00056 extern struct rpcent *getrpcbynumber (int __number) __THROW;
00057 extern struct rpcent *getrpcent (void) __THROW;
00058 
00059 #ifdef __USE_MISC
00060 extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
00061                         char *__buffer, size_t __buflen,
00062                         struct rpcent **__result) __THROW;
00063 
00064 extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
00065                           char *__buffer, size_t __buflen,
00066                           struct rpcent **__result) __THROW;
00067 
00068 extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
00069                      size_t __buflen, struct rpcent **__result) __THROW;
00070 #endif
00071 
00072 __END_DECLS
00073 
00074 #endif /* rpc/netdb.h */