tools/tcplife: Remove dead code
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
@@ -191,7 +191,7 @@ int kprobe__tcp_set_state(struct pt_regs *ctx, struct sock *sk, int state)
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;
@@ -323,7 +323,7 @@ TRACEPOINT_PROBE(sock, inet_sock_set_state)
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;
