3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 /*
31 * Portions of this source code were derived from Berkeley 4.3 BSD
32 * under license from the Regents of the University of California.
33 */
34
35 #ifndef _RPCSVC_YP_PROT_H
36 #define _RPCSVC_YP_PROT_H
37
38 #pragma ident "%Z%%M% %I% %E% SMI"
39
40 #include <rpc/rpc.h>
41 #include <rpcsvc/ypclnt.h>
42 #include <ndbm.h>
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 /*
49 * This file contains symbols and structures defining the rpc protocol
50 * between the YP clients and the YP servers. The servers are the YP
51 * database servers, and the YP.
52 */
53
54 /*
55 * The following procedures are supported by the protocol:
56 *
57 * YPPROC_NULL() returns () takes nothing, returns nothing. This indicates
58 * that the yp server is alive.
59 *
343 #define YPPUSH_SUCC (1) /* Success */
344 #define YPPUSH_AGE (2) /* Master's version not newer */
345 #define YPPUSH_NOMAP (-1) /* Can't find server for map */
346 #define YPPUSH_NODOM (-2) /* Domain not supported */
347 #define YPPUSH_RSRC (-3) /* Local resouce alloc failure */
348 #define YPPUSH_RPC (-4) /* RPC failure talking to server */
349 #define YPPUSH_MADDR (-5) /* Can't get master address */
350 #define YPPUSH_YPERR (-6) /* YP server/map db error */
351 #define YPPUSH_BADARGS (-7) /* Request arguments bad */
352 #define YPPUSH_DBM (-8) /* Local dbm operation failed */
353 #define YPPUSH_FILE (-9) /* Local file I/O operation failed */
354 #define YPPUSH_SKEW (-10) /* Map version skew during transfer */
355 #define YPPUSH_CLEAR (-11) /* Can't send "Clear" req to local */
356 /* ypserv */
357 #define YPPUSH_FORCE (-12) /* No local order number in map - */
358 /* use -f flag. */
359 #define YPPUSH_XFRERR (-13) /* ypxfr error */
360 #define YPPUSH_REFUSED (-14) /* Transfer request refused by ypserv */
361 #define YPPUSH_NOALIAS (-15) /* Alias not found for map or domain */
362
363 #ifdef __STDC__
364 extern bool xdr_datum(XDR *, datum *);
365 extern bool xdr_ypdomain_wrap_string(XDR *, char **);
366 extern bool xdr_ypmap_wrap_string(XDR *, char **);
367 extern bool xdr_ypreq_key(XDR *, struct ypreq_key *);
368 extern bool xdr_ypreq_nokey(XDR *, struct ypreq_nokey *);
369 extern bool xdr_ypreq_xfr(XDR *, struct ypreq_xfr *);
370 extern bool xdr_ypreq_newxfr(XDR *, struct ypreq_newxfr *);
371 extern bool xdr_ypresp_val(XDR *, struct ypresp_val *);
372 extern bool xdr_ypresp_key_val(XDR *, struct ypresp_key_val *);
373 extern bool xdr_ypmap_parms(XDR *, struct ypmap_parms *);
374 extern bool xdr_ypowner_wrap_string(XDR *, char **);
375 extern bool xdr_yppushresp_xfr(XDR *, struct yppushresp_xfr *);
376 extern bool xdr_ypresp_order(XDR *, struct ypresp_order *);
377 extern bool xdr_ypresp_master(XDR *, struct ypresp_master *);
378 extern bool xdr_ypall(XDR *, struct ypall_callback *);
379 extern bool xdr_ypresp_maplist(XDR *, struct ypresp_maplist *);
380
381 #else
382
383 extern bool xdr_datum();
384 extern bool xdr_ypdomain_wrap_string();
385 extern bool xdr_ypmap_wrap_string();
386 extern bool xdr_ypreq_key();
387 extern bool xdr_ypreq_nokey();
388 extern bool xdr_ypreq_xfr();
389 extern bool xdr_ypreq_newxfr();
390 extern bool xdr_ypresp_val();
391 extern bool xdr_ypresp_key_val();
392 extern bool xdr_yp_inaddr();
393 extern bool xdr_ypmap_parms();
394 extern bool xdr_ypowner_wrap_string();
395 extern bool xdr_yppushresp_xfr();
396 extern bool xdr_ypresp_order();
397 extern bool xdr_ypresp_master();
398 extern bool xdr_ypall();
399 extern bool xdr_ypresp_maplist();
400 #endif /* __STDC__ */
401
402 #ifdef __cplusplus
403 }
404 #endif
405
406 #endif /* _RPCSVC_YP_PROT_H */
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 *
25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
31
32 /*
33 * Portions of this source code were derived from Berkeley 4.3 BSD
34 * under license from the Regents of the University of California.
35 */
36
37 #ifndef _RPCSVC_YP_PROT_H
38 #define _RPCSVC_YP_PROT_H
39
40 #include <rpc/rpc.h>
41 #include <rpcsvc/ypclnt.h>
42 #include <ndbm.h>
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 /*
49 * This file contains symbols and structures defining the rpc protocol
50 * between the YP clients and the YP servers. The servers are the YP
51 * database servers, and the YP.
52 */
53
54 /*
55 * The following procedures are supported by the protocol:
56 *
57 * YPPROC_NULL() returns () takes nothing, returns nothing. This indicates
58 * that the yp server is alive.
59 *
343 #define YPPUSH_SUCC (1) /* Success */
344 #define YPPUSH_AGE (2) /* Master's version not newer */
345 #define YPPUSH_NOMAP (-1) /* Can't find server for map */
346 #define YPPUSH_NODOM (-2) /* Domain not supported */
347 #define YPPUSH_RSRC (-3) /* Local resouce alloc failure */
348 #define YPPUSH_RPC (-4) /* RPC failure talking to server */
349 #define YPPUSH_MADDR (-5) /* Can't get master address */
350 #define YPPUSH_YPERR (-6) /* YP server/map db error */
351 #define YPPUSH_BADARGS (-7) /* Request arguments bad */
352 #define YPPUSH_DBM (-8) /* Local dbm operation failed */
353 #define YPPUSH_FILE (-9) /* Local file I/O operation failed */
354 #define YPPUSH_SKEW (-10) /* Map version skew during transfer */
355 #define YPPUSH_CLEAR (-11) /* Can't send "Clear" req to local */
356 /* ypserv */
357 #define YPPUSH_FORCE (-12) /* No local order number in map - */
358 /* use -f flag. */
359 #define YPPUSH_XFRERR (-13) /* ypxfr error */
360 #define YPPUSH_REFUSED (-14) /* Transfer request refused by ypserv */
361 #define YPPUSH_NOALIAS (-15) /* Alias not found for map or domain */
362
363 extern bool xdr_datum(XDR *, datum *);
364 extern bool xdr_ypdomain_wrap_string(XDR *, char **);
365 extern bool xdr_ypmap_wrap_string(XDR *, char **);
366 extern bool xdr_ypreq_key(XDR *, struct ypreq_key *);
367 extern bool xdr_ypreq_nokey(XDR *, struct ypreq_nokey *);
368 extern bool xdr_ypreq_xfr(XDR *, struct ypreq_xfr *);
369 extern bool xdr_ypreq_newxfr(XDR *, struct ypreq_newxfr *);
370 extern bool xdr_ypresp_val(XDR *, struct ypresp_val *);
371 extern bool xdr_ypresp_key_val(XDR *, struct ypresp_key_val *);
372 extern bool xdr_ypmap_parms(XDR *, struct ypmap_parms *);
373 extern bool xdr_ypowner_wrap_string(XDR *, char **);
374 extern bool xdr_yppushresp_xfr(XDR *, struct yppushresp_xfr *);
375 extern bool xdr_ypresp_order(XDR *, struct ypresp_order *);
376 extern bool xdr_ypresp_master(XDR *, struct ypresp_master *);
377 extern bool xdr_ypall(XDR *, struct ypall_callback *);
378 extern bool xdr_ypresp_maplist(XDR *, struct ypresp_maplist *);
379
380 #ifdef __cplusplus
381 }
382 #endif
383
384 #endif /* _RPCSVC_YP_PROT_H */
|