** modify it under the terms of the GNU Library General Public
** License as published by the Free Software Foundation; either
** version 2 of the License, or (at your option) any later version.
-**
+**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Library General Public License for more details.
-**
+**
** You should have received a copy of the GNU Library General Public
** License along with this library; if not, write to the Free
** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
__BEGIN_DECLS
/* struct ypall_callback * is the arg which must be passed to yp_all */
-struct ypall_callback {
- int (*foreach)();
- char *data;
-};
+struct ypall_callback
+ {
+ int (*foreach) __P ((int __status, char *__key, int __keylen,
+ char *__val, int __vallen, char *__data));
+ char *data;
+ };
/* External NIS client function references. */
extern int yp_bind __P ((__const char *));
extern void yp_unbind __P ((__const char *));
extern int yp_get_default_domain __P ((char **));
-extern int yp_match __P ((__const char *, __const char *, __const char *,
+extern int yp_match __P ((__const char *, __const char *, __const char *,
__const int, char **, int *));
-extern int yp_first __P ((__const char *, __const char *, char **,
+extern int yp_first __P ((__const char *, __const char *, char **,
int *, char **, int *));
-extern int yp_next __P ((__const char *, __const char *, __const char *,
+extern int yp_next __P ((__const char *, __const char *, __const char *,
__const int, char **, int *, char **, int *));
extern int yp_master __P ((__const char *, __const char *, char **));
extern int yp_order __P ((__const char *, __const char *, unsigned int *));
-extern int yp_all __P ((__const char *, __const char *,
+extern int yp_all __P ((__const char *, __const char *,
__const struct ypall_callback *));
extern __const char *yperr_string __P ((__const int));
extern __const char *ypbinderr_string __P ((__const int));
#endif
/* Exist only under BSD and Linux systems */
-extern int __yp_check __P ((char **));
+extern int __yp_check __P ((char **));
__END_DECLS
#define _RPC_AUTH_H 1
#include <features.h>
+#include <rpc/xdr.h>
__BEGIN_DECLS
char c[8];
};
typedef union des_block des_block;
-extern bool_t xdr_des_block();
+extern bool_t xdr_des_block __P ((XDR *__xdrs, des_block *__blkp));
/*
* Authentication info. Opaque to client.
/*
* Auth handle, interface to client side authenticators.
*/
-typedef struct {
- struct opaque_auth ah_cred;
- struct opaque_auth ah_verf;
- union des_block ah_key;
- struct auth_ops {
- void (*ah_nextverf)();
- int (*ah_marshal)(); /* nextverf & serialize */
- int (*ah_validate)(); /* validate verifier */
- int (*ah_refresh)(); /* refresh credentials */
- void (*ah_destroy)(); /* destroy this structure */
- } *ah_ops;
- caddr_t ah_private;
-} AUTH;
+typedef struct AUTH AUTH;
+struct AUTH {
+ struct opaque_auth ah_cred;
+ struct opaque_auth ah_verf;
+ union des_block ah_key;
+ struct auth_ops {
+ void (*ah_nextverf) __P ((AUTH *));
+ int (*ah_marshal) __P ((AUTH *, XDR *)); /* nextverf & serialize */
+ int (*ah_validate) __P ((AUTH *, struct opaque_auth *));
+ /* validate verifier */
+ int (*ah_refresh) __P ((AUTH *)); /* refresh credentials */
+ void (*ah_destroy) __P ((AUTH *)); /* destroy this structure */
+ } *ah_ops;
+ caddr_t ah_private;
+};
/*
* an operations vector for the particular implementation (e.g. see xdr_mem.c),
* and two private fields for the use of the particular implementation.
*/
-typedef struct {
- enum xdr_op x_op; /* operation; fast additional param */
- struct xdr_ops {
- bool_t (*x_getlong)(); /* get a long from underlying stream */
- bool_t (*x_putlong)(); /* put a long to " */
- bool_t (*x_getbytes)();/* get some bytes from " */
- bool_t (*x_putbytes)();/* put some bytes to " */
- u_int (*x_getpostn)();/* returns bytes off from beginning */
- bool_t (*x_setpostn)();/* lets you reposition the stream */
- long * (*x_inline)(); /* buf quick ptr to buffered data */
- void (*x_destroy)(); /* free privates of this xdr_stream */
- } *x_ops;
- caddr_t x_public; /* users' data */
- caddr_t x_private; /* pointer to private data */
- caddr_t x_base; /* private used for position info */
- int x_handy; /* extra private word */
-} XDR;
+typedef struct XDR XDR;
+struct XDR
+ {
+ enum xdr_op x_op; /* operation; fast additional param */
+ const struct xdr_ops
+ {
+ bool_t (*x_getlong) __P ((XDR * __xdrs, long *__lp));
+ /* get a long from underlying stream */
+ bool_t (*x_putlong) __P ((XDR * __xdrs, __const long *__lp));
+ /* put a long to " */
+ bool_t (*x_getbytes) __P ((XDR * __xdrs, caddr_t __addr, u_int __len));
+ /* get some bytes from " */
+ bool_t (*x_putbytes) __P ((XDR * __xdrs, __const char *__addr,
+ u_int __len));
+ /* put some bytes to " */
+ u_int (*x_getpostn) __P ((__const XDR * __xdrs));
+ /* returns bytes off from beginning */
+ bool_t (*x_setpostn) __P ((XDR * __xdrs, u_int pos));
+ /* lets you reposition the stream */
+ long *(*x_inline) __P ((XDR * __xdrs, int len));
+ /* buf quick ptr to buffered data */
+ void (*x_destroy) __P ((XDR * __xdrs));
+ /* free privates of this xdr_stream */
+ }
+ *x_ops;
+ caddr_t x_public; /* users' data */
+ caddr_t x_private; /* pointer to private data */
+ caddr_t x_base; /* private used for position info */
+ int x_handy; /* extra private word */
+ };
/*
* A xdrproc_t exists for each data type which is to be encoded or decoded.