tools: Remove unused struct id_t definition in tcpstates
The tool tcpstates contains a struct id_t definition but not
referenced, remove it.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
diff --git a/tools/tcpstates.py b/tools/tcpstates.py
index cb38c59..1fa2c26 100755
--- a/tools/tcpstates.py
+++ b/tools/tcpstates.py
@@ -102,12 +102,8 @@
char task[TASK_COMM_LEN];
};
BPF_PERF_OUTPUT(ipv6_events);
-
-struct id_t {
- u32 pid;
- char task[TASK_COMM_LEN];
-};
"""
+
bpf_text_tracepoint = """
TRACEPOINT_PROBE(sock, inet_sock_set_state)
{
@@ -135,7 +131,7 @@
delta_us = (bpf_ktime_get_ns() - *tsp) / 1000;
u16 family = args->family;
FILTER_FAMILY
-
+
if (args->family == AF_INET) {
struct ipv4_data_t data4 = {
.span_us = delta_us,
@@ -204,7 +200,7 @@
u16 family = sk->__sk_common.skc_family;
FILTER_FAMILY
-
+
if (family == AF_INET) {
struct ipv4_data_t data4 = {
.span_us = delta_us,
@@ -252,7 +248,7 @@
"""
bpf_text = bpf_header
-if (BPF.tracepoint_exists("sock", "inet_sock_set_state")):
+if BPF.tracepoint_exists("sock", "inet_sock_set_state"):
bpf_text += bpf_text_tracepoint
else:
bpf_text += bpf_text_kprobe