@@ -160,7 +160,7 @@ kprobe:br_forward
160
160
$encap, $skb->encapsulation);
161
161
}
162
162
163
- printf("[%s] [%p] %s:%d -> %s:%d (len: %d, proto: %d, ifindex: %d, netns: %x, srcPod: %d (internal: %d), dstPod: %d (internal: %d), proxy: %d (masqueraded: %d))\n",
163
+ printf("[%s] [%p] ↳ %s:%d -> %s:%d (len: %d, proto: %d, ifindex: %d, netns: %x, srcPod: %d (internal: %d), dstPod: %d (internal: %d), proxy: %d (masqueraded: %d))\n",
164
164
$time, $skb,
165
165
ntop($ip4h->saddr),
166
166
($ip4h->protocol == PROTO_UDP || $ip4h->protocol == PROTO_TCP) ? bswap($udph->source) : 0,
@@ -176,7 +176,7 @@ kprobe:br_forward
176
176
$pod_to_pod_via_proxy == PROXY_TRACED_AND_MASQUERADED);
177
177
178
178
if ($ip4h->protocol == PROTO_TCP) {
179
- printf("[%s] [%p] ↳ Detected TCP message, TCPFlags: %c%c%c%c%c%c%c%c, Seq: %u, Ack: %u\n",
179
+ printf("[%s] [%p] ↳ Detected TCP message, TCPFlags: %c%c%c%c%c%c%c%c, Seq: %u, Ack: %u\n",
180
180
$time, $skb,
181
181
$tcph->cwr ? CH_C : CH_DOT, $tcph->ece ? CH_E : CH_DOT,
182
182
$tcph->urg ? CH_U : CH_DOT, $tcph->ack ? CH_A : CH_DOT,
@@ -188,7 +188,7 @@ kprobe:br_forward
188
188
if ($ip4h->protocol == PROTO_UDP && (bswap($udph->source) == PORT_DNS || bswap($udph->dest) == PORT_DNS)) {
189
189
$dns = (struct dnshdr*)($udph + 1);
190
190
$query = (uint8 *)($dns + 1);
191
- printf("[%s] [%p] ↳ Detected DNS message, ID: %04x, flags %04x, QD: %d, AN: %d, NS: %d, AR: %d, query %s\n",
191
+ printf("[%s] [%p] ↳ Detected DNS message, ID: %04x, flags %04x, QD: %d, AN: %d, NS: %d, AR: %d, query %s\n",
192
192
$time, $skb,
193
193
bswap($dns->id), bswap($dns->flags), bswap($dns->qdcount),
194
194
bswap($dns->ancount), bswap($dns->nscount), bswap($dns->arcount),
@@ -198,7 +198,7 @@ kprobe:br_forward
198
198
if ($ip4h->protocol == PROTO_ICMP_IPV4) {
199
199
$frag_off = bswap($ip4h->frag_off);
200
200
201
- printf("[%s] [%p] ↳ Detected ICMP message, IPFlags: .%c%c, Type: %u, Code: %u, FragOff: %d, FragID: %d\n",
201
+ printf("[%s] [%p] ↳ Detected ICMP message, IPFlags: .%c%c, Type: %u, Code: %u, FragOff: %d, FragID: %d\n",
202
202
$time, $skb,
203
203
($frag_off & 0x4000) >> 14 ? CH_D : CH_DOT,
204
204
($frag_off & 0x2000) >> 13 ? CH_M : CH_DOT,
@@ -253,7 +253,7 @@ kprobe:br_forward
253
253
$encap, $skb->encapsulation);
254
254
}
255
255
256
- printf("[%s] [%p] %s:%d -> %s:%d (len: %d, proto: %d, ifindex: %d, netns: %x, srcPod: %d (internal: %d), dstPod: %d (internal: %d), proxy: %d (masqueraded: %d))\n",
256
+ printf("[%s] [%p] ↳ %s:%d -> %s:%d (len: %d, proto: %d, ifindex: %d, netns: %x, srcPod: %d (internal: %d), dstPod: %d (internal: %d), proxy: %d (masqueraded: %d))\n",
257
257
$time, $skb,
258
258
ntop($ip6h->saddr.in6_u.u6_addr8),
259
259
($ip6h->nexthdr == PROTO_UDP || $ip6h->nexthdr == PROTO_TCP) ? bswap($udph->source) : 0,
@@ -269,7 +269,7 @@ kprobe:br_forward
269
269
$pod_to_pod_via_proxy == PROXY_TRACED_AND_MASQUERADED);
270
270
271
271
if ($ip6h->nexthdr == PROTO_TCP) {
272
- printf("[%s] [%p] ↳ Detected TCP message, TCPFlags: %c%c%c%c%c%c%c%c, Seq: %u, Ack: %u\n",
272
+ printf("[%s] [%p] ↳ Detected TCP message, TCPFlags: %c%c%c%c%c%c%c%c, Seq: %u, Ack: %u\n",
273
273
$time, $skb,
274
274
$tcph->cwr ? CH_C : CH_DOT, $tcph->ece ? CH_E : CH_DOT,
275
275
$tcph->urg ? CH_U : CH_DOT, $tcph->ack ? CH_A : CH_DOT,
@@ -281,7 +281,7 @@ kprobe:br_forward
281
281
if ($ip6h->nexthdr == PROTO_UDP && (bswap($udph->source) == PORT_DNS || bswap($udph->dest) == PORT_DNS)) {
282
282
$dns = (struct dnshdr*)($udph + 1);
283
283
$query = (uint8 *)($dns + 1);
284
- printf("[%s] [%p] ↳ Detected DNS message, ID: %04x, flags %04x, QD: %d, AN: %d, NS: %d, AR: %d, query %s\n",
284
+ printf("[%s] [%p] ↳ Detected DNS message, ID: %04x, flags %04x, QD: %d, AN: %d, NS: %d, AR: %d, query %s\n",
285
285
$time, $skb,
286
286
bswap($dns->id), bswap($dns->flags), bswap($dns->qdcount),
287
287
bswap($dns->ancount), bswap($dns->nscount), bswap($dns->arcount),
@@ -298,7 +298,7 @@ kprobe:br_forward
298
298
$frag_off_res_m = bswap($frag_hdr->frag_off);
299
299
}
300
300
301
- printf("[%s] [%p] ↳ Detected ICMP message, IPFlags: ..%c, Type: %u, Code: %u, FragOff: %d, FragID: %d\n",
301
+ printf("[%s] [%p] ↳ Detected ICMP message, IPFlags: ..%c, Type: %u, Code: %u, FragOff: %d, FragID: %d\n",
302
302
$time, $skb,
303
303
$frag_off_res_m & 0x0001 ? CH_M : CH_DOT,
304
304
$icmph->type,
0 commit comments