Skip to content

Commit

Permalink
apps: log both source and destination addresses
Browse files Browse the repository at this point in the history
This can be useful to debug address rebinding problems.
  • Loading branch information
ghedo committed Jan 27, 2025
1 parent c5fc067 commit 581fdf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 5 additions & 2 deletions apps/src/bin/quiche-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn main() {
},
};

trace!("got {} bytes", len);
trace!("got {len} bytes from {from} to {local_addr}");

let pkt_buf = &mut buf[..len];

Expand Down Expand Up @@ -609,7 +609,10 @@ fn main() {
panic!("send_to() failed: {:?}", e);
}

trace!("{} written {} bytes", client.conn.trace_id(), total_write);
trace!(
"{} written {total_write} bytes with {dst_info:?}",
client.conn.trace_id()
);

if total_write >= max_send_burst {
trace!("{} pause writing", client.conn.trace_id(),);
Expand Down
8 changes: 3 additions & 5 deletions apps/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ pub fn connect(
},
};

trace!("{}: got {} bytes", local_addr, len);
trace!("got {len} bytes from {from} to {local_addr}");

if let Some(target_path) = conn_args.dump_packet_path.as_ref() {
let path = format!("{target_path}/{pkt_count}.pkt");
Expand Down Expand Up @@ -553,10 +553,8 @@ pub fn connect(
}

trace!(
"{} -> {}: written {}",
local_addr,
send_info.to,
write
"written {write} bytes from {local_addr} to {}",
send_info.to
);
}
}
Expand Down

0 comments on commit 581fdf3

Please sign in to comment.