Skip to content

Commit

Permalink
tools/tcplife: Remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Hengqi Chen <[email protected]>
  • Loading branch information
chenhengqi committed Jun 2, 2022
1 parent c85ce50 commit 9d06ced
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/tcplife.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from __future__ import print_function
from bcc import BPF
import argparse
from socket import inet_ntop, ntohs, AF_INET, AF_INET6
from socket import inet_ntop, AF_INET, AF_INET6
from struct import pack
from time import strftime

Expand Down Expand Up @@ -191,13 +191,13 @@
FILTER_PID
// get throughput stats. see tcp_get_info().
u64 rx_b = 0, tx_b = 0, sport = 0;
u64 rx_b = 0, tx_b = 0;
struct tcp_sock *tp = (struct tcp_sock *)sk;
rx_b = tp->bytes_received;
tx_b = tp->bytes_acked;
u16 family = sk->__sk_common.skc_family;
FILTER_FAMILY
if (family == AF_INET) {
Expand Down Expand Up @@ -318,12 +318,12 @@
if (mep != 0)
pid = mep->pid;
FILTER_PID
u16 family = args->family;
FILTER_FAMILY
// get throughput stats. see tcp_get_info().
u64 rx_b = 0, tx_b = 0, sport = 0;
u64 rx_b = 0, tx_b = 0;
struct tcp_sock *tp = (struct tcp_sock *)sk;
rx_b = tp->bytes_received;
tx_b = tp->bytes_acked;
Expand Down

0 comments on commit 9d06ced

Please sign in to comment.