4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #pragma ident "%Z%%M% %I% %E% SMI"
29 #include "../../../lib/libsldap/common/ns_sldap.h"
32 _printEntry(ns_ldap_entry_t
*entry
) {
35 for (j
= 0; j
< entry
->attr_count
; j
++) {
36 cp
= entry
->attr_pair
[j
]->attrname
;
38 (void) fprintf(stdout
, "%s: %s\n", cp
,
39 entry
->attr_pair
[j
]->attrvalue
[0]);
41 for (k
= 0; (k
< entry
->attr_pair
[j
]->value_count
) &&
42 (entry
->attr_pair
[j
]->attrvalue
[k
]); k
++)
43 (void) fprintf(stdout
, "\t%s: %s\n", cp
,
44 entry
->attr_pair
[j
]->attrvalue
[k
]);
51 _printResult(ns_ldap_result_t
*result
) {
52 ns_ldap_entry_t
*curEntry
;
58 curEntry
= result
->entry
;
59 for (i
= 0; i
< result
->entries_count
; i
++) {
61 (void) fprintf(stdout
, "\n");
62 _printEntry(curEntry
);
63 curEntry
= curEntry
->next
;