4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 * Portions Copyright 2012 Martin Matuska <martin@matuska.org>
30 * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
34 #include <libnvpair.h>
42 #include <sys/zfs_ioctl.h>
44 #include <zfs_fletcher.h>
48 * If dump mode is enabled, the number of bytes to print per line
50 #define BYTES_PER_LINE 16
52 * If dump mode is enabled, the number of bytes to group together, separated
53 * by newlines or spaces
55 #define DUMP_GROUPING 4
57 uint64_t total_stream_len = 0;
58 FILE *send_stream = 0;
59 boolean_t do_byteswap = B_FALSE;
60 boolean_t do_cksum = B_TRUE;
63 safe_malloc(size_t size)
65 void *rv = malloc(size);
67 (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n",
75 * ssread - send stream read.
77 * Read while computing incremental checksum
80 ssread(void *buf, size_t len, zio_cksum_t *cksum)
84 if ((outlen = fread(buf, len, 1, send_stream)) == 0)
89 fletcher_4_incremental_byteswap(buf, len, cksum);
91 fletcher_4_incremental_native(buf, len, cksum);
93 total_stream_len += len;
98 read_hdr(dmu_replay_record_t *drr, zio_cksum_t *cksum)
100 ASSERT3U(offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum),
101 ==, sizeof (dmu_replay_record_t) - sizeof (zio_cksum_t));
102 size_t r = ssread(drr, sizeof (*drr) - sizeof (zio_cksum_t), cksum);
105 zio_cksum_t saved_cksum = *cksum;
106 r = ssread(&drr->drr_u.drr_checksum.drr_checksum,
107 sizeof (zio_cksum_t), cksum);
111 !ZIO_CHECKSUM_IS_ZERO(&drr->drr_u.drr_checksum.drr_checksum) &&
112 !ZIO_CHECKSUM_EQUAL(saved_cksum,
113 drr->drr_u.drr_checksum.drr_checksum)) {
114 fprintf(stderr, "invalid checksum\n");
115 (void) printf("Incorrect checksum in record header.\n");
116 (void) printf("Expected checksum = %llx/%llx/%llx/%llx\n",
117 (longlong_t)saved_cksum.zc_word[0],
118 (longlong_t)saved_cksum.zc_word[1],
119 (longlong_t)saved_cksum.zc_word[2],
120 (longlong_t)saved_cksum.zc_word[3]);
123 return (sizeof (*drr));
127 * Print part of a block in ASCII characters
130 print_ascii_block(char *subbuf, int length)
134 for (i = 0; i < length; i++) {
135 char char_print = isprint(subbuf[i]) ? subbuf[i] : '.';
136 if (i != 0 && i % DUMP_GROUPING == 0) {
139 (void) printf("%c", char_print);
145 * print_block - Dump the contents of a modified block to STDOUT
147 * Assume that buf has capacity evenly divisible by BYTES_PER_LINE
150 print_block(char *buf, int length)
154 * Start printing ASCII characters at a constant offset, after
155 * the hex prints. Leave 3 characters per byte on a line (2 digit
156 * hex number plus 1 space) plus spaces between characters and
159 int ascii_start = BYTES_PER_LINE * 3 +
160 BYTES_PER_LINE / DUMP_GROUPING + 2;
162 for (i = 0; i < length; i += BYTES_PER_LINE) {
164 int this_line_length = MIN(BYTES_PER_LINE, length - i);
165 int print_offset = 0;
167 for (j = 0; j < this_line_length; j++) {
168 int buf_offset = i + j;
171 * Separate every DUMP_GROUPING bytes by a space.
173 if (buf_offset % DUMP_GROUPING == 0) {
174 print_offset += printf(" ");
178 * Print the two-digit hex value for this byte.
180 unsigned char hex_print = buf[buf_offset];
181 print_offset += printf("%02x ", hex_print);
184 (void) printf("%*s", ascii_start - print_offset, " ");
186 print_ascii_block(buf + i, this_line_length);
191 * Print an array of bytes to stdout as hexadecimal characters. str must
192 * have buf_len * 2 + 1 bytes of space.
195 sprintf_bytes(char *str, uint8_t *buf, uint_t buf_len)
199 for (i = 0; i < buf_len; i++) {
200 n = sprintf(str, "%02x", buf[i] & 0xff);
208 zstream_do_dump(int argc, char *argv[])
210 char *buf = safe_malloc(SPA_MAXBLOCKSIZE);
211 uint64_t drr_record_count[DRR_NUMTYPES] = { 0 };
212 uint64_t total_payload_size = 0;
213 uint64_t total_overhead_size = 0;
214 uint64_t drr_byte_count[DRR_NUMTYPES] = { 0 };
215 char salt[ZIO_DATA_SALT_LEN * 2 + 1];
216 char iv[ZIO_DATA_IV_LEN * 2 + 1];
217 char mac[ZIO_DATA_MAC_LEN * 2 + 1];
218 uint64_t total_records = 0;
219 uint64_t payload_size;
220 dmu_replay_record_t thedrr;
221 dmu_replay_record_t *drr = &thedrr;
222 struct drr_begin *drrb = &thedrr.drr_u.drr_begin;
223 struct drr_end *drre = &thedrr.drr_u.drr_end;
224 struct drr_object *drro = &thedrr.drr_u.drr_object;
225 struct drr_freeobjects *drrfo = &thedrr.drr_u.drr_freeobjects;
226 struct drr_write *drrw = &thedrr.drr_u.drr_write;
227 struct drr_write_byref *drrwbr = &thedrr.drr_u.drr_write_byref;
228 struct drr_free *drrf = &thedrr.drr_u.drr_free;
229 struct drr_spill *drrs = &thedrr.drr_u.drr_spill;
230 struct drr_write_embedded *drrwe = &thedrr.drr_u.drr_write_embedded;
231 struct drr_object_range *drror = &thedrr.drr_u.drr_object_range;
232 struct drr_redact *drrr = &thedrr.drr_u.drr_redact;
233 struct drr_checksum *drrc = &thedrr.drr_u.drr_checksum;
235 boolean_t verbose = B_FALSE;
236 boolean_t very_verbose = B_FALSE;
237 boolean_t first = B_TRUE;
239 * dump flag controls whether the contents of any modified data blocks
240 * are printed to the console during processing of the stream. Warning:
241 * for large streams, this can obviously lead to massive prints.
243 boolean_t dump = B_FALSE;
245 zio_cksum_t zc = { { 0 } };
246 zio_cksum_t pcksum = { { 0 } };
248 while ((c = getopt(argc, argv, ":vCd")) != -1) {
255 very_verbose = B_TRUE;
261 very_verbose = B_TRUE;
264 (void) fprintf(stderr,
265 "missing argument for '%c' option\n", optopt);
269 (void) fprintf(stderr, "invalid option '%c'\n",
277 const char *filename = argv[optind];
278 send_stream = fopen(filename, "r");
279 if (send_stream == NULL) {
280 (void) fprintf(stderr,
281 "Error while opening file '%s': %s\n",
282 filename, strerror(errno));
286 if (isatty(STDIN_FILENO)) {
287 (void) fprintf(stderr,
288 "Error: The send stream is a binary format "
289 "and can not be read from a\n"
290 "terminal. Standard input must be redirected, "
291 "or a file must be\n"
292 "specified as a command-line argument.\n");
299 while (read_hdr(drr, &zc)) {
302 * If this is the first DMU record being processed, check for
303 * the magic bytes and figure out the endian-ness based on them.
306 if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) {
307 do_byteswap = B_TRUE;
309 ZIO_SET_CHECKSUM(&zc, 0, 0, 0, 0);
311 * recalculate header checksum now
312 * that we know it needs to be
315 fletcher_4_incremental_byteswap(drr,
316 sizeof (dmu_replay_record_t), &zc);
318 } else if (drrb->drr_magic != DMU_BACKUP_MAGIC) {
319 (void) fprintf(stderr, "Invalid stream "
320 "(bad magic number)\n");
326 drr->drr_type = BSWAP_32(drr->drr_type);
327 drr->drr_payloadlen =
328 BSWAP_32(drr->drr_payloadlen);
332 * At this point, the leading fields of the replay record
333 * (drr_type and drr_payloadlen) have been byte-swapped if
334 * necessary, but the rest of the data structure (the
335 * union of type-specific structures) is still in its
338 if (drr->drr_type >= DRR_NUMTYPES) {
339 (void) printf("INVALID record found: type 0x%x\n",
341 (void) printf("Aborting.\n");
345 drr_record_count[drr->drr_type]++;
346 total_overhead_size += sizeof (*drr);
350 switch (drr->drr_type) {
353 drrb->drr_magic = BSWAP_64(drrb->drr_magic);
354 drrb->drr_versioninfo =
355 BSWAP_64(drrb->drr_versioninfo);
356 drrb->drr_creation_time =
357 BSWAP_64(drrb->drr_creation_time);
358 drrb->drr_type = BSWAP_32(drrb->drr_type);
359 drrb->drr_flags = BSWAP_32(drrb->drr_flags);
360 drrb->drr_toguid = BSWAP_64(drrb->drr_toguid);
362 BSWAP_64(drrb->drr_fromguid);
365 (void) printf("BEGIN record\n");
366 (void) printf("\thdrtype = %lld\n",
367 DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo));
368 (void) printf("\tfeatures = %llx\n",
369 DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo));
370 (void) printf("\tmagic = %llx\n",
371 (u_longlong_t)drrb->drr_magic);
372 (void) printf("\tcreation_time = %llx\n",
373 (u_longlong_t)drrb->drr_creation_time);
374 (void) printf("\ttype = %u\n", drrb->drr_type);
375 (void) printf("\tflags = 0x%x\n", drrb->drr_flags);
376 (void) printf("\ttoguid = %llx\n",
377 (u_longlong_t)drrb->drr_toguid);
378 (void) printf("\tfromguid = %llx\n",
379 (u_longlong_t)drrb->drr_fromguid);
380 (void) printf("\ttoname = %s\n", drrb->drr_toname);
381 (void) printf("\tpayloadlen = %u\n",
382 drr->drr_payloadlen);
386 if (drr->drr_payloadlen != 0) {
388 int sz = drr->drr_payloadlen;
390 if (sz > SPA_MAXBLOCKSIZE) {
392 buf = safe_malloc(sz);
394 (void) ssread(buf, sz, &zc);
395 if (ferror(send_stream))
397 err = nvlist_unpack(buf, sz, &nv, 0);
399 perror(strerror(err));
401 nvlist_print(stdout, nv);
410 drre->drr_checksum.zc_word[0] =
411 BSWAP_64(drre->drr_checksum.zc_word[0]);
412 drre->drr_checksum.zc_word[1] =
413 BSWAP_64(drre->drr_checksum.zc_word[1]);
414 drre->drr_checksum.zc_word[2] =
415 BSWAP_64(drre->drr_checksum.zc_word[2]);
416 drre->drr_checksum.zc_word[3] =
417 BSWAP_64(drre->drr_checksum.zc_word[3]);
420 * We compare against the *previous* checksum
421 * value, because the stored checksum is of
422 * everything before the DRR_END record.
424 if (do_cksum && !ZIO_CHECKSUM_EQUAL(drre->drr_checksum,
426 (void) printf("Expected checksum differs from "
427 "checksum in stream.\n");
428 (void) printf("Expected checksum = "
429 "%llx/%llx/%llx/%llx\n",
430 (long long unsigned int)pcksum.zc_word[0],
431 (long long unsigned int)pcksum.zc_word[1],
432 (long long unsigned int)pcksum.zc_word[2],
433 (long long unsigned int)pcksum.zc_word[3]);
435 (void) printf("END checksum = %llx/%llx/%llx/%llx\n",
436 (long long unsigned int)
437 drre->drr_checksum.zc_word[0],
438 (long long unsigned int)
439 drre->drr_checksum.zc_word[1],
440 (long long unsigned int)
441 drre->drr_checksum.zc_word[2],
442 (long long unsigned int)
443 drre->drr_checksum.zc_word[3]);
445 ZIO_SET_CHECKSUM(&zc, 0, 0, 0, 0);
450 drro->drr_object = BSWAP_64(drro->drr_object);
451 drro->drr_type = BSWAP_32(drro->drr_type);
452 drro->drr_bonustype =
453 BSWAP_32(drro->drr_bonustype);
454 drro->drr_blksz = BSWAP_32(drro->drr_blksz);
456 BSWAP_32(drro->drr_bonuslen);
457 drro->drr_raw_bonuslen =
458 BSWAP_32(drro->drr_raw_bonuslen);
459 drro->drr_toguid = BSWAP_64(drro->drr_toguid);
461 BSWAP_64(drro->drr_maxblkid);
464 payload_size = DRR_OBJECT_PAYLOAD_SIZE(drro);
467 (void) printf("OBJECT object = %llu type = %u "
468 "bonustype = %u blksz = %u bonuslen = %u "
469 "dn_slots = %u raw_bonuslen = %u "
470 "flags = %u maxblkid = %llu "
471 "indblkshift = %u nlevels = %u "
473 (u_longlong_t)drro->drr_object,
479 drro->drr_raw_bonuslen,
481 (u_longlong_t)drro->drr_maxblkid,
482 drro->drr_indblkshift,
486 if (drro->drr_bonuslen > 0) {
487 (void) ssread(buf, payload_size, &zc);
489 print_block(buf, payload_size);
493 case DRR_FREEOBJECTS:
495 drrfo->drr_firstobj =
496 BSWAP_64(drrfo->drr_firstobj);
498 BSWAP_64(drrfo->drr_numobjs);
499 drrfo->drr_toguid = BSWAP_64(drrfo->drr_toguid);
502 (void) printf("FREEOBJECTS firstobj = %llu "
504 (u_longlong_t)drrfo->drr_firstobj,
505 (u_longlong_t)drrfo->drr_numobjs);
511 drrw->drr_object = BSWAP_64(drrw->drr_object);
512 drrw->drr_type = BSWAP_32(drrw->drr_type);
513 drrw->drr_offset = BSWAP_64(drrw->drr_offset);
514 drrw->drr_logical_size =
515 BSWAP_64(drrw->drr_logical_size);
516 drrw->drr_toguid = BSWAP_64(drrw->drr_toguid);
517 drrw->drr_key.ddk_prop =
518 BSWAP_64(drrw->drr_key.ddk_prop);
519 drrw->drr_compressed_size =
520 BSWAP_64(drrw->drr_compressed_size);
523 payload_size = DRR_WRITE_PAYLOAD_SIZE(drrw);
526 * If this is verbose and/or dump output,
527 * print info on the modified block
530 sprintf_bytes(salt, drrw->drr_salt,
532 sprintf_bytes(iv, drrw->drr_iv,
534 sprintf_bytes(mac, drrw->drr_mac,
537 (void) printf("WRITE object = %llu type = %u "
538 "checksum type = %u compression type = %u "
539 "flags = %u offset = %llu "
540 "logical_size = %llu "
541 "compressed_size = %llu "
542 "payload_size = %llu props = %llx "
543 "salt = %s iv = %s mac = %s\n",
544 (u_longlong_t)drrw->drr_object,
546 drrw->drr_checksumtype,
547 drrw->drr_compressiontype,
549 (u_longlong_t)drrw->drr_offset,
550 (u_longlong_t)drrw->drr_logical_size,
551 (u_longlong_t)drrw->drr_compressed_size,
552 (u_longlong_t)payload_size,
553 (u_longlong_t)drrw->drr_key.ddk_prop,
560 * Read the contents of the block in from STDIN to buf
562 (void) ssread(buf, payload_size, &zc);
567 print_block(buf, payload_size);
571 case DRR_WRITE_BYREF:
574 BSWAP_64(drrwbr->drr_object);
576 BSWAP_64(drrwbr->drr_offset);
578 BSWAP_64(drrwbr->drr_length);
580 BSWAP_64(drrwbr->drr_toguid);
581 drrwbr->drr_refguid =
582 BSWAP_64(drrwbr->drr_refguid);
583 drrwbr->drr_refobject =
584 BSWAP_64(drrwbr->drr_refobject);
585 drrwbr->drr_refoffset =
586 BSWAP_64(drrwbr->drr_refoffset);
587 drrwbr->drr_key.ddk_prop =
588 BSWAP_64(drrwbr->drr_key.ddk_prop);
591 (void) printf("WRITE_BYREF object = %llu "
592 "checksum type = %u props = %llx "
593 "offset = %llu length = %llu "
594 "toguid = %llx refguid = %llx "
595 "refobject = %llu refoffset = %llu\n",
596 (u_longlong_t)drrwbr->drr_object,
597 drrwbr->drr_checksumtype,
598 (u_longlong_t)drrwbr->drr_key.ddk_prop,
599 (u_longlong_t)drrwbr->drr_offset,
600 (u_longlong_t)drrwbr->drr_length,
601 (u_longlong_t)drrwbr->drr_toguid,
602 (u_longlong_t)drrwbr->drr_refguid,
603 (u_longlong_t)drrwbr->drr_refobject,
604 (u_longlong_t)drrwbr->drr_refoffset);
610 drrf->drr_object = BSWAP_64(drrf->drr_object);
611 drrf->drr_offset = BSWAP_64(drrf->drr_offset);
612 drrf->drr_length = BSWAP_64(drrf->drr_length);
615 (void) printf("FREE object = %llu "
616 "offset = %llu length = %lld\n",
617 (u_longlong_t)drrf->drr_object,
618 (u_longlong_t)drrf->drr_offset,
619 (longlong_t)drrf->drr_length);
624 drrs->drr_object = BSWAP_64(drrs->drr_object);
625 drrs->drr_length = BSWAP_64(drrs->drr_length);
626 drrs->drr_compressed_size =
627 BSWAP_64(drrs->drr_compressed_size);
628 drrs->drr_type = BSWAP_32(drrs->drr_type);
631 payload_size = DRR_SPILL_PAYLOAD_SIZE(drrs);
634 sprintf_bytes(salt, drrs->drr_salt,
636 sprintf_bytes(iv, drrs->drr_iv,
638 sprintf_bytes(mac, drrs->drr_mac,
641 (void) printf("SPILL block for object = %llu "
642 "length = %llu flags = %u "
643 "compression type = %u "
644 "compressed_size = %llu "
645 "payload_size = %llu "
646 "salt = %s iv = %s mac = %s\n",
647 (u_longlong_t)drrs->drr_object,
648 (u_longlong_t)drrs->drr_length,
650 drrs->drr_compressiontype,
651 (u_longlong_t)drrs->drr_compressed_size,
652 (u_longlong_t)payload_size,
657 (void) ssread(buf, payload_size, &zc);
659 print_block(buf, payload_size);
662 case DRR_WRITE_EMBEDDED:
665 BSWAP_64(drrwe->drr_object);
667 BSWAP_64(drrwe->drr_offset);
669 BSWAP_64(drrwe->drr_length);
671 BSWAP_64(drrwe->drr_toguid);
673 BSWAP_32(drrwe->drr_lsize);
675 BSWAP_32(drrwe->drr_psize);
678 (void) printf("WRITE_EMBEDDED object = %llu "
679 "offset = %llu length = %llu "
680 "toguid = %llx comp = %u etype = %u "
681 "lsize = %u psize = %u\n",
682 (u_longlong_t)drrwe->drr_object,
683 (u_longlong_t)drrwe->drr_offset,
684 (u_longlong_t)drrwe->drr_length,
685 (u_longlong_t)drrwe->drr_toguid,
686 drrwe->drr_compression,
692 P2ROUNDUP(drrwe->drr_psize, 8), &zc);
695 P2ROUNDUP(drrwe->drr_psize, 8));
697 payload_size = P2ROUNDUP(drrwe->drr_psize, 8);
699 case DRR_OBJECT_RANGE:
701 drror->drr_firstobj =
702 BSWAP_64(drror->drr_firstobj);
703 drror->drr_numslots =
704 BSWAP_64(drror->drr_numslots);
705 drror->drr_toguid = BSWAP_64(drror->drr_toguid);
708 sprintf_bytes(salt, drror->drr_salt,
710 sprintf_bytes(iv, drror->drr_iv,
712 sprintf_bytes(mac, drror->drr_mac,
715 (void) printf("OBJECT_RANGE firstobj = %llu "
716 "numslots = %llu flags = %u "
717 "salt = %s iv = %s mac = %s\n",
718 (u_longlong_t)drror->drr_firstobj,
719 (u_longlong_t)drror->drr_numslots,
728 drrr->drr_object = BSWAP_64(drrr->drr_object);
729 drrr->drr_offset = BSWAP_64(drrr->drr_offset);
730 drrr->drr_length = BSWAP_64(drrr->drr_length);
731 drrr->drr_toguid = BSWAP_64(drrr->drr_toguid);
734 (void) printf("REDACT object = %llu offset = "
735 "%llu length = %llu\n",
736 (u_longlong_t)drrr->drr_object,
737 (u_longlong_t)drrr->drr_offset,
738 (u_longlong_t)drrr->drr_length);
742 /* should never be reached */
745 if (drr->drr_type != DRR_BEGIN && very_verbose) {
746 (void) printf(" checksum = %llx/%llx/%llx/%llx\n",
747 (longlong_t)drrc->drr_checksum.zc_word[0],
748 (longlong_t)drrc->drr_checksum.zc_word[1],
749 (longlong_t)drrc->drr_checksum.zc_word[2],
750 (longlong_t)drrc->drr_checksum.zc_word[3]);
753 drr_byte_count[drr->drr_type] += payload_size;
754 total_payload_size += payload_size;
759 /* Print final summary */
761 (void) printf("SUMMARY:\n");
762 (void) printf("\tTotal DRR_BEGIN records = %lld (%llu bytes)\n",
763 (u_longlong_t)drr_record_count[DRR_BEGIN],
764 (u_longlong_t)drr_byte_count[DRR_BEGIN]);
765 (void) printf("\tTotal DRR_END records = %lld (%llu bytes)\n",
766 (u_longlong_t)drr_record_count[DRR_END],
767 (u_longlong_t)drr_byte_count[DRR_END]);
768 (void) printf("\tTotal DRR_OBJECT records = %lld (%llu bytes)\n",
769 (u_longlong_t)drr_record_count[DRR_OBJECT],
770 (u_longlong_t)drr_byte_count[DRR_OBJECT]);
771 (void) printf("\tTotal DRR_FREEOBJECTS records = %lld (%llu bytes)\n",
772 (u_longlong_t)drr_record_count[DRR_FREEOBJECTS],
773 (u_longlong_t)drr_byte_count[DRR_FREEOBJECTS]);
774 (void) printf("\tTotal DRR_WRITE records = %lld (%llu bytes)\n",
775 (u_longlong_t)drr_record_count[DRR_WRITE],
776 (u_longlong_t)drr_byte_count[DRR_WRITE]);
777 (void) printf("\tTotal DRR_WRITE_BYREF records = %lld (%llu bytes)\n",
778 (u_longlong_t)drr_record_count[DRR_WRITE_BYREF],
779 (u_longlong_t)drr_byte_count[DRR_WRITE_BYREF]);
780 (void) printf("\tTotal DRR_WRITE_EMBEDDED records = %lld (%llu "
781 "bytes)\n", (u_longlong_t)drr_record_count[DRR_WRITE_EMBEDDED],
782 (u_longlong_t)drr_byte_count[DRR_WRITE_EMBEDDED]);
783 (void) printf("\tTotal DRR_FREE records = %lld (%llu bytes)\n",
784 (u_longlong_t)drr_record_count[DRR_FREE],
785 (u_longlong_t)drr_byte_count[DRR_FREE]);
786 (void) printf("\tTotal DRR_SPILL records = %lld (%llu bytes)\n",
787 (u_longlong_t)drr_record_count[DRR_SPILL],
788 (u_longlong_t)drr_byte_count[DRR_SPILL]);
789 (void) printf("\tTotal records = %lld\n",
790 (u_longlong_t)total_records);
791 (void) printf("\tTotal payload size = %lld (0x%llx)\n",
792 (u_longlong_t)total_payload_size, (u_longlong_t)total_payload_size);
793 (void) printf("\tTotal header overhead = %lld (0x%llx)\n",
794 (u_longlong_t)total_overhead_size,
795 (u_longlong_t)total_overhead_size);
796 (void) printf("\tTotal stream length = %lld (0x%llx)\n",
797 (u_longlong_t)total_stream_len, (u_longlong_t)total_stream_len);