1 /*
   2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   3  * Use is subject to license terms.
   4  */
   5 
   6 /*
   7  * BSD 3 Clause License
   8  *
   9  * Redistribution and use in source and binary forms, with or without
  10  * modification, are permitted provided that the following conditions are met:
  11  *      - Redistributions of source code must retain the above copyright
  12  *      notice, this list of conditions and the following disclaimer.
  13  *
  14  *      - Redistributions in binary form must reproduce the above copyright
  15  *      notice, this list of conditions and the following disclaimer in the
  16  *      documentation and/or other materials provided with the distribution.
  17  *
  18  *      - Neither the name of Sun Microsystems, Inc. nor the
  19  *      names of its contributors may be used to endorse or promote products
  20  *      derived from this software without specific prior written permission.
  21  *
  22  * THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. ''AS IS'' AND ANY
  23  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  24  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  25  * DISCLAIMED. IN NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY
  26  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  27  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  29  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 
  34 /*
  35  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  36  */
  37 
  38 #ifndef _DATA_H
  39 #define _DATA_H
  40 
  41 #include <ndmp_connect.h>
  42 #include <ndmp.h>
  43 
  44 /*
  45  * Function declarations and constants for data
  46  * and other interface.
  47  */
  48 
  49 #ifdef __cplusplus
  50 extern "C" {
  51 #endif
  52 
  53 #define DATA_NVAL_LEN   5
  54 /* NDMP_DATA_GET_STATE */
  55 
  56 int
  57 inf_data_abort(ndmp_error, char *, char *, FILE *, conn_handle *);
  58 extern int
  59 inf_data_get_state(ndmp_error, FILE *,  conn_handle *);
  60 extern int
  61 inf_data_connect(ndmp_error, char *, char *, char *, FILE *,  conn_handle *);
  62 extern int
  63 inf_data_listen(ndmp_error, char *, char *, FILE *,  conn_handle *);
  64 extern int
  65 inf_data_start_backup(ndmp_error, char *, char *, char *,
  66     FILE *,  conn_handle *);
  67 int
  68 inf_data_start_recover(ndmp_error, char *, char *,
  69     char *, FILE *,  conn_handle *);
  70 int
  71 inf_data_start_recover_filehist(ndmp_error, char *,
  72     char *, char *, FILE *,  conn_handle *);
  73 
  74 extern int
  75 data_start_backup_core(ndmp_error, char *, char *,
  76     FILE *, conn_handle *);
  77 extern int
  78 data_start_recover_core(ndmp_error, ndmp_message, char *, char *, FILE *,
  79     conn_handle *);
  80 int
  81 data_listen_core(ndmp_error, ndmp_addr_type, ndmp_addr **,
  82     FILE *, conn_handle *);
  83 extern int
  84 data_abort_core(ndmp_error, FILE *, conn_handle *);
  85 extern int
  86 data_stop_core(ndmp_error, FILE *, conn_handle *);
  87 extern int
  88 data_abort_core(ndmp_error, FILE *, conn_handle *);
  89 int
  90 data_connect_core(ndmp_error, ndmp_addr_type, void *, FILE *, conn_handle *);
  91 int
  92 data_start_recover_intl(ndmp_error, char *, FILE *, conn_handle *);
  93 int
  94 data_start_recover_cleanup(ndmp_error, FILE *, conn_handle *);
  95 int
  96 inf_data_get_env(ndmp_error, char *, char *, FILE *, conn_handle *);
  97 int
  98 inf_data_stop(ndmp_error, char *, FILE *, conn_handle *);
  99 #ifdef __cplusplus
 100 }
 101 #endif
 102 
 103 #endif /* _DATA_H */