Skip to content

Commit 816e7b5

Browse files
Refactor tctracer (#991)
1 parent d05e0b1 commit 816e7b5

File tree

3 files changed

+531
-382
lines changed

3 files changed

+531
-382
lines changed

bpf/common/connection_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef struct connection_info_part {
6767
u8 __pad;
6868
} connection_info_part_t;
6969

70-
static __always_inline void dbg_print_http_connection_info(connection_info_t *info) {
70+
static __always_inline void dbg_print_http_connection_info(const connection_info_t *info) {
7171
if (!k_bpf_debug) {
7272
return;
7373
}
@@ -216,4 +216,4 @@ static __always_inline void populate_ephemeral_info(connection_info_part_t *part
216216

217217
static __always_inline u8 is_empty_connection_info(const connection_info_t *conn) {
218218
return conn->s_port == 0 && conn->d_port == 0;
219-
}
219+
}

bpf/common/protocol_defs.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
#define EINPROGRESS 115 /* Operation now in progress */
2020

2121
// Taken from uapi/linux/if_ether.h
22-
#define ETH_HLEN 14 /* Total octets in header. */
23-
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
24-
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
22+
#define ETH_HLEN 14 /* Total octets in header. */
23+
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
24+
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
25+
#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */
26+
#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */
2527

2628
// Taken from uapi/linux/in.h
2729
#define IPPROTO_TCP 6 /* Transmission Control Protocol */

0 commit comments

Comments
 (0)