1*7a0c41d5SAlan Somers /*- 2*7a0c41d5SAlan Somers * Copyright (c) 2012 Spectra Logic Corporation 3*7a0c41d5SAlan Somers * All rights reserved. 4*7a0c41d5SAlan Somers * 5*7a0c41d5SAlan Somers * Redistribution and use in source and binary forms, with or without 6*7a0c41d5SAlan Somers * modification, are permitted provided that the following conditions 7*7a0c41d5SAlan Somers * are met: 8*7a0c41d5SAlan Somers * 1. Redistributions of source code must retain the above copyright 9*7a0c41d5SAlan Somers * notice, this list of conditions, and the following disclaimer, 10*7a0c41d5SAlan Somers * without modification. 11*7a0c41d5SAlan Somers * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12*7a0c41d5SAlan Somers * substantially similar to the "NO WARRANTY" disclaimer below 13*7a0c41d5SAlan Somers * ("Disclaimer") and any redistribution must be conditioned upon 14*7a0c41d5SAlan Somers * including a substantially similar Disclaimer requirement for further 15*7a0c41d5SAlan Somers * binary redistribution. 16*7a0c41d5SAlan Somers * 17*7a0c41d5SAlan Somers * NO WARRANTY 18*7a0c41d5SAlan Somers * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19*7a0c41d5SAlan Somers * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20*7a0c41d5SAlan Somers * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 21*7a0c41d5SAlan Somers * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22*7a0c41d5SAlan Somers * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23*7a0c41d5SAlan Somers * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24*7a0c41d5SAlan Somers * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25*7a0c41d5SAlan Somers * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26*7a0c41d5SAlan Somers * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27*7a0c41d5SAlan Somers * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28*7a0c41d5SAlan Somers * POSSIBILITY OF SUCH DAMAGES. 29*7a0c41d5SAlan Somers * 30*7a0c41d5SAlan Somers * Authors: Alan Somers (Spectra Logic Corporation) 31*7a0c41d5SAlan Somers */ 32*7a0c41d5SAlan Somers 33*7a0c41d5SAlan Somers #ifndef _LIBMOCKS_H_ 34*7a0c41d5SAlan Somers #define _LIBMOCKS_H_ 35*7a0c41d5SAlan Somers 36*7a0c41d5SAlan Somers #ifdef __cplusplus 37*7a0c41d5SAlan Somers extern "C" { 38*7a0c41d5SAlan Somers #endif 39*7a0c41d5SAlan Somers 40*7a0c41d5SAlan Somers struct libzfs_handle; 41*7a0c41d5SAlan Somers typedef struct libzfs_handle libzfs_handle_t; 42*7a0c41d5SAlan Somers struct zpool_handle; 43*7a0c41d5SAlan Somers typedef struct zpool_handle zpool_handle_t; 44*7a0c41d5SAlan Somers typedef int (*zpool_iter_f)(zpool_handle_t *, void *); 45*7a0c41d5SAlan Somers 46*7a0c41d5SAlan Somers void syslog(int priority, const char* message, ...); 47*7a0c41d5SAlan Somers int zpool_iter(libzfs_handle_t*, zpool_iter_f, void*); 48*7a0c41d5SAlan Somers 49*7a0c41d5SAlan Somers extern int syslog_last_priority; 50*7a0c41d5SAlan Somers extern char syslog_last_message[4096]; 51*7a0c41d5SAlan Somers 52*7a0c41d5SAlan Somers #ifdef __cplusplus 53*7a0c41d5SAlan Somers } 54*7a0c41d5SAlan Somers #endif 55*7a0c41d5SAlan Somers 56*7a0c41d5SAlan Somers #endif 57