mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-15 23:25:34 +00:00
Remove len
and cap
fields
This commit is contained in:
parent
fbdbe1a9f1
commit
af40e814a4
@ -17,8 +17,6 @@ struct golang_read_write {
|
|||||||
__u32 fd;
|
__u32 fd;
|
||||||
__u32 conn_addr;
|
__u32 conn_addr;
|
||||||
bool is_request;
|
bool is_request;
|
||||||
__u32 len;
|
|
||||||
__u32 cap;
|
|
||||||
__u8 data[BUFFER_SIZE_READ_WRITE];
|
__u8 data[BUFFER_SIZE_READ_WRITE];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,8 +52,6 @@ static __always_inline int golang_crypto_tls_write_uprobe(struct pt_regs *ctx) {
|
|||||||
// ctx->rsi is common between golang_crypto_tls_write_uprobe and golang_crypto_tls_read_uprobe
|
// ctx->rsi is common between golang_crypto_tls_write_uprobe and golang_crypto_tls_read_uprobe
|
||||||
b->conn_addr = ctx->rsi; // go.itab.*net.TCPConn,net.Conn address
|
b->conn_addr = ctx->rsi; // go.itab.*net.TCPConn,net.Conn address
|
||||||
b->is_request = true;
|
b->is_request = true;
|
||||||
b->len = ctx->rcx;
|
|
||||||
b->cap = ctx->rdi;
|
|
||||||
|
|
||||||
status = bpf_probe_read_str(&b->data, sizeof(b->data), (void*)ctx->rbx);
|
status = bpf_probe_read_str(&b->data, sizeof(b->data), (void*)ctx->rbx);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
@ -82,8 +78,6 @@ static __always_inline int golang_crypto_tls_read_uprobe(struct pt_regs *ctx) {
|
|||||||
// ctx->rsi is common between golang_crypto_tls_write_uprobe and golang_crypto_tls_read_uprobe
|
// ctx->rsi is common between golang_crypto_tls_write_uprobe and golang_crypto_tls_read_uprobe
|
||||||
b->conn_addr = ctx->rsi; // go.itab.*net.TCPConn,net.Conn address
|
b->conn_addr = ctx->rsi; // go.itab.*net.TCPConn,net.Conn address
|
||||||
b->is_request = false;
|
b->is_request = false;
|
||||||
b->len = ctx->rax;
|
|
||||||
b->cap = ctx->r10;
|
|
||||||
|
|
||||||
// Address at ctx->rbx - 0x2bf holds the data
|
// Address at ctx->rbx - 0x2bf holds the data
|
||||||
__u32 status = bpf_probe_read_str(&b->data, sizeof(b->data), (void*)(ctx->rbx - 0x2bf));
|
__u32 status = bpf_probe_read_str(&b->data, sizeof(b->data), (void*)(ctx->rbx - 0x2bf));
|
||||||
|
@ -18,10 +18,8 @@ type tlsTapperGolangReadWrite struct {
|
|||||||
Fd uint32
|
Fd uint32
|
||||||
ConnAddr uint32
|
ConnAddr uint32
|
||||||
IsRequest bool
|
IsRequest bool
|
||||||
_ [3]byte
|
|
||||||
Len uint32
|
|
||||||
Cap uint32
|
|
||||||
Data [524288]uint8
|
Data [524288]uint8
|
||||||
|
_ [3]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
type tlsTapperTlsChunk struct {
|
type tlsTapperTlsChunk struct {
|
||||||
|
Binary file not shown.
@ -18,10 +18,8 @@ type tlsTapperGolangReadWrite struct {
|
|||||||
Fd uint32
|
Fd uint32
|
||||||
ConnAddr uint32
|
ConnAddr uint32
|
||||||
IsRequest bool
|
IsRequest bool
|
||||||
_ [3]byte
|
|
||||||
Len uint32
|
|
||||||
Cap uint32
|
|
||||||
Data [524288]uint8
|
Data [524288]uint8
|
||||||
|
_ [3]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
type tlsTapperTlsChunk struct {
|
type tlsTapperTlsChunk struct {
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user