Skip to content

Commit eb9e004

Browse files
committed
nettrace: move struct ip_esp_hdr to vmlinux.h
Signed-off-by: Menglong Dong <imagedong@tencent.com>
1 parent 692ab62 commit eb9e004

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

shared/bpf/skb_utils.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,6 @@ static try_inline bool ipv6_not_equel(u8 *src, u8 *target)
194194
#define ATTR_IPV6_CHECK() \
195195
(filter && ATTR_OPS(addr, ATTR_IPV6_OPS))
196196

197-
struct ip_esp_hdr {
198-
__be32 spi;
199-
__be32 seq_no; /* Sequence number */
200-
__u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */
201-
};
202-
203197
static try_inline int probe_parse_ip(void *ip, parse_ctx_t *ctx)
204198
{
205199
pkt_args_t *bpf_args = ctx->args;

shared/bpf/vmlinux_arm64.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127413,6 +127413,12 @@ struct xa_limit {
127413127413
u32 min;
127414127414
};
127415127415

127416+
struct ip_esp_hdr {
127417+
__be32 spi;
127418+
__be32 seq_no; /* Sequence number */
127419+
__u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */
127420+
};
127421+
127416127422
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX
127417127423
#pragma clang attribute pop
127418127424
#endif

shared/bpf/vmlinux_x86.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144631,6 +144631,12 @@ enum reg_type {
144631144631
REG_TYPE_BASE = 2,
144632144632
};
144633144633

144634+
struct ip_esp_hdr {
144635+
__be32 spi;
144636+
__be32 seq_no; /* Sequence number */
144637+
__u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */
144638+
};
144639+
144634144640
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX
144635144641
#pragma clang attribute pop
144636144642
#endif

0 commit comments

Comments
 (0)