Blame makedumpfile.h

Packit bf408e
/* 
Packit bf408e
 * makedumpfile.h
Packit bf408e
 * 
Packit bf408e
 * This code is for reading a dumpfile ganarated by makedumpfile command.
Packit bf408e
 *
Packit bf408e
 * Copyright (C) 2011  NEC Soft, Ltd.
Packit bf408e
 *
Packit bf408e
 * This program is free software; you can redistribute it and/or modify
Packit bf408e
 * it under the terms of the GNU General Public License as published by
Packit bf408e
 * the Free Software Foundation; either version 2 of the License, or
Packit bf408e
 * (at your option) any later version.
Packit bf408e
 *
Packit bf408e
 * This program is distributed in the hope that it will be useful,
Packit bf408e
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit bf408e
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit bf408e
 * GNU General Public License for more details.
Packit bf408e
 *
Packit bf408e
 * Author: Ken'ichi Ohmichi <oomichi mxs nes nec co jp>
Packit bf408e
 */
Packit bf408e
Packit bf408e
/*
Packit bf408e
 * makedumpfile header
Packit bf408e
 *   For re-arranging the dump data on different architecture, all the
Packit bf408e
 *   variables are defined by 64bits. The size of signature is aligned
Packit bf408e
 *   to 64bits, and change the values to big endian.
Packit bf408e
 */
Packit bf408e
#define MAKEDUMPFILE_SIGNATURE  "makedumpfile"
Packit bf408e
#define NUM_SIG_MDF             (sizeof(MAKEDUMPFILE_SIGNATURE) - 1)
Packit bf408e
#define SIZE_SIG_MDF            roundup(sizeof(char) * NUM_SIG_MDF, 8)
Packit bf408e
#define SIG_LEN_MDF             (SIZE_SIG_MDF / sizeof(char))
Packit bf408e
#define MAX_SIZE_MDF_HEADER     (4096) /* max size of makedumpfile_header */
Packit bf408e
#define TYPE_FLAT_HEADER        (1)    /* type of flattened format */
Packit bf408e
#define VERSION_FLAT_HEADER     (1)    /* current version of flattened format */
Packit bf408e
#define END_FLAG_FLAT_HEADER    (-1)
Packit bf408e
Packit bf408e
struct makedumpfile_header {
Packit bf408e
	char    signature[SIG_LEN_MDF]; /* = "makedumpfile" */
Packit bf408e
	int64_t type;
Packit bf408e
	int64_t version;
Packit bf408e
};
Packit bf408e
Packit bf408e
struct makedumpfile_data_header {
Packit bf408e
	int64_t offset;
Packit bf408e
	int64_t buf_size;
Packit bf408e
};
Packit bf408e