mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
29 lines
647 B
Plaintext
Executable File
29 lines
647 B
Plaintext
Executable File
#!/usr/bin/env bpftrace
|
|
|
|
BEGIN
|
|
{
|
|
printf("Logging P2P traffic\n")
|
|
}
|
|
|
|
usdt:./src/dashd:net:inbound_message
|
|
{
|
|
$peer_id = (int64) arg0;
|
|
$peer_addr = str(arg1);
|
|
$peer_type = str(arg2);
|
|
$msg_type = str(arg3);
|
|
$msg_len = arg4;
|
|
printf("inbound '%s' msg from peer %d (%s, %s) with %d bytes\n", $msg_type, $peer_id, $peer_type, $peer_addr, $msg_len);
|
|
}
|
|
|
|
usdt:./src/dashd:net:outbound_message
|
|
{
|
|
$peer_id = (int64) arg0;
|
|
$peer_addr = str(arg1);
|
|
$peer_type = str(arg2);
|
|
$msg_type = str(arg3);
|
|
$msg_len = arg4;
|
|
|
|
printf("outbound '%s' msg to peer %d (%s, %s) with %d bytes\n", $msg_type, $peer_id, $peer_type, $peer_addr, $msg_len);
|
|
}
|
|
|