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