ndmpd.h revision a23888a301b4822208e58d55cccf1b42c8e46cc7
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * BSD 3 Clause License
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Copyright (c) 2007, The Storage Networking Industry Association.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Redistribution and use in source and binary forms, with or without
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * modification, are permitted provided that the following conditions
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * - Redistributions of source code must retain the above copyright
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * notice, this list of conditions and the following disclaimer.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * - Redistributions in binary form must reproduce the above copyright
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * notice, this list of conditions and the following disclaimer in
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * the documentation and/or other materials provided with the
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * distribution.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * - Neither the name of The Storage Networking Industry Association (SNIA)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * nor the names of its contributors may be used to endorse or promote
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * products derived from this software without specific prior written
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * permission.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * POSSIBILITY OF SUCH DAMAGE.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* Copyright (c) 2007, The Storage Networking Industry Association. */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* Copyright (c) 1996, 1997 PDC, Network Appliance. All Rights Reserved */
9ee94b97c8654689d6a034daec08757fda75d21aJan Kryl/* Copyright 2014 Nexenta Systems, Inc. All rights reserved. */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* Test unit ready */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* File handler classes */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar (*(struct in_addr *)&x)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define FS_READONLY(fs) (hasmntopt(fs, "ro") ? 1 : 0)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef void *(*funct_t)(void *); /* function pointer */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Calculate array length based on its size and size of
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * its elements.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define ARRAY_LEN(a, t) (sizeof (a) / sizeof (t))
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Default maximum permitted sequence number for the token-based backup.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Hard-limit for the sequence number in the token-based backup.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * It's one less than the ASCII value of 'A'. The 'A' letter
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * can be used as level in the lbr-type backups.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Soft-limit for the sequence number in the token-based backup.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NDMP_TOKSEQ_SLIMIT (NDMP_TOKSEQ_HLIMIT - 5)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Root inode number of dump format in V2.
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang * NDMP backup image signature
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Supported BU types
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* All 1's binary maximum mover window */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NDMP_FREE(cp) { free((char *)(cp)); (cp) = NULL; }
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Tar format archiving ops table
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * IS_LBR_BKTYPE shows if the backup type is one of these
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * 'F' of 'f': 'Full' backup type.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * 'A' of 'a': 'Archive' backup type.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * 'I' of 'i': 'Incremental' backup type.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * 'D' of 'd': 'Differntial' backup type.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define IS_LBR_BKTYPE(t) (((t) && strchr("FAID", toupper(t))) ? 1 : 0)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * NLP flags.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Macros on NLP flags.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NLP_ISSET(n, f) (((n)->nlp_flags & (f)) != 0)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NLP_ISCHKPNTED(n) NLP_ISSET(n, NLPF_CHKPNTED_PATH)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NLP_SHOULD_UPDATE(n) NLP_ISSET(n, NLPF_UPDATE)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NLP_IGNCTIME(n) NLP_ISSET(n, NLPF_IGNCTIME)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NLP_INCLMTIME(n) NLP_ISSET(n, NLPF_INCLMTIME)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * NDMP statistics
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NS_INC(s) (atomic_inc_32((volatile uint32_t *)&ndstat.ns_##s))
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NS_DEC(s) (atomic_dec_32((volatile uint32_t *)&ndstat.ns_##s))
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NS_ADD(s, d) (atomic_add_64((volatile uint64_t *)&ndstat.ns_##s, \
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#define NS_UPD(s, t) { \
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar atomic_inc_32((volatile uint32_t *)&ndstat.ns_##s); \
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar atomic_dec_32((volatile uint32_t *)&ndstat.ns_##t); \
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct ndmp_lbr_params {
a23888a301b4822208e58d55cccf1b42c8e46cc7Jan Kryl cond_t nlp_cv; /* for signaling a processed request */
a23888a301b4822208e58d55cccf1b42c8e46cc7Jan Kryl mutex_t nlp_mtx; /* mutex to synchronize access to nlp_cv */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct mem_ndmp_name_v3 {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ulong_t td_record_count; /* number of records written */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_tape_open_mode td_mode; /* tape device open mode */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t td_pos; /* current position on the current tape */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_mover_pause_reason md_pause_reason; /* current reason */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_mover_halt_reason md_halt_reason; /* current reason */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t md_data_written; /* total written to tape */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t md_seek_position; /* current seek position */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t md_bytes_left_to_read; /* #bytes to end of seek window */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t md_window_offset; /* valid data window begin */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t md_window_length; /* valid data window length */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t md_position; /* current data stream pos */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar boolean_t md_pre_cond; /* used for precondition checks */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ulong_t md_record_size; /* tape I/O record size */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar int md_listen_sock; /* data conn listen socket */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * V2 fields.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ulong_t md_discard_length; /* bytes to discard */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * V3 fields.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * V4 fields.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar void *dm_module_cookie; /* sent as abort_func param */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar module_start_func_t *dm_start_func; /* start function */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar module_abort_func_t *dm_abort_func; /* abort function */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmpd_module_stats dm_stats; /* statistics buffer */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Common fields.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_data_operation dd_operation; /* current operation */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar boolean_t dd_io_ready; /* mover sock read for I/O */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_pval *dd_env; /* environment from backup or recover request */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ulong_t dd_nlist_len; /* recover file list length */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t dd_read_offset; /* data read seek offset */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t dd_read_length; /* data read length */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar u_longlong_t dd_data_size; /* data size to be backed up */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_data_halt_reason dd_halt_reason; /* current reason */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * V2 fields.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * V3 fields.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar int dd_listen_sock; /* socket for listening for remote */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar /* mover connections */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * V4 fields.
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang * zfs-based backup (zfs send/recv)
8c4f9701439555b41fbfe7848508f53b52166007Janice Changtypedef enum {
8c4f9701439555b41fbfe7848508f53b52166007Janice Changtypedef enum {
8c4f9701439555b41fbfe7848508f53b52166007Janice Changtypedef enum {
8c4f9701439555b41fbfe7848508f53b52166007Janice Changtypedef enum {
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang#define NDMPD_ZFS_MAJOR_VERSION NDMPD_ZFS_MAJOR_0
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang#define NDMPD_ZFS_MINOR_VERSION NDMPD_ZFS_MINOR_0
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang#define NDMPD_ZFS_PROP_MAJOR_VERSION NDMPD_ZFS_PROP_MAJOR_0
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang#define NDMPD_ZFS_PROP_MINOR_VERSION NDMPD_ZFS_PROP_MINOR_0
8c4f9701439555b41fbfe7848508f53b52166007Janice Changtypedef struct {
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang uint32_t nzh_hdrlen; /* length of hdr in bytes including magic */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang /* future extensions */
8c4f9701439555b41fbfe7848508f53b52166007Janice Changtypedef struct ndmpd_zfs_args {
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang char nz_dataset[ZFS_MAXNAMELEN]; /* dataset name */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang char nz_snapname[ZFS_MAXNAMELEN]; /* snapname (following '@') */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang char nz_fromsnap[ZFS_MAXNAMELEN]; /* snap of L-1 bkup */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang char nz_snapprop[ZFS_MAXPROPLEN]; /* contents of snap incr prop */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang boolean_t nz_ndmpd_snap; /* ndmpd-generated snap? */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang pthread_t nz_sendrecv_thread; /* thread for send/recv */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang pthread_t nz_tape_thread; /* thread for tape r/w */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang int32_t nz_pipe_fd[2]; /* pipe for above 2 threads */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang char nz_zfs_mode; /* val of ZFS_MODE env var */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang boolean_t nz_zfs_force; /* val of ZFS_FORCE env var */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang boolean_t nz_update; /* val of UPDATE env var */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang char nz_dmp_name[NDMPD_ZFS_DMP_NAME_MAX]; /* val of DMP_NAME env var */
c1a2c7311cbde5c239d7679fc280103ef7b36bf1Janice Chang u_longlong_t nz_zfs_backup_size; /* used for restore only */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang libzfs_handle_t *nz_zlibh; /* session-specific lzfs hdl */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang ndmpd_zfs_header_t nz_tape_header; /* tape hdr for "zfs" backup */
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang#define ndmpd_zfs_params (&(ndmpd_zfs_args)->nz_params)
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct ndmpd_session {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmp_connection_t *ns_connection; /* NDMP connection to client */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ushort_t ns_protocol_version; /* connection protocol version */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar ndmpd_file_handler_t *ns_file_handler_list; /* for I/O multiplexing */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Tape, SCSI, mover, data and file handlers will
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * be shared between V2 and V3.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar unsigned char ns_challenge[MD5_CHALLENGE_SIZE]; /* For MD5 */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * NDMP V4 related data
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar /* handling of hardlink, hardlink queue head */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * NDMP request handler functions.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_host_info_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_butype_attr_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_mover_type_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_auth_attr_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_host_info_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_butype_info_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_connection_type_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_auth_attr_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_fs_info_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_tape_info_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_scsi_info_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_server_info_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_butype_info_v4;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_get_ext_list_v4;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_config_set_ext_list_v4;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_scsi_set_target_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_scsi_reset_device_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_scsi_execute_cdb_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_scsi_set_target_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_tape_execute_cdb_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_data_start_backup_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_data_start_recover_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_data_start_recover_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_data_start_backup_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_data_start_recover_filehist_v4;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* Connect */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_connect_client_auth_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_connect_server_auth_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_connect_client_auth_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_get_state_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_set_window_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_set_record_size_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_get_state_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_set_window_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_set_record_size_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmp_msg_handler_func_t ndmpd_mover_get_state_v4;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Backup/recover module API functions.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_history_path_func_t ndmpd_api_file_history_path_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_history_dir_func_t ndmpd_api_file_history_dir_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_history_node_func_t ndmpd_api_file_history_node_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_recovered_func_t ndmpd_api_file_recovered_v2;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_add_file_handler_func_t ndmpd_api_add_file_handler;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_remove_file_handler_func_t ndmpd_api_remove_file_handler;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_recovered_func_t ndmpd_api_file_recovered_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_history_path_func_t ndmpd_api_file_history_file_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_history_dir_func_t ndmpd_api_file_history_dir_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_history_node_func_t ndmpd_api_file_history_node_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarndmpd_file_recovered_func_t ndmpd_api_file_recovered_v4;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#endif /* NO_NDMP_API_LOG_PROTOTYPES */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef void ndmpd_func_t(ndmp_connection_t *, void *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * pthread call arg parameters
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdartypedef struct {
416eec611c764c2e9dc8dc28133302a7fc551facReza Sabdartypedef struct {
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Variables from ndmpd_comm.c
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_main(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void connection_handler(ndmp_connection_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_audit_backup(ndmp_connection_t *conn, char *path,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_audit_restore(ndmp_connection_t *conn,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar char *path, int dest, char *local_path, int result);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_audit_connect(ndmp_connection_t *conn,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_audit_disconnect(ndmp_connection_t *conn);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar/* Variables from ndmpd_main.c */
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility from ndmpd_connect.c.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_connect_list_add(ndmp_connection_t *, int *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_connect_list_del(ndmp_connection_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_connect_list_get(ndmp_door_ctx_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility functions form ndmpd_data.c.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_data_cleanup(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *ndmp_data_get_mover_mode(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_data_error(ndmpd_session_t *, ndmp_data_halt_reason);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility functions from ndmpd_mover.c.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_mover_cleanup(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_error ndmpd_mover_connect(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_mover_shut_down(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_local_write_v3(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_local_read_v3(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_remote_read_v3(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility functions from ndmpd_file_history.c
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_file_history_init(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_file_history_cleanup(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_file_history_path(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_file_history_dir(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_file_history_node(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_fhpath_v3_cb(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_fhdir_v3_cb(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_fhnode_v3_cb(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_path_restored_v3(lbr_fhlog_call_backs_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_send_recovery_stat_v3(ndmpd_module_params_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility functions from ndmpd_dtime.c
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_put_dumptime(char *, int, time_t);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_get_dumptime(char *, int *, time_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_append_dumptime(char *, char *, int, time_t);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Global variables from ndmpd_tar3.c
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Global variables from ndmpd_util.c
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility functions from ndmpd_util.c.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_error ndmpd_save_env(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_error ndmpd_save_nlist_v2(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_add_file_handler(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_remove_file_handler(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_mtioctl(int, int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern u_longlong_t quad_to_long_long(ndmp_u_quad);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_u_quad long_long_to_quad(u_longlong_t);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_set_socket_snd_buf(int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_set_socket_rcv_buf(int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern long ndmp_buffer_get_size(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern boolean_t is_buffer_erroneous(tlm_buffer_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern boolean_t is_tape_unit_ready(char *, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_open_list_add(ndmp_connection_t *, char *, int, int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_open_list_del(char *, int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_open_list_release(ndmp_connection_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_stop_buffer_worker(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_stop_reader_thread(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_stop_writer_thread(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_free_reader_writer_ipc(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *ndmp_new_job_name(char *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *ndmpd_mk_temp(char *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *ndmpd_make_bk_dir_path(char *, char *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char **ndmpd_make_exc_list(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_sort_nlist_v3(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_get_bk_dir_ino(ndmp_lbr_params_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_wait_for_reader(tlm_commands_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_error ndmpd_save_nlist_v3(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_free_nlist_v3(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_create_socket(ulong_t *, ushort_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_connect_sock_v3(ulong_t, ushort_t);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_copy_addr_v3(ndmp_addr_v3 *, ndmp_addr_v3 *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_copy_addr_v4(ndmp_addr_v4 *, ndmp_addr_v4 *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern boolean_t ndmp_valid_v3addr_type(ndmp_addr_type);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern boolean_t ndmp_check_utf8magic(tlm_cmd_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_get_cur_bk_time(ndmp_lbr_params_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *ndmp_get_relative_path(char *, char *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_load_params(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void randomize(unsigned char *, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * Utility functions from ndmpd_tar3.c.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_error ndmp_restore_get_params_v3(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern ndmp_error ndmp_backup_get_params_v3(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar * door init and fini function from ndmpd_door_serv.c
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_door_init(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_door_fini(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_get_max_tok_seq(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int get_zfsvolname(char *, int, char *);
876b86efac620aaabc70ad2ed4bfb715ce714875Reza Sabdarextern int ndmp_create_snapshot(char *, char *);
876b86efac620aaabc70ad2ed4bfb715ce714875Reza Sabdarextern int ndmp_remove_snapshot(char *, char *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_mark_inodes_v2(ndmpd_session_t *, ndmp_lbr_params_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmpd_abort_marking_v2(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmpd_mark_inodes_v3(ndmpd_session_t *, ndmp_lbr_params_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarmodule_start_func_t ndmpd_tar_restore_starter_v3;
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_backup_extract_params(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_restore_extract_params(ndmpd_session_t *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int ndmp_tar_reader(ndmp_tar_reader_arg_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int tape_open(char *, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern void ndmp_session_unref(ndmpd_session_t *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarvoid ndmpd_get_file_entry_type(int, ndmp_file_type *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int tcp_accept(int, unsigned int *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int tcp_get_peer(int, unsigned int *, int *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *gethostaddr(void);
588541fbf64fffe619698198cef04af1900f1f86Reza Sabdarextern char *get_default_nic_addr(void);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int tlm_init(void);
876b86efac620aaabc70ad2ed4bfb715ce714875Reza Sabdarextern int snapshot_create(char *, char *, boolean_t, boolean_t);
876b86efac620aaabc70ad2ed4bfb715ce714875Reza Sabdarextern int snapshot_destroy(char *, char *, boolean_t, boolean_t, int *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int dp_readdir(DIR *, unsigned long *, char *,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar int *, unsigned long *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int scsi_dev_exists(char *, int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int scsi_get_devtype(char *, int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern struct open_list *ndmp_open_list_find(char *, int, int);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int filecopy(char *, char *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern char *trim_whitespace(char *);
84bf06e9e5fd6d61897cc8c298a0f3e807b27094Reza Sabdarextern int fs_getstat(char *, struct fs_fhandle *, struct stat64 *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int fs_readdir(struct fs_fhandle *, char *, long *,
84bf06e9e5fd6d61897cc8c298a0f3e807b27094Reza Sabdar char *, int *, struct fs_fhandle *, struct stat64 *);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int iscreated(ndmp_lbr_params_t *nlp, char *name, tlm_acls_t *tacl,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdarextern int sasd_dev_count(void);
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang#define NDMP_APILOG(s, t, m, ...) \
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang if (((ndmpd_session_t *)(s))->ns_protocol_version == NDMPV4) \
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang (void) ndmpd_api_log_v4(s, t, m, __VA_ARGS__); \
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang else if (((ndmpd_session_t *)(s))->ns_protocol_version == NDMPV3) \
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang (void) ndmpd_api_log_v3(s, t, m, __VA_ARGS__); \
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang * Backup path utility functions
8c4f9701439555b41fbfe7848508f53b52166007Janice Changextern char *get_backup_path_v3(ndmpd_module_params_t *);
8c4f9701439555b41fbfe7848508f53b52166007Janice Changextern char *get_backup_path_v2(ndmpd_module_params_t *);
8c4f9701439555b41fbfe7848508f53b52166007Janice Chang * Functions for zfs-based backup
8c4f9701439555b41fbfe7848508f53b52166007Janice Changboolean_t ndmpd_zfs_backup_parms_valid(ndmpd_zfs_args_t *);
8c4f9701439555b41fbfe7848508f53b52166007Janice Changboolean_t ndmpd_zfs_restore_parms_valid(ndmpd_zfs_args_t *);
8c4f9701439555b41fbfe7848508f53b52166007Janice Changvoid ndmpd_zfs_dma_log(ndmpd_zfs_args_t *, ndmp_log_type, char *, ...);
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar#endif /* _NDMPD_H */