1*10122SJordan.Brown@Sun.COM /*
2*10122SJordan.Brown@Sun.COM * CDDL HEADER START
3*10122SJordan.Brown@Sun.COM *
4*10122SJordan.Brown@Sun.COM * The contents of this file are subject to the terms of the
5*10122SJordan.Brown@Sun.COM * Common Development and Distribution License (the "License").
6*10122SJordan.Brown@Sun.COM * You may not use this file except in compliance with the License.
7*10122SJordan.Brown@Sun.COM *
8*10122SJordan.Brown@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*10122SJordan.Brown@Sun.COM * or http://www.opensolaris.org/os/licensing.
10*10122SJordan.Brown@Sun.COM * See the License for the specific language governing permissions
11*10122SJordan.Brown@Sun.COM * and limitations under the License.
12*10122SJordan.Brown@Sun.COM *
13*10122SJordan.Brown@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each
14*10122SJordan.Brown@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*10122SJordan.Brown@Sun.COM * If applicable, add the following below this CDDL HEADER, with the
16*10122SJordan.Brown@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying
17*10122SJordan.Brown@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner]
18*10122SJordan.Brown@Sun.COM *
19*10122SJordan.Brown@Sun.COM * CDDL HEADER END
20*10122SJordan.Brown@Sun.COM */
21*10122SJordan.Brown@Sun.COM
22*10122SJordan.Brown@Sun.COM /*
23*10122SJordan.Brown@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24*10122SJordan.Brown@Sun.COM * Use is subject to license terms.
25*10122SJordan.Brown@Sun.COM */
26*10122SJordan.Brown@Sun.COM
27*10122SJordan.Brown@Sun.COM /*
28*10122SJordan.Brown@Sun.COM * RPC shims for directory lookup. Originally generated using rpcgen.
29*10122SJordan.Brown@Sun.COM */
30*10122SJordan.Brown@Sun.COM
31*10122SJordan.Brown@Sun.COM #include <memory.h> /* for memset */
32*10122SJordan.Brown@Sun.COM #include <rpcsvc/idmap_prot.h>
33*10122SJordan.Brown@Sun.COM #ifndef _KERNEL
34*10122SJordan.Brown@Sun.COM #include <stdio.h>
35*10122SJordan.Brown@Sun.COM #include <stdlib.h> /* getenv, exit */
36*10122SJordan.Brown@Sun.COM #endif /* !_KERNEL */
37*10122SJordan.Brown@Sun.COM
38*10122SJordan.Brown@Sun.COM /* Default timeout can be changed using clnt_control() */
39*10122SJordan.Brown@Sun.COM static struct timeval TIMEOUT = { 25, 0 };
40*10122SJordan.Brown@Sun.COM
41*10122SJordan.Brown@Sun.COM enum clnt_stat
directory_get_common_1(idmap_utf8str_list ids,idmap_utf8str types,idmap_utf8str_list attrs,directory_results_rpc * clnt_res,CLIENT * clnt)42*10122SJordan.Brown@Sun.COM directory_get_common_1(
43*10122SJordan.Brown@Sun.COM idmap_utf8str_list ids,
44*10122SJordan.Brown@Sun.COM idmap_utf8str types,
45*10122SJordan.Brown@Sun.COM idmap_utf8str_list attrs,
46*10122SJordan.Brown@Sun.COM directory_results_rpc *clnt_res,
47*10122SJordan.Brown@Sun.COM CLIENT *clnt)
48*10122SJordan.Brown@Sun.COM {
49*10122SJordan.Brown@Sun.COM directory_get_common_1_argument arg;
50*10122SJordan.Brown@Sun.COM arg.ids = ids;
51*10122SJordan.Brown@Sun.COM arg.attrs = attrs;
52*10122SJordan.Brown@Sun.COM arg.types = types;
53*10122SJordan.Brown@Sun.COM return (clnt_call(clnt, DIRECTORY_GET_COMMON,
54*10122SJordan.Brown@Sun.COM (xdrproc_t)xdr_directory_get_common_1_argument, (caddr_t)&arg,
55*10122SJordan.Brown@Sun.COM (xdrproc_t)xdr_directory_results_rpc, (caddr_t)clnt_res,
56*10122SJordan.Brown@Sun.COM TIMEOUT));
57*10122SJordan.Brown@Sun.COM }
58