zfs_iter.h revision 168404
11556Srgrimes/*
21556Srgrimes * CDDL HEADER START
31556Srgrimes *
41556Srgrimes * The contents of this file are subject to the terms of the
51556Srgrimes * Common Development and Distribution License (the "License").
61556Srgrimes * You may not use this file except in compliance with the License.
71556Srgrimes *
81556Srgrimes * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91556Srgrimes * or http://www.opensolaris.org/os/licensing.
101556Srgrimes * See the License for the specific language governing permissions
111556Srgrimes * and limitations under the License.
121556Srgrimes *
131556Srgrimes * When distributing Covered Code, include this CDDL HEADER in each
141556Srgrimes * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151556Srgrimes * If applicable, add the following below this CDDL HEADER, with the
161556Srgrimes * fields enclosed by brackets "[]" replaced with your own identifying
171556Srgrimes * information: Portions Copyright [yyyy] [name of copyright owner]
181556Srgrimes *
191556Srgrimes * CDDL HEADER END
201556Srgrimes */
211556Srgrimes/*
221556Srgrimes * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
231556Srgrimes * Use is subject to license terms.
241556Srgrimes */
251556Srgrimes
261556Srgrimes#ifndef	ZFS_ITER_H
271556Srgrimes#define	ZFS_ITER_H
281556Srgrimes
291556Srgrimes#pragma ident	"%Z%%M%	%I%	%E% SMI"
301556Srgrimes
311556Srgrimes#ifdef	__cplusplus
321556Srgrimesextern "C" {
331556Srgrimes#endif
3436150Scharnier
3536150Scharniertypedef struct zfs_sort_column {
3636150Scharnier	struct zfs_sort_column	*sc_next;
371556Srgrimes	struct zfs_sort_column	*sc_last;
3899110Sobrien	zfs_prop_t		sc_prop;
3999110Sobrien	char			*sc_user_prop;
401556Srgrimes	boolean_t		sc_reverse;
4117987Speter} zfs_sort_column_t;
4217987Speter
43114763Sobrienint zfs_for_each(int, char **, boolean_t, zfs_type_t, zfs_sort_column_t *,
4417987Speter    zfs_proplist_t **, zfs_iter_f, void *, boolean_t);
451556Srgrimesint zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t);
461556Srgrimesvoid zfs_free_sort_columns(zfs_sort_column_t *);
471556Srgrimes
481556Srgrimes#ifdef	__cplusplus
4917525Sache}
50221559Sjilles#endif
5117525Sache
521556Srgrimes#endif	/* ZFS_ITER_H */
531556Srgrimes