Blame client-src/sendbackup.h

Packit Service 392537
/*
Packit Service 392537
 * Amanda, The Advanced Maryland Automatic Network Disk Archiver
Packit Service 392537
 * Copyright (c) 1991-1998 University of Maryland at College Park
Packit Service 392537
 * Copyright (c) 2007-2012 Zmanda, Inc.  All Rights Reserved.
Packit Service 392537
 * Copyright (c) 2013-2016 Carbonite, Inc.  All Rights Reserved.
Packit Service 392537
 * All Rights Reserved.
Packit Service 392537
 *
Packit Service 392537
 * Permission to use, copy, modify, distribute, and sell this software and its
Packit Service 392537
 * documentation for any purpose is hereby granted without fee, provided that
Packit Service 392537
 * the above copyright notice appear in all copies and that both that
Packit Service 392537
 * copyright notice and this permission notice appear in supporting
Packit Service 392537
 * documentation, and that the name of U.M. not be used in advertising or
Packit Service 392537
 * publicity pertaining to distribution of the software without specific,
Packit Service 392537
 * written prior permission.  U.M. makes no representations about the
Packit Service 392537
 * suitability of this software for any purpose.  It is provided "as is"
Packit Service 392537
 * without express or implied warranty.
Packit Service 392537
 *
Packit Service 392537
 * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
Packit Service 392537
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
Packit Service 392537
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Packit Service 392537
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
Packit Service 392537
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
Packit Service 392537
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit Service 392537
 *
Packit Service 392537
 * Authors: the Amanda Development Team.  Its members are listed in a
Packit Service 392537
 * file named AUTHORS, in the root directory of this distribution.
Packit Service 392537
 */
Packit Service 392537
/* 
Packit Service 392537
 * $Id: sendbackup.h,v 1.20 2006/07/25 18:10:07 martinea Exp $
Packit Service 392537
 *
Packit Service 392537
 * a few common decls for the sendbackup-* sources
Packit Service 392537
 */
Packit Service 392537
#ifndef SENDBACKUP_H
Packit Service 392537
#define SENDBACKUP_H
Packit Service 392537
Packit Service 392537
#include "amanda.h"
Packit Service 392537
#include "pipespawn.h"
Packit Service 392537
#include "client_util.h"
Packit Service 392537
#include "amandad.h"
Packit Service 392537
#include "shm-ring.h"
Packit Service 392537
Packit Service 392537
typedef struct send_crc_s {
Packit Service 392537
    int         in;
Packit Service 392537
    int         out;
Packit Service 392537
    crc_t       crc;
Packit Service 392537
    shm_ring_t *shm_ring;
Packit Service 392537
    GThread    *thread;
Packit Service 392537
} send_crc_t;
Packit Service 392537
Packit Service 392537
extern char *shm_control_name;
Packit Service 392537
extern send_crc_t native_crc;
Packit Service 392537
extern send_crc_t client_crc;
Packit Service 392537
extern gboolean have_filter;
Packit Service 392537
extern shm_ring_t *shm_ring;
Packit Service 392537
Packit Service 392537
int fdprintf(int fd, char *format, ...) G_GNUC_PRINTF(2, 3);
Packit Service 392537
gpointer handle_crc_thread(gpointer data);
Packit Service 392537
gpointer handle_crc_to_shm_ring_thread(gpointer data);
Packit Service 392537
Packit Service 392537
void info_tapeheader(dle_t *dle);
Packit Service 392537
void start_index(int createindex, int input, int mesg, 
Packit Service 392537
		    int index, char *cmd);
Packit Service 392537
Packit Service 392537
/*
Packit Service 392537
 * Dump output lines are scanned for two types of regex matches.
Packit Service 392537
 *
Packit Service 392537
 * First, there are some cases, unfortunately, where dump detects an
Packit Service 392537
 * error but does not return an error code.  We would like to bring these
Packit Service 392537
 * errors to the attention of the operators anyway.  
Packit Service 392537
 *
Packit Service 392537
 * Second, we attempt to determine what dump thinks its output size is.
Packit Service 392537
 * This is cheaper than putting a filter between dump and compress just
Packit Service 392537
 * to determine the output size.  The re_size table contains regexes to
Packit Service 392537
 * match the size output by various vendors' dump programs.  Some vendors
Packit Service 392537
 * output the number in Kbytes, some in 512-byte blocks.  Whenever an
Packit Service 392537
 * entry in re_size matches, the first integer in the dump line is
Packit Service 392537
 * multiplied by the scale field to get the dump size.
Packit Service 392537
 */
Packit Service 392537
Packit Service 392537
extern pid_t  comppid, dumppid, encpid, tarpid;
Packit Service 392537
extern pid_t indexpid;
Packit Service 392537
extern g_option_t *g_options;
Packit Service 392537
Packit Service 392537
typedef struct backup_program_s {
Packit Service 392537
    char *name, *backup_name, *restore_name;
Packit Service 392537
    amregex_t *re_table;
Packit Service 392537
    void (*start_backup)(dle_t *dle, char *host, int dataf, int mesgf, int indexf);
Packit Service 392537
    void (*end_backup)(dle_t *dle, int goterror);
Packit Service 392537
} backup_program_t;
Packit Service 392537
Packit Service 392537
extern backup_program_t *programs[], *program;
Packit Service 392537
Packit Service 392537
#endif	/* !SENDBACKUP_H */