include table of strings for printing out packet types
[unix-history] / usr / src / include / protocols / dumprestore.h
CommitLineData
8959d9ce
KM
1/* Copyright (c) 1981 Regents of the University of California */
2
e76923fe 3/* "@(#)dumprestore.h 2.1 %G%" */
8959d9ce 4
b6407c9d
KM
5/*
6 * TP_BSIZE is the size of file blocks on the dump tapes.
7 * Note that TP_BSIZE must be a multiple of DEV_BSIZE.
8 *
9 * NTREC is the number of TP_BSIZE blocks that are written
10 * in each tape record.
11 *
12 * BLKING calculates the number of TP_BSIZE blocks in a file
13 * system frag.
14 *
15 * TP_NINDIR is the number of indirect pointers in a TS_INODE
16 * or TS_ADDR record. Note that it must be a power of two.
17 */
f5bba473 18#define TP_BSIZE 1024
8959d9ce 19#define NTREC 10
b6407c9d 20#define BLKING(fs) ((fs)->fs_fsize/TP_BSIZE)
f5bba473 21#define TP_NINDIR (TP_BSIZE/2)
8959d9ce
KM
22
23#define TS_TAPE 1
24#define TS_INODE 2
25#define TS_BITS 3
26#define TS_ADDR 4
27#define TS_END 5
28#define TS_CLRI 6
29#define MAGIC (int)60011
30#define CHECKSUM (int)84446
31
f5bba473
KM
32union u_spcl {
33 char dummy[TP_BSIZE];
34 struct s_spcl {
35 int c_type;
36 time_t c_date;
37 time_t c_ddate;
38 int c_volume;
39 daddr_t c_tapea;
40 ino_t c_inumber;
41 int c_magic;
42 int c_checksum;
43 struct dinode c_dinode;
44 int c_count;
45 char c_addr[TP_NINDIR];
46 } s_spcl;
47} u_spcl;
48
49#define spcl u_spcl.s_spcl
8959d9ce
KM
50
51struct idates {
52 char id_name[16];
53 char id_incno;
54 time_t id_ddate;
55};
56
57#define DUMPOUTFMT "%-16s %c %s" /* for printf */
58 /* name, incno, ctime(date) */
59#define DUMPINFMT "%16s %c %[^\n]\n" /* inverse for scanf */