summaryrefslogtreecommitdiffstats
path: root/tool/src/commands/dump.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tool/src/commands/dump.rs')
-rw-r--r--tool/src/commands/dump.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index c6327f1c..3f7e744b 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -272,8 +272,19 @@ impl PacketDumper {
}
if let Some(h) = header {
- write!(output, ", {} CTB, {}",
+ write!(output, ", {} CTB, {}{}",
if let CTB::Old(_) = h.ctb() { "old" } else { "new" },
+ if let Some(map) = map {
+ format!("{} header bytes + ",
+ map.iter().take(2).map(|f| f.as_bytes().len())
+ .sum::<usize>())
+ } else {
+ // XXX: Mapping is disabled. No can do for
+ // now. Once we save the header in
+ // packet::Common, we can use this instead of
+ // relying on the map.
+ "".into()
+ },
match h.length() {
BodyLength::Full(n) =>
format!("{} bytes", n),