Back to index

glibc  2.9
nis_intern.h
Go to the documentation of this file.
00001 /* Copyright (c) 1997,1998,1999,2000,2001,2006 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef __NIS_INTERN_H
00021 
00022 #define __NIS_INTERN_H
00023 #include <features.h>
00024 
00025 /* Configurable parameters for pinging NIS servers:  */
00026 
00027 /* Number of retries.  */
00028 #ifndef __NIS_PING_RETRY
00029 # define __NIS_PING_RETRY 2
00030 #endif
00031 /* Initial timeout in seconds.  */
00032 #ifndef __NIS_PING_TIMEOUT_START
00033 # define __NIS_PING_TIMEOUT_START 3
00034 #endif
00035 /* Timeout increment for retries in seconds.  */
00036 #ifndef __NIS_PING_TIMEOUT_INCREMENT
00037 # define __NIS_PING_TIMEOUT_INCREMENT 3
00038 #endif
00039 
00040 
00041 __BEGIN_DECLS
00042 
00043 struct nis_cb
00044   {
00045     nis_server *serv;
00046     SVCXPRT *xprt;
00047     int sock;
00048     int nomore;
00049     nis_error result;
00050     int (*callback) (const_nis_name, const nis_object *, const void *);
00051     const void *userdata;
00052   };
00053 typedef struct nis_cb nis_cb;
00054 
00055 extern unsigned long int inetstr2int (const char *str);
00056 extern long int __nis_findfastest (dir_binding *bind);
00057 extern nis_error __do_niscall2 (const nis_server *serv, u_int serv_len,
00058                             u_long prog, xdrproc_t xargs, caddr_t req,
00059                             xdrproc_t xres, caddr_t resp,
00060                             unsigned int flags, nis_cb *cb);
00061 extern nis_error __do_niscall (const_nis_name name, u_long prog,
00062                             xdrproc_t xargs, caddr_t req,
00063                             xdrproc_t xres, caddr_t resp,
00064                             unsigned int flags, nis_cb *cb);
00065 extern nis_error __do_niscall3 (dir_binding *dbp, u_long prog,
00066                             xdrproc_t xargs, caddr_t req,
00067                             xdrproc_t xres, caddr_t resp,
00068                             unsigned int flags, nis_cb *cb);
00069 libnsl_hidden_proto (__do_niscall3)
00070 
00071 extern u_short __pmap_getnisport (struct sockaddr_in *address, u_long program,
00072                               u_long version, u_int protocol);
00073 
00074 /* NIS+ callback */
00075 extern nis_error __nis_do_callback (struct dir_binding *bptr,
00076                                 netobj *cookie, struct nis_cb *cb);
00077 extern struct nis_cb *__nis_create_callback
00078       (int (*callback)(const_nis_name, const nis_object *, const void *),
00079        const void *userdata, unsigned int flags);
00080 extern nis_error __nis_destroy_callback (struct nis_cb *cb);
00081 
00082 __END_DECLS
00083 
00084 #endif